:root {
    --bg: #06070A;
    --surface: #12151C;
    --bubble-assistant: #171C26;
    --bubble-pilot: #1E1A14;
    --text-primary: #F5F7FA;
    --text-muted: #7A8699;
    --brand-orange: #FF7A29;
    --danger: #FF3B5C;
    --safe: #00D46A;
    --info: #4A9EFF; /* Tier 3 (מידע גרידא) בפעמון - ר' דוח "היפוך פעמון/צ'אט" שאושר. שם סמנטי, לא צבע - אם הפלטה תשתנה יום אחד, השם לא יישאר "כחול" בזמן שהוא כבר משהו אחר */
  }

  body.light-theme {
    --bg: #F4F5F7;
    --surface: #FFFFFF;
    --bubble-assistant: #EDEFF3;
    --bubble-pilot: #FFF1DE;
    --text-primary: #14171F;
    --text-muted: #6B7280;
    --brand-orange: #FF7A29;
    --danger: #E0433D;
    --safe: #16A34A;
    --info: #2563EB;
  }
  body.light-theme { background-image: radial-gradient(circle at 50% 30%, #ffffff 0%, #F4F5F7 65%); }
  body.light-theme .topbar { border-color: rgba(0,0,0,0.08); }
  body.light-theme .transcript-panel { border-color: rgba(0,0,0,0.08) !important; background: #F4F5F7 !important; }
  body.light-theme .chat-toggle-btn { background: #ffffff; border-color: rgba(0,0,0,0.12); }
  body.light-theme .chat-tooltip { background: #ffffff; border-color: rgba(0,0,0,0.12); color: #14171F; }
  body.light-theme .chat-tooltip::after { background: #ffffff; border-color: rgba(0,0,0,0.12); }
  body.light-theme .bubble.assistant { border-color: rgba(0,0,0,0.08); }
  body.light-theme .bubble.pilot { border-color: rgba(0,0,0,0.1); }
  body.light-theme .chat-toggle-btn,
  body.light-theme .send-btn,
  body.light-theme .export-btn,
  body.light-theme .text-input-row input,
  body.light-theme .site-select { border-color: rgba(0,0,0,0.12); }
  body.light-theme .station-menu {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  }
  body.light-theme .station-menu-item { color: #14171F; }
  body.light-theme .station-menu-item.danger { color: #d93025; }
  body.light-theme .station-menu-item:hover { background: rgba(0,0,0,0.05); }
  body.light-theme .station-menu-divider { background: rgba(0,0,0,0.1); }
  body.light-theme .text-input-row input {
    background: #ffffff;
    color: #14171F;
    border-color: rgba(0,0,0,0.15);
  }
  body.light-theme .text-input-row input::placeholder { color: #9AA0A6; }
  body.light-theme .face {
    background: radial-gradient(circle at 38% 32%, #ffffff, #e4e7eb 72%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.08), 0 0 20px rgba(0,0,0,0.12);
  }
  body.light-theme .eye-shape { background: #14171F; }
  body.light-theme .halo .blob { filter: brightness(1.15) saturate(1.1); }
  body.light-theme .sleep-z { color: #4A6B8A; }
  body.light-theme .question-mark { color: #14171F; }

  * { box-sizing: border-box; }
  html, body { height: 100%; }

  body {
    margin: 0;
    background: var(--bg);
    background-image: radial-gradient(circle at 50% 30%, #0d1017 0%, #06070A 65%);
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .topbar {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 18px 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
  }

  .station-info {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
  }

  .station-menu {
    position: fixed;
    background: #12151C;
    border: 1px solid #232A36;
    border-radius: 10px;
    padding: 6px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 999999;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateX(-50%) scale(0.3) translateY(-8px);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(.34,1.56,.64,1);
  }
  .station-menu.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    pointer-events: auto;
  }
  .dropdown-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    font-size: 15px;
    line-height: 1;
    margin-top: -5px;
    color: var(--text-muted);
    animation: dropdownBounce 2s ease-in-out infinite;
  }
  @keyframes dropdownBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(4px); }
  }
  .station-menu.open { display: flex; }
  .station-menu-item {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    text-align: center;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .menu-icon { display: inline-flex; align-items: center; justify-content: center; }
  .menu-icon svg { width: 15px; height: 15px; }
  .station-menu-item:hover { background: #1c212c; }
  .station-menu-item.danger { color: #ff6b6b; }
  .station-menu-item.danger:hover { background: rgba(255,107,107,0.12); }
  .station-menu-divider { height: 1px; background: #232A36; margin: 4px 2px; }

  /* שלושת הכפתורים (פלוס/מינוס/איפוס) ממלאים יחד את כל הרוחב, בדיוק כמו שאר פריטי התפריט -
     הקצה הימני של הקבוצה = הקצה הימני של כפתור האיפוס, הקצה השמאלי = הקצה השמאלי של הפלוס */
  .font-size-control {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 0 2px;
    margin: 4px 0;
  }
  .font-size-btn, .font-size-reset-btn {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #232A36;
    background: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rubik', sans-serif;
    transition: background 0.15s ease;
  }
  .font-size-btn:hover, .font-size-reset-btn:hover { background: #1c212c; }
  .font-size-btn:disabled { opacity: 0.3; cursor: default; background: none; }
  body.light-theme .font-size-btn, body.light-theme .font-size-reset-btn { border-color: rgba(0,0,0,0.15); }
  .font-size-reset-btn { color: var(--text-muted); }
  .font-size-reset-btn svg { width: 15px; height: 15px; }
  .font-size-reset-btn:hover { color: var(--text-primary); }

  /* פאנל הגדרות מנהל - מתרחב כלפי מטה בתוך תפריט העמדה */
  .manager-settings-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(.2,.8,.3,1);
  }
  .manager-settings-panel.expanded {
    max-height: 600px; /* מספיק גדול כדי להכיל את כל השדות, האנימציה עדיין חלקה כי זה transition על max-height */
  }
  .manager-settings-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
  }
  .manager-settings-field label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Rubik', sans-serif;
    text-align: center;
    width: 100%;
  }
  .manager-settings-input {
    background: #0B0E13;
    border: 1px solid #232A36;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Rubik', sans-serif;
    outline: none;
    resize: vertical;
    width: 100%;
  }
  .manager-settings-input:focus { border-color: var(--brand-orange); }
  body.light-theme .manager-settings-input { background: #ffffff; border-color: rgba(0,0,0,0.15); color: #14171F; }

  .manager-profile-pic-row { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
  .manager-profile-pic-preview { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #232A36; flex-shrink: 0; }
  .manager-settings-secondary-btn {
    flex: 1;
    background: rgba(255,122,41,0.12);
    border: 1px solid rgba(255,122,41,0.35);
    color: var(--brand-orange);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
  }
  .manager-settings-secondary-btn:hover { background: rgba(255,122,41,0.22); }
  .manager-settings-divider { height: 1px; background: #232A36; margin: 6px 10px; width: calc(100% - 20px); }
  .manager-settings-btn-row { display: flex; gap: 8px; margin: 6px 10px 0; }
  .manager-settings-save-btn, .manager-settings-cancel-btn {
    flex: 1;
    padding: 11px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
    border-radius: 8px;
  }
  .manager-settings-save-btn {
    background: rgba(0,212,106,0.15);
    border: 1px solid rgba(0,212,106,0.4);
    color: var(--safe);
  }
  .manager-settings-save-btn:hover { background: rgba(0,212,106,0.28); }
  .manager-settings-cancel-btn {
    background: rgba(255,59,92,0.12);
    border: 1px solid rgba(255,59,92,0.4);
    color: var(--danger);
  }
  .manager-settings-cancel-btn:hover { background: rgba(255,59,92,0.24); }
  .manager-settings-status { padding: 4px 10px; font-size: 11px; color: var(--text-muted); min-height: 14px; text-align: center; }

  .manager-chat-log {
    max-height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: #0B0E13;
    border: 1px solid #232A36;
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .manager-chat-log:empty::before {
    content: 'אין הודעות עדיין';
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
    padding: 8px;
  }
  .manager-chat-bubble {
    max-width: 85%;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
  }
  .manager-chat-bubble.outgoing {
    align-self: flex-start;
    background: rgba(255,122,41,0.15);
    border: 1px solid rgba(255,122,41,0.3);
  }
  .manager-chat-bubble.incoming {
    align-self: flex-end;
    background: rgba(120,140,255,0.15);
    border: 1px solid rgba(120,140,255,0.3);
  }
  .manager-chat-bubble .meta { font-size: 9px; color: var(--text-muted); margin-top: 3px; }

  .manager-chat-input-wrap { position: relative; }
  .manager-mention-popup {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    left: 0;
    background: #12151C;
    border: 1px solid #232A36;
    border-radius: 8px;
    margin-bottom: 4px;
    max-height: 160px;
    overflow-y: auto;
    z-index: 20;
  }
  .manager-mention-popup.visible { display: block; }
  .manager-mention-item {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
  }
  .manager-mention-item:hover, .manager-mention-item.active { background: rgba(255,122,41,0.15); }

  .manager-chat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
  .manager-chat-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,122,41,0.15);
    border: 1px solid rgba(255,122,41,0.35);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--brand-orange);
  }
  .manager-chat-tag .remove-tag { cursor: pointer; font-weight: 900; }

  /* תגיות ופופאפ תיוג @ - משולבים ישירות מעל שורת ההקלדה הקיימת של הצ'אט עם אורבי,
     מוצג רק למשתמשי מנהל (מוסתר כברירת מחדל, נחשף ב-JS) */
  #managerChatTags { padding: 0 4px; }
  .text-input-row .manager-mention-popup {
    bottom: calc(100% + 6px);
    right: 0; left: 0;
  }
  .station-menu-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
  }

  .status-dot {
    display: inline-block;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--safe);
    animation: dotPulse 2.4s ease-in-out infinite;
    transition: background 0.2s ease;
  }
  @keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 4px 0 var(--safe); }
    50%      { box-shadow: 0 0 12px 4px var(--safe); }
  }
  .status-dot.disconnected {
    background: var(--danger);
    animation: dotBlinkRed 1s ease-in-out infinite;
  }
  @keyframes dotBlinkRed {
    0%, 100% { box-shadow: 0 0 4px 0 var(--danger); opacity: 1; }
    50%      { box-shadow: 0 0 14px 5px var(--danger); opacity: 0.5; }
  }

  /* אייקון האזנה למילת ההפעלה - כבוי כברירת מחדל, נדלק רק כשבאמת יש האזנה חיה ברקע */
  .wake-listen-icon {
    width: 15px; height: 15px;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  /* מוסתר לגמרי כשאין הרשאת מיקרופון אמיתית - לא משנה מה מצב ההאזנה הפנימי */
  .wake-listen-icon.mic-denied { display: none !important; }
  .wake-listen-icon.listening {
    opacity: 0.55;
    animation: wakeIconPulse 2.2s ease-in-out infinite;
  }
  .wake-listen-icon.triggered {
    opacity: 1;
    animation: wakeIconFlash 0.6s ease-in-out 2;
  }
  @keyframes wakeIconPulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.85; }
  }
  @keyframes wakeIconFlash {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 2px #FF7A29); }
    50%      { opacity: 0.5; filter: drop-shadow(0 0 8px #FF7A29); }
  }

  .clock { font-variant-numeric: tabular-nums; }
  .clock-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
  }
  .date-display { font-variant-numeric: tabular-nums; font-weight: 400; line-height: 1; }
  .clock-sep { color: var(--text-muted); opacity: 0.5; line-height: 1; }
  .clock { font-weight: 400; line-height: 1; }

  /* עטיפת תג המטיס - רכיב עצמאי לחיץ עם חץ, מחוץ לתפריט השעון */
  .pilot-badge-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 3px 8px 3px 8px;
    border-radius: 999px;
    transition: background 0.15s;
    flex-shrink: 0;
  }
  .pilot-badge-wrapper:hover { background: rgba(255,255,255,0.07); }

  /* ============================================================================
     פעמון התראות (Tier 1/2/3) - רכיב עצמאי לגמרי, לא חלק מתג המטיס/ה - צמוד אליו
     מבחוץ (§: "sitting immediately to the right... but not inside it - independently
     clickable, independently styled, its own hit area"). הפאנל משתמש באותה נוסחת
     אנימציה בדיוק כמו pilot-menu/station-menu (scale+translateY+fade,
     cubic-bezier(.34,1.56,.64,1)) ואותה כרומה חזותית (#12151C / #232A36 / 14px / צל כהה)
     ============================================================================ */
  .notif-bell-wrapper { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }

  /* קו עדין ומושתק, לא תו-טקסט "|" - מרווח שווה משני הצדדים (margin-inline סימטרי),
     לא padding בתוך תו טקסט שיוצא לא-אחיד (§: "equal breathing room on both sides") */
  .notif-bell-divider { display: inline-block; width: 1px; height: 16px; background: var(--text-muted, #7A8699); opacity: 0.25; margin-inline: 8px; flex-shrink: 0; }
  .notif-bell-btn {
    position: relative;
    background: none; border: none; cursor: pointer;
    padding: 7px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted, #7A8699);
    transition: background 0.15s, color 0.15s;
  }
  .notif-bell-btn:hover { background: rgba(255,255,255,0.07); color: var(--text-primary, #F5F7FA); }
  /* מעט גדול יותר מהגרסה הקודמת (18px) - עדיין נמדד ב-viewBox יחסי, אז ה-stroke-width
     שכבר מוגדר ב-SVG (1.6) נשאר יחסי לגודל ולא "מתעבה" ככל שהאייקון גדל */
  .notif-bell-icon { width: 21px; height: 21px; transform-origin: 50% 15%; }

  /* צלצול קצר וחד-פעמי בהגעת התראה חדשה - לא אנימציה מתמשכת. סיבוב שכבתי שדועך חזרה
     למנוחה (סטנדרט מקובל בממשקי התראות בשלים - shake once, not forever) */
  @keyframes notifBellRing {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(9deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
    88% { transform: rotate(-1deg); }
  }
  .notif-bell-icon.notif-bell-ring { animation: notifBellRing 0.7s ease-in-out; }

  /* נקודה כתומה קטנה, פינה ימנית-עליונה של הפעמון - פיזית, לא לוגית (מוסכמת badge סטנדרטית
     בכל ממשק, בלי קשר לכיווניות המסמך). כתום תמיד - אין יותר אדום/כתום מותנה-tier */
  .notif-bell-badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--brand-orange, #FF7A29); color: #14171F;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #06070A;
  }

  /* position:fixed + מוקם ב-JS (positionNotifPanel) מה-bounding rect האמיתי של הפעמון -
     לא הנחת offset קבוע ב-CSS ולא יחסית ל-parent (זה מה שכשל פעמיים: אורך שם המטיס/ה
     משתנה, עברית/אנגלית מתנהגות אחרת). ה-JS ממרכז את הפאנל בדיוק על נקודת האמצע
     האופקית של הפעמון עצמו, לא על הקצה שלו - אותה גישה בדיוק כמו הפעמון של Matrix.
     left/top מוזרקים inline ע"י ה-JS, לא מוגדרים כאן */
  .notif-panel {
    position: fixed;
    width: 300px;
    background: #12151C; border: 1px solid #232A36; border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 10px; z-index: 999999;
    opacity: 0;
    transform: scale(0.3) translateY(-8px);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(.34,1.56,.64,1);
  }
  .notif-panel.visible { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }

  .notif-panel-title { font-size: 12px; font-weight: 700; color: #7A8699; text-transform: uppercase; letter-spacing: 0.4px; padding: 4px 6px 8px; text-align: center; }
  /* עד 5 שורות גלויות בו-זמנית (5 × 72px גובה-שורה מינימלי + 4 × 6px מרווח = 384px),
     מעבר לזה גלילה פנימית; ה-overflow:hidden הוא גם התנאי ל-containment של מחוות ה-swipe -
     כלום לא "בורח" מהפאנל. scrollbar מוסתר לגמרי (לא מעוצב) אבל overflow-y:auto נשאר -
     גלילה עדיין עובדת, פשוט בלי פס-גלילה נראה */
  .notif-panel-list {
    display: flex; flex-direction: column;
    max-height: 384px; overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
  }
  .notif-panel-list::-webkit-scrollbar { display: none; } /* Chrome/Safari/Edge */
  .notif-empty { padding: 22px 6px; text-align: center; color: #7A8699; font-size: 13px; opacity: 0.8; }

  /* שורה = יחידת ה-containment של הסוויפ. overflow:hidden כאן (בנוסף לרמת הרשימה) -
     הקלף לעולם לא "בורח" מהגבולות שלו, אפילו לרגע אחד. הרווח בין פריטים הוא margin
     (לא flex gap) בכוונה - כדי שהקריסה בדחייה/נודוד תוכל לאנימציה אותו בעצמה.
     flex-shrink:0 קריטי - בלי זה, flexbox יכול לכווץ את השורה מתחת לגובה-התוכן שלה כשהרשימה
     מוגבלת בגובה (max-height למעלה), וה-overflow:hidden אז חותך טקסט באמצע גליף - "nothing
     should ever render half a Hebrew character" */
  .notif-row { position: relative; overflow: hidden; border-radius: 8px; margin-bottom: 6px; flex-shrink: 0; }
  .notif-row:last-child { margin-bottom: 0; }

  /* שכבת הרקע - שני "חצאים" מלאים-לגובה, לא אייקונים זעירים. ממוקמים ב-inset-inline
     לוגי, לא left/right פיזי - ונקודה שכדאי לתעד כי היא נראית הפוכה למי שחושב על כיוון
     אחד בלבד: הצד שנחשף הוא תמיד *הפוך* מכיוון הגרירה (כרטיס שנגרר ימינה חושף את השמאל -
     "curtain" רגיל), ומכיוון שגם מיפוי הגרירה (isTowardInlineStart) וגם החשיפה הפיזית
     מתהפכים יחד בין RTL/LTR, הכלל הלוגי הבא תקף בשתי הכיוונים בלי שום סניף ב-JS:
     נודוד (snooze) יושב תמיד ב-inset-inline-end, דחייה (dismiss) תמיד ב-inset-inline-start.
     אומת ב-2 הכיוונים לפני שנבנה - ר' הדוח שאושר */
  .notif-swipe-bg {
    position: absolute; inset: 0;
    pointer-events: none;
    border-radius: 8px;
    overflow: hidden;
  }
  .notif-swipe-half {
    position: absolute; inset-block: 0; width: 96px; /* מעט מעבר ל-NOTIF_SWIPE_MAX_DRAG_PX (88) - הצבע+אייקון נחשפים במלואם עד הסף */
    display: flex; align-items: center; justify-content: center;
  }
  .notif-swipe-half-snooze { inset-inline-end: 0; background: rgba(0,200,120,0.18); }
  .notif-swipe-half-dismiss { inset-inline-start: 0; background: rgba(255,59,92,0.16); }
  .notif-swipe-icon { font-size: 28px; line-height: 1; opacity: 0.92; }
  .notif-swipe-icon-dismiss.refused { color: #FF3B5C; }
  .notif-swipe-refused-label {
    position: absolute; inset-inline-start: 40px; top: 50%; transform: translateY(-50%);
    font-size: 11px; font-weight: 700; color: #FF3B5C; opacity: 0; white-space: nowrap;
    transition: opacity 0.15s linear; pointer-events: none;
  }
  .notif-row.notif-swipe-refused .notif-swipe-refused-label { opacity: 1; }
  @keyframes notifSwipeRefusedFlash {
    0%, 100% { color: #FF3B5C; }
    50% { color: #ff8fa3; }
  }
  .notif-swipe-icon-dismiss.notif-swipe-flash { animation: notifSwipeRefusedFlash 0.4s ease; }

  .notif-item {
    position: relative;
    box-sizing: border-box;
    min-height: 72px; /* מספיק לתווית-סוג + שתי שורות טקסט + ריפוד, בלי חיתוך */
    border-radius: 8px; padding: 10px 12px; cursor: pointer;
    /* *** אטום - זה המקור היחיד ל-background של .notif-item ומשתני-המצב שלו (unread/tier1/
       וכו') *** - שכבת הסוויפ (.notif-swipe-bg) מצוירת תמיד במלואה מתחת לכרטיס; אם הכרטיס
       לא אטום לחלוטין בכל מצב, הצבע שמתחתיו נראה - זה בדיוק הבאג שכבר קרה פעם (background
       rgba כמעט-שקוף על .notif-item עצמו) ואז שוב (background rgba על .notif-item-unread,
       ר' דוח "פאנל התראות - 4 תיקונים" שאושר, שהראה שהתיקון הראשון היה נכון אך ישב על הכלל
       הלא-נכון). כדי שזה *מבנית* לא יוכל לקרות שוב: אף כלל .notif-item-* אחר לא רשאי לגעת
       ב-background בכלל - גוון-מצב (unread/tier1 וכו') מיוצג אך ורק דרך box-shadow: inset
       (ר' .notif-item-unread למטה) שמצטייר *מעל* הרקע האטום הזה, לא מחליף אותו. אם מוסיפים
       מצב חדש - inset box-shadow, לעולם לא background/opacity על האלמנט הזה */
    background: #161A22; border: 1px solid transparent;
    font-size: 13px;
    transition: background 1.1s ease, box-shadow 1.1s ease, opacity 0.3s ease;
    touch-action: pan-y; /* גלילה אנכית טבעית של הדפדפן עד שננעל לציר אופקי (ר' JS) */
    user-select: none;
  }
  .notif-item:hover { background: #1c212b; }
  /* לא-נקרא - רקע בהיר יותר מהרקע הרגיל של הפאנל, בולט במבט חטוף; דועך למצב "נקרא"
     כמה שניות אחרי שהפאנל נפתח (ר' openNotificationPanel) - "settling", לא נעלם */
  /* *** אף כלל למטה לא מגדיר background - ר' ההערה המלאה ב-.notif-item למעלה *** - כל גוון
     מצב הוא box-shadow: inset בגודל-ענק (spread 999px ממלא את כל תיבת האלמנט, כמו background,
     אבל מצטייר *מעל* background האטום שכבר קיים, לא מחליף אותו - "structural, not repeated
     per-state") */
  .notif-item-unread { box-shadow: inset 0 0 0 999px rgba(255,255,255,0.13); }
  .notif-item-unread:hover { box-shadow: inset 0 0 0 999px rgba(255,255,255,0.16); }
  .notif-item-tier1 { border-color: #FF7A29; }
  .notif-item-tier1.notif-item-unread { box-shadow: inset 0 0 0 999px rgba(255,122,41,0.18); }
  /* Tier 2/3 - ר' דוח "היפוך פעמון/צ'אט" שאושר. פס-קצה מרוסן (border-inline-start), לא
     גבול מלא/רקע מלא כמו Tier 1 - "restrained... not a filled row", ובמכוון פחות בולט מ-
     Tier 1 כדי שההבחנה "זו שיחה שמחכה לתשובה" תישאר חד-משמעית גם עכשיו שיש הרבה יותר
     פריטים בפאנל. גבול (לא רקע) שומר על ניגודיות זהה מול .notif-item הרגיל ומול
     .notif-item-unread כאחד - שתי הרקעים כהים משמעותית מהצבעים האלה */
  .notif-item-tier2 { border-inline-start: 3px solid var(--danger); }
  .notif-item-tier3 { border-inline-start: 3px solid var(--info); }
  /* *** תוקן - ר' דוח "פאנל התראות - 4 תיקונים" שאושר *** - opacity על .notif-item עצמו
     (לא רק background) הוא אותה מחלקת-באג בדיוק: הופך את *כל האלמנט* לשקוף-חלקית, כולל
     מול שכבת הסוויפ שמתחתיו, לא רק "מדהה" ויזואלית. דהייה של פריט-פתור מוגבלת לתוכן הפנימי
     בלבד - הכרטיס עצמו (הרקע/box-shadow) נשאר אטום במלואו תמיד */
  .notif-item-resolved .notif-item-kind,
  .notif-item-resolved .notif-item-text { opacity: 0.5; }
  .notif-item-kind { font-weight: 700; font-size: 11.5px; color: #7A8699; margin-bottom: 3px; }
  .notif-item-tier1 .notif-item-kind { color: #FF7A29; }
  .notif-item-text { line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }

  /* עוטפת כותרת-קבוצה + (כשמורחב) ילדים - צריכה את אותו מרווח-margin וnon-shrink כמו
     .notif-row עצמו, כי היא יושבת כאחות ישירה שלו בתוך .notif-panel-list (flex column) */
  .notif-group { flex-shrink: 0; margin-bottom: 6px; }
  .notif-group:last-child { margin-bottom: 0; }

  /* קיבוץ - Tier 2/3 בלבד (Tier 1 לעולם לא מקובץ, ר' דוח שאושר: "which one do I click to
     answer" חייב להישאר חד-משמעי). שורת-קבוצה היא toggle טהור - לא מסמנת שום דבר כנקרא/
     פתור, רק פותחת/סוגרת. accordion - ר' expandedGroupLabel ב-JS, קבוצה אחת פתוחה בכל רגע */
  /* אותו כלל כמו .notif-item למעלה - background נקבע כאן בלבד, גוון-מצב (unread) דרך
     box-shadow: inset, לא background. אין שכבת-סוויפ מתחת לשורת-קבוצה, אז זה לא הבאג
     המקורי - אבל "כל משתנה-מצב יורש מקור אחד" חל על כל משפחת .notif-item-*, לא רק על מי שדווח */
  .notif-group-row {
    cursor: pointer; box-sizing: border-box;
    min-height: 72px; border-radius: 8px; padding: 10px 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #161A22;
    transition: background 1.1s ease, box-shadow 1.1s ease;
  }
  .notif-group-row:hover { background: #1c212b; }
  .notif-group-row.notif-item-unread { box-shadow: inset 0 0 0 999px rgba(255,255,255,0.13); }
  .notif-group-row-label { font-weight: 700; font-size: 13px; }
  .notif-group-row-count { color: #7A8699; font-size: 12px; margin-inline-start: 6px; }
  /* הוגדל משמעותית + הובלט - הגרסה הקודמת ירשה font-size מהאב בלי כוונה, בלי אף פעם
     לקבל גודל ייעודי - זו הסיבה שהגדלה "פעם" לא באמת נדבקה. סיבוב-בהרחבה כבר קיים למטה */
  .notif-group-row-chevron { color: #7A8699; font-size: 20px; font-weight: 700; line-height: 1; transition: transform 0.2s ease; flex-shrink: 0; }
  .notif-group-row.expanded .notif-group-row-chevron { transform: rotate(180deg); }

  /* ילדי קבוצה מורחבת - מוזחים, עם קו-מנחה עדין; תווית-הסוג מוחלפת בזמן (Material: "child
     rows omitting duplicate header information once expanded" - הכותרת כבר בשורת הקבוצה) */
  .notif-group-children {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 6px; padding-inline-start: 12px;
    border-inline-start: 2px solid rgba(255,255,255,0.08);
  }

  /* טולטיפ hover עוקב-עכבר - אותו טיפול חזותי בדיוק כמו #tileTooltip בדשבורד (רקע כהה
     שקוף, גבול עדין, 8px רדיוס) - לא המצאה שנייה, שימוש חוזר במוסכמה הקיימת */
  #notifItemTooltip {
    position: fixed; z-index: 9999999; display: none;
    background: rgba(17,18,20,0.92); border: 1px solid #232A36; border-radius: 8px;
    padding: 8px 12px; font-size: 12px; line-height: 1.5; color: #F5F7FA;
    max-width: 260px; pointer-events: none;
  }

  /* תפריט מנהל תורן */
  .pilot-menu {
    position: fixed;
    background: #12151C;
    border: 1px solid rgba(255,122,41,0.2);
    border-radius: 14px;
    padding: 16px 18px;
    min-width: 200px;
    max-width: 320px;
    z-index: 310;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    direction: rtl;
    text-align: center;
    align-items: center;
    opacity: 0;
    transform: translateX(-50%) scale(0.3) translateY(-8px); /* translateX(-50%) ממרכז אמיתית לפי הרוחב בפועל, לא לפי הנחה קבועה */
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(.34,1.56,.64,1);
  }
  .pilot-menu.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    pointer-events: auto;
  }
  /* pilotMenuStationMode/pilotMenuManagerMode הם ה-child היחיד הישיר של pilot-menu בכל מוד -
     אז ה-gap של pilot-menu לא משפיע על מה שבתוכם. מעתיקים את אותה עמודה+gap פנימה */
  #pilotMenuStationMode, #pilotMenuManagerMode {
    display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%;
  }
  .pilot-menu-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; text-align: center; width: 100%; }
  .pilot-menu-divider { height: 1px; background: rgba(255,255,255,0.07); width: 100%; }
  .pilot-menu-manager { font-size: 15px; font-weight: 600; color: #fff; text-align: center; width: 100%; }
  .pilot-menu-phone { font-size: 12px; color: var(--text-muted); direction: ltr; text-align: center; width: 100%; }
  #pilotMenuActivePilots { display: flex; flex-direction: column; gap: 10px; width: 100%; }
  .pilot-menu-active-row { font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; }
  .pilot-menu-emergency {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    background: rgba(255,50,50,0.15); border: 1px solid rgba(255,50,50,0.4);
    color: #ff6b6b; border-radius: 8px; padding: 7px 16px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.15s; width: 100%;
    text-decoration: none; box-sizing: border-box;
  }
  .pilot-menu-emergency:hover { background: rgba(255,50,50,0.28); }
  .pilot-menu-emergency.disabled-link { opacity: 0.5; cursor: not-allowed; }

  /* אותו סגנון בדיוק כמו pilot-menu-emergency, רק בכתום (--brand-orange) במקום אדום -
     לכפתור "שלח הודעת חירום למנהל/ת התורן/ת" בפאנל מצב-מנהל, כדי להבדיל אותו חזותית
     מהכפתור האדום שמעליו (הודעת חירום לכל עמדות הקוקפיט - זה חמור יותר, נשאר אדום) */
  .pilot-menu-manager-msg {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    background: rgba(255,122,41,0.15); border: 1px solid rgba(255,122,41,0.4);
    color: var(--brand-orange); border-radius: 8px; padding: 7px 16px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.15s; width: 100%;
    text-decoration: none; box-sizing: border-box;
  }
  .pilot-menu-manager-msg:hover { background: rgba(255,122,41,0.28); }
  .pilot-menu-manager-msg.disabled-link { opacity: 0.5; cursor: not-allowed; }

  .pilot-on-duty-badge {
    display: inline-flex;
    background: #F5F7FA;
    color: #14171F;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 999px;
    animation: pilotBadgeGlow 2.4s ease-in-out infinite;
  }
  @keyframes pilotBadgeGlow {
    0%, 100% { box-shadow: 0 0 2px 0 rgba(245,247,250,0); }
    50%      { box-shadow: 0 0 14px 4px rgba(245,247,250,0.75); }
  }

  /* --- Flip-Flap (שעון נייר / Solari board) לכל אות בשם המטיס --- */
  .flip-flap-container {
    display: inline-flex;
    direction: rtl;
    perspective: 200px;
  }
  .flip-flap-char {
    position: relative;
    display: inline-block;
    width: 0.68em;
    height: 1.15em;
    margin: 0 0.4px;
  }
  .flip-flap-char .ff-half {
    position: absolute;
    left: 0; right: 0;
    height: 50%;
    overflow: hidden;
    background: #F5F7FA;
  }
  .flip-flap-char .ff-half .ff-glyph {
    position: absolute;
    left: 0; right: 0;
    height: 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #14171F;
    backface-visibility: hidden;
  }
  /* חלק עליון - חצי עליון של האות, "מציץ" מלמעלה */
  .ff-half.ff-top { top: 0; border-radius: 2px 2px 0 0; }
  .ff-half.ff-top .ff-glyph { top: 0; }
  /* חלק תחתון - חצי תחתון של האות, "מציץ" מלמטה */
  .ff-half.ff-bottom { bottom: 0; border-radius: 0 0 2px 2px; }
  .ff-half.ff-bottom .ff-glyph { bottom: 0; }
  /* קו התפר האמצעי העדין, כמו בשעון נייר אמיתי */
  .flip-flap-char::after {
    content: '';
    position: absolute; left: 0; right: 0; top: 50%;
    height: 1px; background: rgba(0,0,0,0.25);
    transform: translateY(-50%);
    z-index: 5;
  }
  /* השכבה שבאמת מסתובבת - העליונה "נופלת" קדימה, התחתונה "נופלת" למקומה */
  .ff-flip-top {
    transform-origin: bottom center;
    animation: ffFlipTop var(--ff-duration, 0.32s) ease-in forwards;
    z-index: 3;
  }
  .ff-flip-bottom {
    transform-origin: top center;
    animation: ffFlipBottom var(--ff-duration, 0.32s) ease-out forwards;
    animation-delay: var(--ff-duration, 0.32s);
    z-index: 2;
  }
  @keyframes ffFlipTop {
    0%   { transform: rotateX(0deg); filter: blur(0); }
    45%  { filter: blur(1.5px); }
    100% { transform: rotateX(-90deg); filter: blur(0); }
  }
  @keyframes ffFlipBottom {
    0%   { transform: rotateX(90deg); filter: blur(0); }
    55%  { filter: blur(1.5px); }
    100% { transform: rotateX(0deg); filter: blur(0); }
  }

  .clock-menu {
    position: fixed;
    background: #12151C;
    border: 1px solid #232A36;
    border-radius: 10px;
    padding: 12px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999999;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    opacity: 0;
    transform: scaleY(0.3);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(.34,1.56,.64,1), width 0.32s ease;
  }
  /* מצב רגיל (לא history) עדיין מוגבל לרוחב המקורי - ה-JS מציב width מפורש (ר' NORMAL_CLOCK_MENU_WIDTH
     ב-app.js) כדי שהאנימציה תהיה חלקה בין המצבים; מצב history מסיר את התקרה כדי לאפשר התרחבות */
  .clock-menu:not(.history-mode) { max-width: 320px; }
  .clock-menu.history-mode { max-width: none; }
  .clock-menu.visible { opacity: 1; transform: scaleY(1); pointer-events: auto; }
  .clock-menu-shift {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-orange);
    text-align: center;
  }
  .clock-menu-history-btn {
    align-self: center;
    width: 110px; /* רוחב קבוע, בולט יותר לצד תווית המשמרת - לא רק לפי תוכן הטקסט */
    background: transparent;
    border: 1px solid #232A36;
    border-radius: 6px;
    color: var(--text-muted);
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 11px;
    padding: 3px 12px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  .clock-menu-history-btn:hover { color: var(--text-primary); border-color: rgba(255,122,41,0.4); }
  .clock-menu-history-btn.active { background: rgba(255,122,41,0.15); color: var(--brand-orange); border-color: rgba(255,122,41,0.5); }
  /* --- שורת הכותרת: היסטוריה + גלגל שיניים. ר' ההערה ב-index.html לגבי direction:ltr --- */
  .clock-menu-header-row {
    display: flex;
    direction: ltr;
    align-self: center;
    align-items: center;
    gap: 6px;
  }
  /* align-self מנוטרל - הכפתור כבר לא ילד ישיר של clock-menu אלא של שורת הכותרת */
  .clock-menu-header-row .clock-menu-history-btn { align-self: auto; }
  /* --- תיקון 1: אייקון בלבד, בלי מסגרת ובלי רקע ---
     בניגוד ל-clock-menu-history-btn שהוא כפתור-טקסט ולכן צריך מסגרת כדי להיקרא ככפתור,
     גלגל שיניים מוכר כפקד מעצם צורתו. המסגרת רק הוסיפה רעש ויזואלי ליד כפתור ההיסטוריה.
     הסימון היחיד למצב הוא הצבע (מושתק / כתום כשפתוח) והסיבוב ב-hover */
  .clock-menu-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 17px;   /* היה 12 - גדול יותר, לפי הבקשה */
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.25s ease;
  }
  .clock-menu-icon-btn:hover { color: var(--text-primary); transform: rotate(45deg); }
  .clock-menu-icon-btn.active { color: var(--brand-orange); transform: rotate(45deg); }

  /* --- פאנל ההגדרות. נסתר עד לחיצה, ונפתח *בתוך* התפריט (ולא כשכבה צפה מעליו) כדי
     שלא יכסה את הלו"ז עצמו ולא ידרוש ניהול מיקום מול גבולות המסך --- */
  .clock-menu-settings {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid #232A36;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    font-family: 'Rubik', sans-serif;
    direction: rtl;
  }
  .clock-menu-settings.visible { display: flex; }
  .clock-menu-settings-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
  }
  .clock-menu-settings-rooms { display: flex; flex-direction: column; gap: 3px; }
  .schedule-room-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
  }
  /* החדר של העמדה עצמה - תמיד מסומן ולא ניתן לביטול (ר' selectForDisplay בשרת) */
  .schedule-room-opt.own { color: var(--text-muted); cursor: default; }
  /* --- תיקון 3: וי מותאם, לא תיבת הסימון של הדפדפן ---
     ה-input האמיתי נשאר ב-DOM (נגישות, מקלדת, ואירוע change קיים) אבל בלתי נראה,
     והריבוע שאחריו הוא מה שנצבע. הווי עצמו מצויר ב-CSS (border בשתי פאות + סיבוב 45°)
     ולא כתו יוניקוד - כדי שהעובי והצבע יהיו שלנו ולא של הפונט */
  .schedule-room-opt input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
  }
  .schedule-room-check {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid #2E3646;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .schedule-room-check::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #0B0E14;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s cubic-bezier(.34,1.56,.64,1);
  }
  .schedule-room-opt input:checked + .schedule-room-check {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
  }
  .schedule-room-opt input:checked + .schedule-room-check::after { transform: rotate(45deg) scale(1); }
  .schedule-room-opt:hover .schedule-room-check { border-color: rgba(255,122,41,0.55); }
  .schedule-room-opt input:focus-visible + .schedule-room-check { box-shadow: 0 0 0 2px rgba(255,122,41,0.45); }
  body.light-theme .schedule-room-check { border-color: rgba(0,0,0,0.2); background: rgba(0,0,0,0.04); }
  body.light-theme .schedule-room-check::after { border-color: #fff; }

  /* --- תיקון 2: החדר של העמדה - מתג הפעלה/כיבוי בלחיצה ---
     *** בכוונה לא וי ולא מתג הזזה *** - שלושת הפקדים בפאנל הזה צריכים להיראות שונה זה מזה,
     כי הם עונים על שלוש שאלות שונות. זה פקד "ראשי" (הלו"ז שלי - הדבר היחיד שהיה מוצג עד
     היום), ולכן הוא שורה שלמה ובולטת עם נורית מצב, ולא תיבה קטנה בשורה */
  .schedule-room-own {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: 1px solid #232A36;
    border-radius: 6px;
    padding: 5px 8px;
    color: var(--text-muted);
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    text-align: start;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .schedule-room-own-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #3A4353;
    transition: background 0.15s ease, box-shadow 0.15s ease;
  }
  .schedule-room-own-state {
    margin-inline-start: auto;
    font-size: 10px;
    font-weight: 700;
  }
  .schedule-room-own:hover { border-color: rgba(255,122,41,0.4); }
  .schedule-room-own.on {
    background: rgba(255,122,41,0.12);
    border-color: rgba(255,122,41,0.5);
    color: var(--brand-orange);
  }
  .schedule-room-own.on .schedule-room-own-dot {
    background: var(--brand-orange);
    box-shadow: 0 0 6px rgba(255,122,41,0.75);
  }
  body.light-theme .schedule-room-own { border-color: rgba(0,0,0,0.12); }
  .clock-menu-settings-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    border-top: 1px solid #232A36;
    padding-top: 6px;
  }
  /* --- תיקון 4: מתג הזזה, שונה משני האחרים ---
     direction:ltr על המסלול עצמו כדי שההזזה תהיה צפויה ולא תלויה ב-RTL של הפאנל */
  .clock-menu-settings-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
  }
  .schedule-switch {
    position: relative;
    width: 34px;
    height: 18px;
    flex-shrink: 0;
    margin-inline-start: auto;
    direction: ltr;
    border: 1px solid #2E3646;
    border-radius: 999px;
    background: #1A1F29;
    transition: background 0.18s ease, border-color 0.18s ease;
  }
  .schedule-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6B7484;
    transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), background 0.18s ease;
  }
  .clock-menu-settings-toggle input:checked + .schedule-switch {
    background: rgba(255,122,41,0.25);
    border-color: var(--brand-orange);
  }
  .clock-menu-settings-toggle input:checked + .schedule-switch::after {
    transform: translateX(16px);
    background: var(--brand-orange);
  }
  .clock-menu-settings-toggle input:focus-visible + .schedule-switch { box-shadow: 0 0 0 2px rgba(255,122,41,0.45); }
  body.light-theme .schedule-switch { border-color: rgba(0,0,0,0.2); background: rgba(0,0,0,0.06); }
  body.light-theme .clock-menu-settings,
  body.light-theme .clock-menu-settings-toggle { border-color: rgba(0,0,0,0.12); }

  /* --- הפרדה בין הלו"ז של העמדה ללו"ז של עמדה אחרת, במצב "מופרד" ---
     קו לבן ב-50% שקיפות, לפי הבקשה. הקו אופקי כי שתי הרשימות מוצגות זו מתחת לזו
     (הלו"ז של העמדה למעלה, החדרים הנוספים מתחתיו) - קו אנכי לא היה מפריד ביניהן */
  .schedule-room-divider {
    height: 1px;
    background: rgba(255,255,255,0.5);
    margin: 10px 0 6px;
  }
  body.light-theme .schedule-room-divider { background: rgba(0,0,0,0.35); }
  .schedule-room-heading {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-orange);
    margin-bottom: 4px;
  }
  /* תג העמדה במצב הממוזג - בלעדיו רשימה מעורבת הופכת דו-משמעית */
  .schedule-room-badge {
    display: inline-block;
    margin-inline-start: 5px;
    padding: 0 5px;
    border-radius: 4px;
    background: rgba(255,122,41,0.15);
    border: 1px solid rgba(255,122,41,0.35);
    color: var(--brand-orange);
    font-size: 9px;
    font-weight: 700;
    vertical-align: middle;
  }
  /* טיימר שרץ בחדר של עמדה אחרת - מסומן, אבל בלי הבלטת ההדגשה של "הטיסה שלי" */
  .schedule-item.active.other-room { opacity: 0.75; }

  .clock-menu-divider { height: 1px; background: #232A36; }

  /* --- שורת התוכן: לו"ז היום (clock-menu-schedule, קבוע ולא משתנה) + עמודות היסטוריה
     שמתווספות מימינו. direction:ltr קובע שהילד הראשון (לו"ז היום) תמיד משמאל/עוגן,
     והעמודות הבאות מתווספות ימינה - בלי תלות בכיווניות RTL הכללית של הדף */
  .clock-menu-content-row {
    display: flex;
    flex-direction: row;
    direction: ltr;
    min-width: 0;
  }
  /* --- תצוגת היסטוריית טיסות: עמודה ליום עבר. "היום" עצמו לא מוצג כאן בכלל - הוא כבר
     קבוע ותמיד גלוי דרך clock-menu-schedule, לא כפילות בתוך העמודות */
  .clock-menu-history-columns {
    display: none;
    direction: ltr;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    max-width: calc(100vw - 60px);
    padding-bottom: 2px;
  }
  .clock-menu.history-mode .clock-menu-history-columns { display: flex; }
  /* המרווח מלו"ז היום מוחל רק כשיש בפועל עמודות עבר להראות - כך שבמצב הביניים הרגעי
     (history-mode כבר פעיל אבל התשובה מהשרת עוד לא הגיעה) אין שום מרווח "רפאים" מיותר */
  .clock-menu-history-columns:not(:empty) { margin-left: 10px; }
  .history-day-column {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .history-day-header {
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
  }
  .history-day-label {
    direction: rtl;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
  }
  /* בתוך header (יחד עם כפתור המחיקה) - צמוד לימין ולא ממורכז, כמו כותרת רגילה לצד אייקון פעולה */
  .history-day-header .history-day-label { text-align: right; }
  .history-day-delete-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .history-day-delete-btn:hover { color: var(--danger); background: rgba(255,59,92,0.12); }
  .history-day-scroll {
    direction: rtl;
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
  }
  .history-day-scroll::-webkit-scrollbar { width: 2px; }
  .history-day-scroll::-webkit-scrollbar-track { background: transparent; }
  .history-day-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
  body.light-theme .history-day-scroll { scrollbar-color: rgba(0,0,0,0.15) transparent; }
  body.light-theme .history-day-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
  body.light-theme .clock-menu-history-btn { border-color: rgba(0,0,0,0.12); }
  .clock-menu-schedule {
    direction: rtl; /* clock-menu-content-row הוא direction:ltr לצורך סדר העמודות - כאן שומרים על כיווניות הטקסט הרגילה */
    flex-shrink: 0;
    /* *** תיקון 6 - מקור פס הגלילה האופקי בתצוגת ההיסטוריה *** - נמדד בדפדפן:
       ל-.clock-menu יש box-sizing:border-box ו-border של 1px בכל צד, ולכן הרוחב שנקבע
       ב-JS כולל גם את 2 הפיקסלים האלה. החישוב הישן (280 פחות ריפוד 12*2 = 256) שכח אותם,
       וכך נותרו לעמודות ההיסטוריה בדיוק 2px פחות ממה שהן צריכות - ומכיוון של-
       .clock-menu-history-columns יש overflow-x:auto, הופיע שם פס גלילה של 2px בכל מספר
       עמודות (נמדד: 1, 3 ו-6 ימים - חריגה של 2.00px בדיוק בכל אחד).
       254 = 280 - 24 ריפוד - 2 גבול. תיקון בשורש, בלי להסתיר את הגלישה ובלי לחתוך תוכן:
       overflow-x:auto נשאר כרשת ביטחון למסכים צרים, אבל כבר אין לו מה להציג. */
    width: 254px; /* = NORMAL_CLOCK_MENU_WIDTH (280) פחות ריפוד (12*2) פחות גבול (1*2) */
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: visible;
    padding-left: 12px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,122,41,0.35) transparent;
  }
  .clock-menu-schedule::-webkit-scrollbar { width: 3px; }
  .clock-menu-schedule::-webkit-scrollbar-track { background: transparent; }
  .clock-menu-schedule::-webkit-scrollbar-thumb {
    background: rgba(255,122,41,0.35);
    border-radius: 3px;
  }
  .clock-menu-schedule::-webkit-scrollbar-thumb:hover { background: rgba(255,122,41,0.6); }
  .schedule-item.active {
    position: relative;
    margin: 4px 0;
    background: #E4E6EA;
    color: #14171F;
    border-radius: 8px;
    padding: 14px 12px;
    border-bottom: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .schedule-item.active .schedule-time { color: #14171F; font-weight: 700; }
  .schedule-item.active .schedule-title { color: #14171F; white-space: normal; text-align: right; font-weight: 700; }
  .schedule-item.active .schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .schedule-live {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 11px;
    margin-top: 2px;
  }
  .schedule-elapsed, .schedule-remaining {
    background: #F0F1F3;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    color: var(--brand-orange);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .clock-menu-placeholder { color: var(--text-muted); font-size: 12px; text-align: center; padding: 10px 0; }
  .schedule-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 4px;
    border-bottom: 1px solid #232A36;
    font-size: 12px;
  }
  .schedule-item:last-child { border-bottom: none; }
  .schedule-time { font-family: 'JetBrains Mono', monospace; color: var(--brand-orange); flex-shrink: 0; }
  .schedule-title { color: var(--text-primary); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.light-theme .schedule-item { border-color: rgba(0,0,0,0.08); }
  body.light-theme .clock-menu { background: #ffffff; border-color: rgba(0,0,0,0.1); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
  body.light-theme .clock-menu-divider { background: rgba(0,0,0,0.1); }
  body.light-theme .clock-menu-placeholder { color: #6B7280; }

  /* מצב יום - תג המטיס מתהפך: רקע כהה, טקסט בהיר, וה-glow הופך מלבן לשחור */
  body.light-theme .pilot-on-duty-badge {
    background: #14171F;
    color: #F5F7FA;
    animation: pilotBadgeGlowLight 2.4s ease-in-out infinite;
  }
  @keyframes pilotBadgeGlowLight {
    0%, 100% { box-shadow: 0 0 2px 0 rgba(20,23,31,0); }
    50%      { box-shadow: 0 0 14px 4px rgba(20,23,31,0.55); }
  }
  /* אותיות ה-flip-flap בתוך התג הופכות אותו דבר - כדי שהאנימציה תישאר עקבית עם צבעי התג */
  body.light-theme .pilot-on-duty-badge .ff-half { background: #14171F; }
  body.light-theme .pilot-on-duty-badge .ff-glyph { color: #F5F7FA; }
  body.light-theme .pilot-on-duty-badge .flip-flap-char::after { background: rgba(255,255,255,0.25); }

  /* מצב יום - תפריט המנהל התורן, אותה קונבנציה כמו שאר התפריטים */
  body.light-theme .pilot-menu { background: #ffffff; border-color: rgba(0,0,0,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
  body.light-theme .pilot-menu-divider { background: rgba(0,0,0,0.1); }
  body.light-theme .pilot-menu-manager { color: #14171F; }
  body.light-theme .pilot-menu-label { color: #6B7280; }
  body.light-theme .pilot-menu-phone { color: #6B7280; }

  .main { position: relative; flex: 1; min-height: 0; }

  .stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0 24px;
    pointer-events: none;
  }
  .orb-wrap { pointer-events: auto; }

  /* אזהרת נחיתת חירום (SPOOF מקורבר ע"י BOND-RF) - §6g/§6i. מוסתר כברירת מחדל, קיים רק
     בזמן חלון האזהרה/הספירה-לאחור הפעיל - לא חלק ממוד ההמתנה הרגיל */
  .spoof-landing-warning {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
  }
  .spoof-landing-warning.visible { display: flex; }

  .spoof-landing-cancel-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 28px;
    border-radius: 22px; /* מעוגל יותר מכפתור סטנדרטי - אושר בתצוגה מקדימה אינטראקטיבית, §6i */
    background: var(--danger); /* צבע האדום המאושר (#E24B4A) קרוב מאוד לטוקן --danger הקיים במוד כהה - נשארים על הטוקן */
    border: 1px solid var(--danger);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif; /* אומת מול body{} הראשי - Rubik אכן הפונט הנכון גם כאן, לא הונח */
    font-size: 22px;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
    /* זוהר אדום קבוע ורציף כל עוד הכפתור מוצג - אושר בתצוגה מקדימה, §6i */
    filter: drop-shadow(0 0 18px rgba(226,75,74,0.55)) drop-shadow(0 0 34px rgba(226,75,74,0.35));
  }
  .spoof-landing-cancel-btn svg { width: 24px; height: 24px; flex-shrink: 0; }

  /* טבעות מתפשטות בסגנון רדאר - שתי טבעות מוסטות ב-0.7 שניות כך שתמיד אחת דועכת כשהשנייה
     מתחילה, אותו אדום כמו הכפתור עצמו - אושר בתצוגה מקדימה, §6i */
  @keyframes spoofLandingRadarPulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
  }
  .spoof-landing-cancel-btn::before,
  .spoof-landing-cancel-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    border: 2px solid rgba(226,75,74,0.8);
    pointer-events: none;
    animation: spoofLandingRadarPulse 1.4s ease-out infinite;
  }
  .spoof-landing-cancel-btn::after { animation-delay: 0.7s; }

  /* משוב לחיצה - אותה טכניקת זוהר אדום/אותו צבע כמו orb-wrap.cancel-glow, מותאם לצורת כפתור
     מלבנית (box-shadow, לא radial-gradient עיגולי) - לא אפקט זוהר חדש, נפרד מהזוהר הקבוע */
  .spoof-landing-cancel-btn.pressed {
    box-shadow: 0 0 4px 2px var(--danger), 0 0 18px 6px rgba(226,75,74,0.55);
  }

  .spoof-landing-countdown {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--danger);
    min-height: 18px;
  }

  .tag-progress {
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,122,41,0.35);
    border-radius: 999px;
    padding: 4px 14px;
    max-width: 90vw;
    min-width: 230px; /* קבוע מראש לפי המקרה הארוך ביותר - "60.00 שניות לאיפוס המערכת" - כדי שהמסגרת לא תזוז כשהמספר משתנה */
    text-align: center;
    box-sizing: border-box;
  }
  .tag-progress.listening-mode { padding: 4px 22px; }
  .tag-stop-btn {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--brand-orange);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: #14171F;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    white-space: nowrap;
    z-index: 2;
  }
  .tag-stop-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
  .tag-progress.listening-mode .tag-stop-btn { display: flex; }
  .tag-progress.listening-mode .tag-label,
  .tag-progress.listening-mode .bar-fill { visibility: hidden; }
  .tag-progress .bar-fill {
    position: absolute;
    top: 0; bottom: 0; right: 0; left: auto;
    width: 0%;
    background: var(--brand-orange);
    transition: width 0.25s linear;
    z-index: 0;
  }
  .tag-progress .tag-label {
    position: relative;
    z-index: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums; /* כל ספרה תופסת אותו רוחב בדיוק - מבטל תנודה קטנה בין 1 ל-8 למשל */
    --fill-pct: 0%;
    background: linear-gradient(to left, #06070A 0%, #06070A var(--fill-pct), var(--brand-orange) var(--fill-pct), var(--brand-orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .message {
    max-width: 640px;
    direction: rtl;
    text-align: center;
    font-size: clamp(20px, 2.6vw, 30px);
    font-weight: 800;
    line-height: 1.5;
    min-height: 80px;
    margin: 0 auto;
  }
  .message.idle-mode {
    max-width: none;
    white-space: nowrap;
    text-align: right;
    min-height: 0;
    line-height: 1.3;
  }
  .message .cursor {
    display: inline-block;
    width: 2px;
    background: var(--brand-orange);
    margin-inline-start: 2px;
    animation: caret 0.9s steps(1) infinite;
  }
  @keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

  .orb-wrap { position: relative; width: 280px; height: 280px; cursor: pointer; }

  /* זוהר אדום סביב הדמות - מופעל כשהוקלטה בוטלה (ביטול ידני/קולי/זיהוי שווא), דועך חזרה בעדינות */
  .orb-wrap.cancel-glow::after {
    content: '';
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,59,92,0.55), transparent 68%);
    opacity: 0;
    transition: opacity 1.1s ease;
    pointer-events: none;
    z-index: -1;
  }
  .orb-wrap.cancel-glow.cancel-glow-active::after { opacity: 1; transition: opacity 0.25s ease; }

  .thinking-arc {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }
  .orb-wrap.thinking-active .thinking-arc {
    opacity: 0.85;
    transform: scale(1);
    animation: thinkingSpin 1.1s linear infinite, thinkingBounce 1.6s ease-in-out infinite;
  }
  @keyframes thinkingSpin {
    from { transform: scale(1) rotate(0deg); }
    to   { transform: scale(1) rotate(360deg); }
  }
  @keyframes thinkingBounce {
    0%, 100% { stroke-width: 3; }
    50%      { stroke-width: 4.5; }
  }

  .halo { position: absolute; inset: -40px; }
  .blob {
    position: absolute;
    width: 60%; height: 60%;
    border-radius: 50%;
    filter: blur(46px);
    opacity: 0.4;
    mix-blend-mode: screen;
    background: radial-gradient(circle, var(--bc), transparent 70%);
    transition: opacity 0.15s ease-out;
  }
  .blob.b1 { top: 6%;  left: 10%; --bc: #5C6BC0; animation: drift1 9s ease-in-out infinite; }
  .blob.b2 { top: 22%; left: 42%; --bc: #4FC3F7; animation: drift2 11s ease-in-out infinite; }
  .blob.b3 { top: 40%; left: 18%; --bc: #26A69A; animation: drift3 13s ease-in-out infinite; }

  @keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(10px,-8px) scale(1.08); } }
  @keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-12px,10px) scale(0.95); } }
  @keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8px,12px) scale(1.05); } }

  .halo.flash-error { animation: errorFlash 0.9s ease-in-out infinite; }
  @keyframes errorFlash { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.9); } }
  .halo.pulse-auto { animation: autoPulse 1.8s ease-in-out infinite; }
  @keyframes autoPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.5); } }

  .face-track { position: absolute; inset: 46px; }
  .face-track.watching { transition: transform 0.75s cubic-bezier(.22,.9,.35,1); }
  .head-gesture {
    position: absolute; inset: 0;
    transform: rotate(0deg) translate(0, 0) scale(1);
    transition: transform 0.4s ease;
  }

  .head-gesture.mood-happy     { animation: gestureNod 0.9s ease-in-out 2; }
  .head-gesture.listening-nod  { animation: gestureNod 1.2s ease-in-out 1; }
  .head-gesture.mood-curious   { transform: rotate(-9deg); }
  .head-gesture.mood-loving    { animation: gestureSway 3s ease-in-out infinite; }
  .head-gesture.mood-question  { animation: gestureWhoosh 0.6s cubic-bezier(.2,.9,.3,1) 1; }
  .head-gesture.mood-thinking  { transform: rotate(7deg) translateY(3px); }
  .head-gesture.mood-mic       { transform: translateY(-4px) scale(1.03); }
  .head-gesture.mood-angry     { animation: gestureJut 0.4s ease-in-out 2; }
  .head-gesture.mood-frustrated{ animation: gestureShake 0.6s ease-in-out 2; }
  .head-gesture.mood-surprised { animation: gesturePop 0.5s ease-out 1; }
  .head-gesture.mood-sleepy    { transform: rotate(5deg) translateY(5px); transition: transform 0.8s ease; }

  @keyframes gestureShake {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-9deg); }
    75%      { transform: rotate(9deg); }
  }
  @keyframes gesturePop {
    0%   { transform: translateY(0) scale(1); }
    40%  { transform: translateY(-7px) scale(1.06); }
    100% { transform: translateY(0) scale(1); }
  }

  @keyframes gestureNod {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(7px); }
  }
  @keyframes gestureSway {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
  }
  @keyframes gestureQuickTilt {
    0%   { transform: rotate(0deg); }
    30%  { transform: rotate(-11deg); }
    65%  { transform: rotate(6deg); }
    100% { transform: rotate(0deg); }
  }
  @keyframes gestureWhoosh {
    0%   { transform: rotate(0deg) translateY(0) scale(1); }
    35%  { transform: rotate(-14deg) translateY(-9px) scale(1.04); }
    70%  { transform: rotate(4deg) translateY(-2px) scale(1.01); }
    100% { transform: rotate(0deg) translateY(0) scale(1); }
  }
  @keyframes gestureJut {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
  }
  .face {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #1b2428, #090f11 72%);
    box-shadow: inset 0 0 36px rgba(0,0,0,0.65), 0 0 34px rgba(0,0,0,0.45);
    animation: breathe 4.5s ease-in-out infinite;
  }
  .orb-wrap.recording .face { animation: breathe 1s ease-in-out infinite; }

  @keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }

  .eyes-track { position: absolute; inset: 0; }
  .eyes-track.watching { transition: transform 0.75s cubic-bezier(.22,.9,.35,1); }
  .eyes {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .orb-wrap.recording .eyes { opacity: 0; transform: scale(0.6); }

  .eye-mood {
    position: absolute;
    top: 46%;
    width: 11px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.35s ease, opacity 0.3s ease;
  }
  .eye-mood.left { left: 37%; }
  .eye-mood.right { left: 55%; }

  .eye-shape {
    width: 11px; height: 26px;
    background: #F5F7FA;
    border-radius: 6px;
    animation: blink 5.5s ease-in-out infinite;
    transition: width 0.35s ease, height 0.35s ease, border-radius 0.35s ease, box-shadow 0.35s ease;
  }

  @keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.08); } }

  .eyes.mood-happy .eye-shape {
    width: 26px; height: 9px; border-radius: 26px 26px 4px 4px;
  }
  .eyes.mood-loving .eye-shape {
    width: 18px; height: 9px; border-radius: 18px 18px 4px 4px;
    box-shadow: 0 0 10px 2px rgba(245,247,250,0.5);
  }
  .eyes.mood-thinking .eye-mood { transform: translate(2px, -6px); }
  .eyes.mood-thinking .eye-shape { width: 9px; }
  .eyes.mood-angry .eye-shape { height: 16px; }
  .eyes.mood-frustrated .eye-shape { height: 14px; border-radius: 6px 6px 10px 10px; }
  .eyes.mood-surprised .eye-shape { width: 14px; height: 30px; border-radius: 14px; }
  .eyes.mood-sleepy .eye-shape { height: 3px; border-radius: 3px; }

  .sleep-z {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #8AB6D6;
    opacity: 0;
  }
  .sleep-z.z1 { top: 8%;  right: -6%;  font-size: 14px; }
  .sleep-z.z2 { top: -6%; right: 6%;   font-size: 18px; }
  .sleep-z.z3 { top: -18%; right: 18%; font-size: 22px; }
  .eyes.mood-sleepy .sleep-z { animation: floatZ 2.6s ease-in infinite; }
  .sleep-z.z2 { animation-delay: 0.5s; }
  .sleep-z.z3 { animation-delay: 1s; }
  @keyframes floatZ {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translate(10px, -22px) scale(1.1); }
  }

  .heart {
    position: absolute;
    color: #FF6B9D;
    opacity: 0;
  }
  .heart.h1 { top: 6%;   left: -12%; font-size: 11px; }
  .heart.h2 { top: 64%;  left: -20%; font-size: 20px; }
  .heart.h3 { top: 84%;  left: 6%;   font-size: 9px;  }
  .heart.h4 { top: -16%; right: 2%;  font-size: 18px; }
  .heart.h5 { top: 38%;  right: -18%; font-size: 12px; }
  .heart.h6 { top: 80%;  right: -8%; font-size: 15px; }

  .eyes.mood-happy .heart { animation-name: floatHeart; animation-timing-function: ease-out; animation-iteration-count: infinite; }
  .heart.h1 { animation-duration: 1.6s; animation-delay: 0s;    --dx: 8px;  --dy: -24px; }
  .heart.h2 { animation-duration: 2.3s; animation-delay: 0.6s;  --dx: -6px; --dy: -30px; }
  .heart.h3 { animation-duration: 1.3s; animation-delay: 1.1s;  --dx: 10px; --dy: -18px; }
  .heart.h4 { animation-duration: 2.0s; animation-delay: 0.25s; --dx: -10px; --dy: -26px; }
  .heart.h5 { animation-duration: 1.8s; animation-delay: 0.85s; --dx: 6px;  --dy: -22px; }
  .heart.h6 { animation-duration: 2.5s; animation-delay: 0.05s; --dx: -8px; --dy: -28px; }

  @keyframes floatHeart {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.35); }
    18%  { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.2)) scale(1); }
    78%  { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1.05); }
    88%  { opacity: 1; transform: translate(var(--dx), calc(var(--dy) * 1.08)) scale(1.4); }
    100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) * 1.1)) scale(0.15); }
  }

  .eyes { perspective: 300px; }

  .eyes.mood-question .eye-mood { opacity: 0; }
  .question-mark {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 40px;
    color: #F5F7FA;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .eyes.mood-question .question-mark { opacity: 1; transform: scale(1); }

  .speed-line {
    position: absolute;
    width: 2px; height: 24px;
    background: linear-gradient(to bottom, transparent, #C7D3E0, transparent);
    opacity: 0;
  }
  .speed-line.s1 { top: -10%; left: 10%;  --rot: -25deg; }
  .speed-line.s2 { top: -6%;  left: 50%;  --rot: 0deg; }
  .speed-line.s3 { top: -10%; left: 82%;  --rot: 25deg; }
  .eyes.mood-question .speed-line { animation: whooshLines 0.6s ease-out; }
  .speed-line.s2 { animation-delay: 0.05s; }
  .speed-line.s3 { animation-delay: 0.1s; }
  @keyframes whooshLines {
    0%   { opacity: 0; transform: translateY(6px) rotate(var(--rot, 0deg)); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-16px) rotate(var(--rot, 0deg)); }
  }

  .eyes.mood-mic .eye-mood { opacity: 0; }
  .ambient-mic {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .eyes.mood-mic .ambient-mic { opacity: 1; transform: scale(1); }

  .mic-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .orb-wrap.recording .mic-icon { opacity: 1; transform: scale(1); }

  .particle { position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0; background: #FFD93D; }
  .orb-wrap.recording .particle { animation: float 1.8s ease-in-out infinite; }
  .particle:nth-child(1) { top: 5%; left: 50%; background: #FFB37A; animation-delay: 0s; }
  .particle:nth-child(2) { top: 20%; left: 88%; background: #4FC3F7; animation-delay: 0.3s; }
  .particle:nth-child(3) { top: 65%; left: 92%; background: #26A69A; animation-delay: 0.6s; }
  .particle:nth-child(4) { top: 90%; left: 60%; background: #FFD93D; animation-delay: 0.9s; }
  .particle:nth-child(5) { top: 80%; left: 10%; background: #5C6BC0; animation-delay: 1.2s; }
  .particle:nth-child(6) { top: 25%; left: 6%; background: #FFB37A; animation-delay: 1.5s; }

  @keyframes float {
    0% { opacity: 0; transform: scale(0.4) translateY(0); }
    50% { opacity: 1; transform: scale(1) translateY(-10px); }
    100% { opacity: 0; transform: scale(0.4) translateY(-20px); }
  }

  .ptt-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .transcript-panel {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 320px;
    border-left: 1px solid #1B2029;
    padding: 8px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    background: rgba(6,7,10,0.35);
  }

  .chat-toggle-btn { display: none; }
  .chat-backdrop { display: none; }


  /* ============================================================================
     טופבר צר - מצב קומפקטי מתחת ל-1000px
     ============================================================================
     *** שורש הבאג *** - .station-info היא position:absolute עם left:50% ו-translate,
     כלומר היא *מחוץ* לזרימת הפלקס לחלוטין. שאר רכיבי הטופבר יושבים בזרימה רגילה עם
     justify-content:flex-end, ובעברית (dir=rtl) זה מצמיד אותם לקצה *הימני* - הם נשארים
     במקום קבוע ולא זזים עם הרוחב. התג הממורכז, לעומת זאת, זז עם מרכז החלון.
     התוצאה: ברוחב שבו מרכז החלון מגיע אל הקבוצה הקבועה, הם פשוט נכנסים זה לתוך זה.
     מיקום אבסולוטי לא דוחף ולא נדחף - אין שום מנגנון שימנע את ההתנגשות.
     נמדד בפועל: החפיפה מתחילה ב-1000px (8px), ומחמירה ל-100px ב-700px.

     *** התיקון: להחזיר את התג לזרימה, לא להזיז אותו ***
     ברגע ש-.station-info היא static, הפלקס עצמו מבטיח שאין חפיפה - זו תכונה של המודל,
     לא כלל שצריך לתחזק. משם, כדי שהכל *ייכנס* בלי לשבור שורה, הרכיבים עוברים למצב
     קומפקטי: השעון מוותר על התאריך והיום ומשאיר שעה בלבד, והמפרידים נעלמים.
     overflow-x:auto הוא רשת ביטחון אחרונה בלבד (למשל שם ארוך במיוחד בחלון צר במיוחד) -
     גלילה אופקית של הסרגל, לא שבירת שורה ולא הסתרת רכיב.

     *** אותו breakpoint של הצ'אט, במכוון *** - 1000px הוא ה-breakpoint היחיד בפרויקט
     (קריסת פאנל הצ'אט לכפתור), וגם הנקודה הגיאומטרית שבה החפיפה מתחילה בפועל. שני
     breakpoints סמוכים היו יוצרים טווח שבו הצ'אט כבר קרס אבל הטופבר עוד לא - בדיוק
     סוג חוסר-העקביות שקשה לאתר אחר כך.
     ============================================================================ */
  @media (max-width: 1000px) {
    /* *** תוקן 28/08 - זה reflow, לא עיצוב מחדש *** - כאן היה קודם justify-content:flex-start
       + padding-inline-start:66px, ששניהם יחד דחסו את כל הרכיבים לצד אחד: נמדד שהשעון נדחף
       מ-32px ל-614px, ותג העמדה סטה עד 387px ממרכז המסך. שניהם נדרשו רק כדי לפנות מקום
       לפעמון ולכפתור הצ'אט בתוך הסרגל - והפעמון כבר לא יושב שם (position:fixed, ר' למטה),
       אז האילוץ המקורי בוטל. חוזרים ליישור של פריסת הרוחב, בלי שינוי.
       overflow-x נשאר כרשת ביטחון לשם מטיס ארוך במיוחד. */
    .topbar {
      gap: 10px;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .topbar::-webkit-scrollbar { display: none; }

    /* *** תוקן 28/08 *** - כאן הוצא התג מהמרכוז המוחלט (position:static) כדי לפתור חפיפה
       מול הפעמון שישב באותו סרגל. הפעמון עבר מאז לפקדים הצפים, והחפיפה כבר לא קיימת -
       ולכן התג חוזר להיות ממורכז למסך בדיוק כמו בפריסת הרוחב, ונע עם מרכז החלון.
       *** לא להחזיר כאן position:static *** בלי לבדוק מחדש חפיפה מול הפעמון. */
    .station-info { gap: 8px; }

    /* *** שינוי מהתיקון הקודם, במכוון *** - עד כה הוסתרו כאן התאריך והיום לגמרי
       ("מצב קומפקטי - שעה בלבד"), כדי לפנות רוחב לתג המטיס. עכשיו הם חוזרים, אבל
       *בערימה אנכית*: שלוש שורות קצרות תופסות פחות רוחב מהשורה האופקית המקורית
       (תאריך | יום | שעה), ולכן המטרה המקורית - רוחב לתג - נשמרת ואף משתפרת.
       המפרידים "|" עדיין מוסתרים: הם מפרידים אופקיים, ובערימה אנכית הם רק רעש.

       *** order מפורש ולא הסתמכות על סדר ה-DOM *** - סדר ה-DOM הוא תאריך→יום→שעה→חץ,
       והדרישה היא שעה→יום→תאריך. אפשר היה להשיג זאת ב-column-reverse, אבל אז גם החץ
       היה מתהפך לראש הערימה. order מפורש אומר את הכוונה במקום להסתמך על תופעת לוואי. */
    .clock-info {
      flex-direction: column;
      align-items: center;
      gap: 3px;          /* מרווח קטן בין השורות כדי שלא ייגעו */
      line-height: 1.15;
    }
    #clock       { order: 1; }
    #dateDay     { order: 2; }
    #dateNum     { order: 3; }
    .clock-info .dropdown-hint { order: 4; line-height: 0.6; }
    /* *** אין כאן שינוי גופן, בכוונה *** - גרסה קודמת הקטינה את התאריך והיום ל-11px
       והחלישה אותם ב-opacity. זו הייתה סטייה מפריסת הרוחב (14px, אטימות מלאה) ולא נדרשה:
       השינוי היחיד בנקודת השבירה הוא *כיוון* הערימה, לא הטיפוגרפיה. */

    .clock-info .clock-sep { display: none; }
    #pilotClockSep { display: none !important; }

    .notif-bell-wrapper,
    .pilot-badge-wrapper,
    .clock-info { flex-shrink: 0; }

    /* *** במכוון בלי חיתוך-שם *** - התג עובר דרך renderFlipFlap, שמחליף את תוכנו
       ב-<div class="flip-flap-char"> לכל אות. כלומר אין בו צומת טקסט כלל:
       text-overflow:ellipsis לא היה משפיע, ו-display:inline-block היה שובר את שורת
       האותיות לערימה אנכית. הרוחב מטופל ע"י overflow-x של הסרגל למעלה, שמספיק בפועל -
       נמדד שהשם הארוך ביותר ברוסטר נכנס במלואו עד 480px.
       ר' renderFlipFlap ב-public/app.js */
    .pilot-badge-wrapper { min-width: 0; }
    /* *** מתחת ל-645px התג *עובר מקום* במקום להיעלם *** - נמדד: השם תופס 117px ומתחיל
       ב-132px (ריפוד 32 + שעון 90 + מרווח 10), כלומר מסתיים ב-249px, בעוד תג העמדה
       הממורכז מתחיל ב-50vw פחות 44.5. מ-645px ומטה השניים נפגשים, ולכן "מימין לשעון"
       (מיקום פריסת הרוחב) כבר אינו אפשרי.
       הפתרון: מעבר לשטח הפנוי שמשמאל לכפתורים הצפים - שם יש רוחב לא מנוצל. זהו שינוי
       *מיקום*, ולכן השם נשאר במלואו ובגופן המלא, בלי שום דחיסה. מעל 645px שום דבר לא
       משתנה: התג נשאר בזרימת הסרגל, מימין לשעון, בדיוק כמו בפריסת הרוחב.
       68 = 16 (מרווח מהקצה, כמו כפתור הצ'אט) + 42 (רוחב הכפתור) + 10 (מרווח ביניהם).
       גובה 42px ומרכוז אנכי כדי שייקרא כחלק מאותה שורה עם כפתור הצ'אט. */
    @media (max-width: 644px) {
      .pilot-badge-wrapper {
        position: fixed;
        top: 16px;
        right: 68px;
        height: 42px;
        align-items: center;
        z-index: 70;
      }
      /* *** כשמגירת הצ'אט פתוחה אין שם מקום *** - היא תופסת min(320px,85vw), ומה שנותר
         צר מהתג + הכפתורים. הוא גם ממילא היה מכוסה על ידה. מוסתר עד לסגירתה. */
      body.chat-open .pilot-badge-wrapper { display: none !important; }
    }

    /* *** הגבול התחתון: 507px *** - נמדד בדפדפן, לא מחושב: העטיפה תופסת 133px (השם 117
       ועוד חץ התפריט ומרווח), כלומר משתרעת מ-(vw פחות 201) עד (vw פחות 68). תג העמדה
       הממורכז מסתיים ב-(vw חלקי 2, ועוד 44.5). הם נפגשים כאשר vw = 491, ועם 8px נשימה
       ב-507. נמדדה חפיפה בפועל של 5.5px ב-480px, ולכן הסף הוא 507 ולא 475.
       מתחת לזה אין על המסך שום מקום שבו השם נכנס בלי לחפוף, ולכן הוא מוסתר. זהו הגבול
       המוצהר ולא הסתרה מוקדמת: בין 507 ל-645 השם מוצג במלואו ובגופן המלא.
       !important כי app.js קובע display inline בזמן ריצה. */
    @media (max-width: 506px) {
      .pilot-badge-wrapper { display: none !important; }
    }

    /* *** באג 1: הרסן ההדרגתי הוסר *** - כאן היה max-width שהצטמצם עם רוחב החלון, והוא
       זה שגרם לדחיסה: נמדד שהשם (117px טבעי) נחתך ל-115px ב-640, ל-35px ב-480 ול-24px
       ב-440 - כלומר הפך לרסיס בלתי קריא במקום להיעלם בכבוד.
       *** הוחלף בכלל "קריא או מוסתר" *** - ר' מדיה-קווארי בסוף הבלוק. עדיף להסתיר את
       התג ברוחב שבו הוא כבר לא נכנס, מאשר להציג שם חתוך ושבור. */
  }

  @media (max-width: 1000px) {
    .transcript-panel {
      position: fixed;
      top: 0; bottom: 0; right: 0; left: auto;
      width: min(320px, 85vw);
      background: #0B0E13;
      box-shadow: -8px 0 30px rgba(0,0,0,0.5);
      transform: translateX(100%);
      transition: transform 0.3s ease;
      z-index: 60;
    }
    .transcript-panel.open { transform: translateX(0); }

    .chat-toggle-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      position: fixed;
      top: 16px;
      right: 16px;
      width: 42px; height: 42px;
      border-radius: 12px;
      background: #12151C;
      border: 1px solid rgba(255,122,41,0.45);
      cursor: pointer;
      z-index: 70;
      transition: right 0.3s ease;
    }
    .chat-toggle-btn.open {
      right: calc(min(320px, 85vw) + 16px);
    }
    .chat-toggle-btn svg { width: 20px; height: 20px; }
    .chat-toggle-btn .icon-close { display: none; }
    .chat-toggle-btn.open .icon-chat { display: none; }
    .chat-toggle-btn.open .icon-close { display: block; }

    /* =====================================================================
       הפעמון עובר מהטופבר לקבוצת הפקדים הצפים - ישירות מתחת לכפתור הצ'אט
       =====================================================================
       *** הצמדה לכפתור הצ'אט, לא מיקום עצמאי *** - אותם ערכי right בדיוק ואותו
       transition כמו .chat-toggle-btn למעלה, כך שכשהמגירה נפתחת השניים נעים כגוף אחד
       ונשארים מוערמים. שכפול הערך ולא משתנה משותף - כדי שהקריאה כאן תהיה עצמאית, אבל
       *** אם משנים את רוחב המגירה יש לעדכן את שני המקומות ***.

       body.chat-open ולא .chat-toggle-btn.open - הפעמון אינו צאצא של הכפתור, ולכן
       המצב חייב לשבת על אב משותף. ר' openChatDrawer/closeChatDrawer ב-app.js. */
    .notif-bell-wrapper {
      position: fixed;
      top: 68px;        /* 16 (top של כפתור הצ'אט) + 42 (גובהו) + 10 (מרווח בין השניים) */
      right: 16px;
      z-index: 70;
      transition: right 0.3s ease;
    }
    body.chat-open .notif-bell-wrapper { right: calc(min(320px, 85vw) + 16px); }

    /* אותה שפה ויזואלית בדיוק כמו כפתור הצ'אט - ריבוע 42px, אותה פינה, אותו רקע ומסגרת.
       בטופבר הפעמון היה אייקון-בלבד עגלגל; כאן הוא חצי מזוג מוערם וחייב להיקרא כמותו */
    .notif-bell-btn {
      width: 42px;
      height: 42px;
      padding: 0;
      border-radius: 12px;
      background: #12151C;
      border: 1px solid rgba(255,122,41,0.45);
      color: var(--text-primary);
    }
    .notif-bell-btn:hover { background: #171B24; color: var(--text-primary); }
    .notif-bell-icon { width: 20px; height: 20px; }   /* כמו ה-svg של כפתור הצ'אט */
    /* המפריד היה הפרדה *בתוך* הטופבר - חסר משמעות כשהפעמון כבר לא שם */
    .notif-bell-divider { display: none !important; }

    /* הפאנל נפתח שמאלה ולא למטה (המיקום עצמו ב-positionNotifPanel) - כאן רק כיוון
       האנימציה, כדי שהיא תצא מהפעמון ולא מהאוויר */
    .notif-panel {
      transform-origin: right center;
      transform: scale(0.3) translateX(8px);
      /* לא לחרוג ממסך צר מאוד - ר' גם הנפילה המבוקרת ב-positionNotifPanel */
      width: min(300px, calc(100vw - 16px));
    }
    .notif-panel.visible { transform: scale(1) translateX(0); }

    .chat-tooltip {
      position: absolute;
      top: 50%;
      right: 52px;
      transform: translateY(-50%) scale(0);
      transform-origin: right center;
      background: #12151C;
      border: 1px solid rgba(255,122,41,0.45);
      color: var(--text-primary);
      font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
      font-size: 11px;
      white-space: nowrap;
      padding: 7px 12px;
      border-radius: 8px;
      opacity: 0;
      transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
      pointer-events: none;
    }
    .chat-tooltip::after {
      content: '';
      position: absolute;
      top: 50%; right: -5px;
      transform: translateY(-50%) rotate(45deg);
      width: 9px; height: 9px;
      background: #12151C;
      border-right: 1px solid rgba(255,122,41,0.45);
      border-top: 1px solid rgba(255,122,41,0.45);
    }
    .chat-toggle-btn:hover .chat-tooltip { opacity: 1; transform: translateY(-50%) scale(1); }
    .chat-toggle-btn.open .chat-tooltip { display: none; }

    .chat-backdrop {
      display: block;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 55;
    }
    .chat-backdrop.visible { opacity: 1; pointer-events: auto; }
  }

  .transcript-logo { display: flex; justify-content: center; margin-bottom: 10px; }
  .transcript-logo img { height: 40px; width: auto; object-fit: contain; opacity: 0.9; }

  @media (min-width: 1001px) {
    .transcript-logo {
      position: fixed;
      top: 18px;
      right: 0;
      width: 320px;
      margin-bottom: 0;
      pointer-events: none;
      z-index: 10;
    }
    .transcript-panel { padding-top: 56px; }
  }
  .transcript-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  .transcript-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
  }
  .export-btn {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--brand-orange);
    background: transparent;
    border: 1px solid rgba(255,122,41,0.4);
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
  }
  .export-btn:hover { background: rgba(255,122,41,0.12); }
  .transcript-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
  .bubble { position: relative; max-width: 88%; padding: 10px 14px 10px 26px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
  .bubble.assistant { align-self: flex-end; background: var(--bubble-assistant); border: 1px solid #232A36; border-bottom-left-radius: 4px; }
  .bubble.pilot { align-self: flex-start; background: var(--bubble-pilot); border: 1px solid #33291a; border-bottom-right-radius: 4px; color: #FFD9A0; }
  .bubble .time { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); margin-top: 4px; }
  .bubble.error-bubble { border-color: rgba(255,59,92,0.5); }
  .bubble-menu-btn {
    position: absolute; top: 4px; left: 4px;
    background: transparent; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 4px;
  }
  .bubble-menu {
    display: none;
    position: absolute; top: 22px; left: 4px;
    background: #1A1E27; border: 1px solid #2A3140; border-radius: 8px;
    z-index: 5; overflow: hidden;
  }
  .bubble-menu.open { display: block; }
  .bubble-menu button {
    display: block; width: 100%; padding: 6px 12px;
    background: none; border: none; color: var(--text-primary);
    font-size: 12px; text-align: right; cursor: pointer;
  }
  .bubble-menu button:hover { background: #232A36; }

  .text-input-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    align-items: center;
  }
  .text-input-row input {
    flex: 1;
    height: 38px;
    box-sizing: border-box;
    background: #12151C;
    border: 1px solid #232A36;
    border-radius: 10px;
    padding: 0 12px;
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    outline: none;
  }
  .text-input-row input::placeholder { color: #565F6E; }
  .text-input-row input:focus { border-color: #3B82F6; }
  .send-btn {
    background: rgba(59,130,246,0.35);
    border: 1px solid rgba(59,130,246,0.5);
    border-radius: 10px;
    width: 38px; height: 38px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }
  .send-btn:hover { background: rgba(59,130,246,0.5); }
  .send-btn svg { width: 16px; height: 16px; }

  .measurer {
    position: absolute;
    visibility: hidden;
    white-space: nowrap;
    top: -9999px;
    left: -9999px;
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
  }

  @media (prefers-reduced-motion: reduce) {
    .blob, .face, .particle, .status-dot { animation: none; }
  }

  /* --- רחפנים ברקע --- */
  .drone-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .drone-wrap {
    position: absolute;
    left: 0; top: 0;
    width: 62px; height: 40px;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    opacity: 0;
  }
  .drone-svg { width: 100%; height: 100%; overflow: visible; }
  .drone-prop-blade {
    animation: spinProp 0.1s linear infinite;
    transform-box: fill-box;
    transform-origin: center;
  }
  @keyframes spinProp { to { transform: rotate(360deg); } }

  .login-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    padding: 0 8vw;
    box-sizing: border-box;
    background: linear-gradient(135deg, #1a2230 0%, #0d1117 100%);
    opacity: 1;
    transition: opacity 0.55s ease;
  }
  .login-overlay.hidden { display: none; }
  .login-overlay.completing { opacity: 0; pointer-events: none; }
  .login-overlay.completing .login-box {
    animation: loginBoxZoomOut 0.55s cubic-bezier(.4,0,.2,1) forwards;
  }
  @keyframes loginBoxZoomOut {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0; }
  }

  .login-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2.5s ease;
  }
  .login-bg-slide.active { opacity: 1; }
  .login-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 45%, transparent 70%);
  }
  .login-credit {
    position: absolute;
    bottom: 16px;
    left: 20px;
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    font-family: 'Rubik', sans-serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  }

  .login-box {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 340px;
    background: #ffffff;
    border-radius: 14px;
    padding: 34px 32px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
  }
  .login-logo { height: 34px; width: auto; object-fit: contain; align-self: flex-start; margin-bottom: 6px; }
  .login-title { font-family: 'Rubik', sans-serif; color: #14171F; font-size: 21px; font-weight: 700; margin-bottom: 10px; }

  .login-orby {
    position: absolute;
    top: -108px;
    left: 50%;
    width: 72px;
    height: 72px;
    animation: loginOrbyFloat 3.2s ease-in-out infinite;
  }
  @keyframes loginOrbyFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-7px); }
  }
  .login-orby-body {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #2a2f3a, #12151c 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(.22,.9,.35,1);
    animation: miniOrbyIdlePulse 2.6s ease-in-out infinite;
  }
  .login-orby-eyes { display: flex; gap: 11px; transition: transform 0.15s ease; }
  .login-eye {
    width: 7px; height: 15px;
    background: #F5F7FA;
    border-radius: 4px;
    animation: miniOrbyBlink 4.5s ease-in-out infinite;
  }

  .login-orby-hand {
    position: absolute;
    bottom: -6px;
    font-size: 20px;
    line-height: 1;
    opacity: 0;
    transform: translateY(-10px) scale(0.5);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.34,1.4,.6,1);
  }
  .login-orby-hand.left { left: -6px; }
  .login-orby-hand.right { right: -6px; transform: scaleX(-1) translateY(-10px) scale(0.5); }

  .login-orby.gesturing .login-orby-hand { opacity: 1; }
  .login-orby.gesturing .login-orby-hand.left { animation: handBobLeft 1s ease-in-out infinite; }
  .login-orby.gesturing .login-orby-hand.right { animation: handBobRight 1s ease-in-out infinite; }
  @keyframes handBobLeft {
    0%, 100% { transform: translateY(2px) scale(1); }
    50%      { transform: translateY(9px) scale(1); }
  }
  @keyframes handBobRight {
    0%, 100% { transform: scaleX(-1) translateY(2px) scale(1); }
    50%      { transform: scaleX(-1) translateY(9px) scale(1); }
  }

  .login-orby.gesturing .login-orby-body { transform: translateY(3px); }
  .login-orby.gesturing .login-orby-eyes { transform: translateY(4px) !important; }
  .login-orby.success .login-orby-body {
    animation: loginOrbyHappyBounce 0.6s ease-in-out !important;
  }
  @keyframes loginOrbyHappyBounce {
    0%, 100% { transform: scale(1); }
    30%      { transform: scale(1.12) translateY(-6px); }
    60%      { transform: scale(0.96); }
  }

  .login-eye.left.winking {
    animation: loginOrbyWink 0.55s ease-in-out 1;
    transform-origin: center bottom;
  }
  @keyframes loginOrbyWink {
    0%   { transform: scaleY(1) scaleX(1); border-radius: 4px; }
    35%  { transform: scaleY(0.15) scaleX(1.35) translateY(3px); border-radius: 50% 50% 60% 60% / 90% 90% 30% 30%; }
    65%  { transform: scaleY(0.15) scaleX(1.35) translateY(3px); border-radius: 50% 50% 60% 60% / 90% 90% 30% 30%; }
    100% { transform: scaleY(1) scaleX(1); border-radius: 4px; }
  }
  .login-orby.head-tilt .login-orby-body {
    animation: loginOrbyHeadTilt 0.55s ease-in-out 1, miniOrbyIdlePulse 2.6s ease-in-out infinite;
  }
  @keyframes loginOrbyHeadTilt {
    0%   { transform: rotate(0deg); }
    35%  { transform: rotate(-10deg); }
    65%  { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
  }

  .eye-mood.left.winking .eye-shape {
    animation: loginOrbyWink 0.55s ease-in-out 1 !important;
    transform-origin: center bottom;
  }
  .head-gesture.head-tilt {
    animation: loginOrbyHeadTilt 0.55s ease-in-out 1;
  }

  .google-signin-container { width: 100%; display: flex; justify-content: center; min-height: 40px; }
  .login-social-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    padding: 11px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
    box-sizing: border-box;
  }
  .login-social-btn:hover { background: #f7f7f8; }
  .login-social-btn svg { width: 18px; height: 18px; }

  .login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: #9AA0A6;
    font-size: 12px;
    margin: 4px 0;
  }
  .login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E4E6EA;
  }

  .login-input {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    padding: 12px 14px;
    color: #14171F;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: 'Rubik', sans-serif;
  }
  .login-input:focus { border-color: var(--brand-orange); }
  .login-input::placeholder { color: #9AA0A6; }

  .login-submit {
    width: 100%;
    background: var(--brand-orange);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.1s ease;
    margin-top: 4px;
  }
  .login-submit:hover { filter: brightness(1.08); }
  .login-submit:active { transform: scale(0.98); }
  .login-error {
    background: #FEECEC;
    color: #d93025;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    font-family: 'Rubik', sans-serif;
    border-radius: 8px;
    padding: 0 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.3s ease, padding 0.3s ease;
  }
  .login-error.visible {
    max-height: 40px;
    opacity: 1;
    padding: 9px 12px;
    transform: translateY(0);
  }
  .login-box.shake { animation: stillThereShake 0.4s ease-in-out; }
  .inactivity-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
  }
  .inactivity-overlay.visible { display: flex; }
  .inactivity-box {
    background: var(--surface);
    border: 1px solid #232A36;
    border-radius: 16px;
    padding: 32px 36px;
    width: 340px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
  }
  body.light-theme .inactivity-box { border-color: rgba(0,0,0,0.1); }
  .inactivity-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 22px;
  }
  .inactivity-actions { display: flex; gap: 12px; }
  .inactivity-btn {
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
  }
  .inactivity-btn.yes { background: var(--brand-orange); color: #1a1005; }
  .inactivity-btn.no { background: rgba(255,59,92,0.12); border: 1px solid rgba(255,59,92,0.4); color: #ff6b6b; }

  .slide-confirm { display: none; }
  .slide-confirm.visible { display: block; }
  .slide-track {
    position: relative;
    height: 46px;
    background: rgba(255,122,41,0.1);
    border: 1px solid rgba(255,122,41,0.35);
    border-radius: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
  }
  .slide-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
  }
  .slide-handle {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: #1a1005;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    cursor: grab;
    touch-action: none;
  }
  .slide-handle.dragging { cursor: grabbing; }

  .still-there-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(10px);
  }
  .still-there-overlay.visible { display: flex; }
  /* clock-menu יושב על z-index גבוה מאוד (999999) כדי לצוף מעל שאר הממשק - כשההתראה הזו
     נפתחת מעל תפריט השעון הפתוח (לחיצה על מחיקת יום היסטוריה), חייבים z-index גבוה יותר
     כדי שהיא באמת תכסה אותו ולא תיראה "מתחת" לו */
  #flightHistoryDeleteOverlay { z-index: 1000000; }
  .still-there-box {
    position: relative;
    background: var(--surface);
    border: 1px solid #232A36;
    border-radius: 16px;
    padding: 32px 30px;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
  }

  .mini-orby {
    position: absolute;
    top: -64px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
  }
  .mini-orby-body {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #2a2f3a, #12151c 75%);
    box-shadow: 0 0 18px 4px rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(.22,.9,.35,1), box-shadow 0.3s ease;
    animation: miniOrbyIdlePulse 2.6s ease-in-out infinite;
  }
  @keyframes miniOrbyIdlePulse {
    0%, 100% { box-shadow: 0 0 6px 1px rgba(255,255,255,0.05); }
    50%      { box-shadow: 0 0 24px 8px rgba(255,255,255,0.35); }
  }
  .mini-orby-eyes {
    display: flex;
    gap: 9px;
    transition: transform 0.15s ease;
  }
  .mini-eye {
    width: 6px; height: 12px;
    background: #F5F7FA;
    border-radius: 3px;
    transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease;
    animation: miniOrbyBlink 4.5s ease-in-out infinite;
  }
  .mini-eye.right { animation-delay: 0.05s; }
  @keyframes miniOrbyBlink {
    0%, 92%, 100% { transform: scaleY(1); }
    95%           { transform: scaleY(0.08); }
  }
  .mini-orby-wave {
    position: absolute;
    top: -6px;
    left: -18px;
    font-size: 20px;
    opacity: 0;
    transform-origin: bottom center;
  }

  .mini-orby.frustrated .mini-orby-body,
  .mini-orby.confirmed .mini-orby-body,
  .mini-orby.waving .mini-orby-body {
    animation: none;
  }
  .mini-orby.confirmed .mini-orby-body {
    box-shadow: 0 0 24px 7px rgba(0,212,106,0.6);
  }
  .mini-orby.frustrated .mini-orby-body {
    box-shadow: 0 0 22px 6px rgba(255,59,92,0.55);
    animation: miniOrbyShake 0.4s ease-in-out;
  }
  .mini-orby.frustrated .mini-eye { height: 5px; border-radius: 2px; }
  @keyframes miniOrbyShake {
    0%, 100% { transform: rotate(0deg); }
    20%      { transform: rotate(-12deg); }
    40%      { transform: rotate(10deg); }
    60%      { transform: rotate(-8deg); }
    80%      { transform: rotate(5deg); }
  }

  .mini-orby.waving .mini-orby-wave {
    opacity: 1;
    animation: miniOrbyWave 0.6s ease-in-out infinite;
  }
  .mini-orby.waving .mini-eye { height: 6px; border-radius: 50%; }
  @keyframes miniOrbyWave {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(25deg); }
  }

  .mini-orby.popping .mini-orby-body {
    animation: miniOrbyPop 0.35s ease-out forwards;
  }
  @keyframes miniOrbyPop {
    0%   { transform: scale(1); opacity: 1; }
    18%  { transform: scale(1.2); opacity: 1; }
    40%  { transform: scale(1.35); opacity: 0.5; }
    100% { transform: scale(0.2); opacity: 0; }
  }
  .mini-orby-particle {
    position: absolute;
    top: 50%; left: 50%;
    width: 7px; height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(160,210,255,0.5) 55%, rgba(160,210,255,0) 80%);
    pointer-events: none;
    animation: miniOrbyParticleFly 0.6s cubic-bezier(.2,.7,.4,1) forwards;
  }
  @keyframes miniOrbyParticleFly {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--px), var(--py)) scale(0.15); opacity: 0; }
  }

  body.light-theme .mini-orby-body { background: radial-gradient(circle at 35% 30%, #ffffff, #e4e7eb 75%); }
  body.light-theme .mini-eye { background: #14171F; }

  .still-there-box.shake { animation: stillThereShake 0.4s ease-in-out; }
  @keyframes stillThereShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-10px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(4px); }
  }
  .still-there-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
  }
  .still-there-buttons { display: flex; gap: 12px; width: 100%; }
  .still-there-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid;
  }
  .still-there-btn svg { width: 16px; height: 16px; }
  .still-there-btn.yes { background: #ffffff; border-color: #ffffff; color: #14171F; }
  .still-there-btn.yes:hover { background: #EEEEEE; }
  .still-there-btn.no { background: rgba(255,59,92,0.12); border-color: rgba(255,59,92,0.4); color: var(--danger); }

  .still-there-slider-wrap { display: none; width: 100%; }
  .still-there-slider-wrap.visible { display: block; }
  .still-there-slider-track {
    position: relative;
    width: 100%;
    height: 50px;
    background: #0B0E13;
    border: 1px solid #232A36;
    border-radius: 25px;
    overflow: hidden;
  }
  .still-there-slider-fill {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 50px;
    background: rgba(0,212,106,0.22);
    border-radius: 25px;
  }
  .still-there-slider-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
  }
  .still-there-slider-handle {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--safe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    user-select: none;
    direction: ltr;
  }
  .still-there-slider-handle.dragging { cursor: grabbing; }
  body.light-theme .still-there-box { background: #ffffff; border-color: rgba(0,0,0,0.1); }
  body.light-theme .still-there-slider-track { background: #F0F1F3; border-color: rgba(0,0,0,0.1); }
  body.light-theme .still-there-btn.yes { background: #F4F5F7; border-color: rgba(0,0,0,0.15); }
  .help-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .help-btn:hover { background: rgba(255,255,255,0.22); transform: translateY(-1px); }
  .help-btn svg { width: 17px; height: 17px; }

  .help-panel {
    position: absolute;
    top: 70px;
    right: 24px;
    z-index: 4;
    width: 420px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    opacity: 0;
    transform: scale(0.85) translateY(-14px);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.34,1.4,.6,1);
  }
  .help-panel.visible { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
  .help-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #EEEFF2;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #14171F;
  }
  .help-close-btn { background: none; border: none; cursor: pointer; font-size: 14px; color: #9AA0A6; }
  .help-panel-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 16px; }
  .help-item { display: flex; gap: 12px; align-items: flex-start; opacity: 0; transform: translateY(8px); animation: helpItemIn 0.4s ease forwards; }
  .help-item:nth-child(1) { animation-delay: 0.05s; }
  .help-item:nth-child(2) { animation-delay: 0.12s; }
  .help-item:nth-child(3) { animation-delay: 0.19s; }
  .help-item:nth-child(4) { animation-delay: 0.26s; }
  .help-item:nth-child(5) { animation-delay: 0.33s; }
  .help-item:nth-child(6) { animation-delay: 0.40s; }
  .help-item:nth-child(7) { animation-delay: 0.47s; }
  .help-item:nth-child(8) { animation-delay: 0.54s; }
  @keyframes helpItemIn { to { opacity: 1; transform: translateY(0); } }
  .help-item-icon { font-size: 20px; flex-shrink: 0; }
  .help-item-title { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 13px; color: #14171F; margin-bottom: 2px; }
  .help-item-text { font-family: 'Rubik', sans-serif; font-size: 12px; color: #6B7280; line-height: 1.5; }
  .help-feedback {
    padding: 14px 18px 18px;
    border-top: 1px solid #EEEFF2;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .help-feedback-title { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 12px; color: #14171F; }
  .help-feedback-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #14171F;
    resize: none;
    outline: none;
  }
  .help-feedback-input:focus { border-color: var(--brand-orange); }
  .help-feedback-submit {
    background: var(--brand-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
  }
  .help-feedback-submit:hover { filter: brightness(1.08); }
  .help-feedback-success {
    display: none;
    text-align: center;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #16A34A;
    font-weight: 600;
  }
  .help-feedback-success.visible { display: block; }

  /* באנר "צבע אדום" - יושב מעל הווידג'ט של FH2 (18px/420px/36px משוכפלים בכוונה, בלי
     קריאה בפועל ל-DOM שלו - אותו פתרון שכבר קיים ב-night-mode-btn/label למטה) עם z-index
     גבוה משלו כדי שלעולם לא יכוסה, גם במצב מורחב. אדום עדין (שקיפות על --danger), לא זועק -
     זה יושב בפינת מסך שמטיסים מסתכלים עליו כל היום */
  .tzeva-adom-banner {
    position: fixed;
    bottom: 82px;
    left: 18px;
    z-index: 90;
    width: min(420px, calc(100vw - 36px));
    box-sizing: border-box;
    background: rgba(255,59,92,0.14);
    border: 1px solid rgba(255,59,92,0.4);
    border-radius: 12px;
    padding: 9px 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    display: none;
  }
  .tzeva-adom-banner.visible, .tzeva-adom-banner.leaving { display: block; }
  .tzeva-adom-banner.visible { animation: tzevaAdomSlideIn 0.4s cubic-bezier(.2,.8,.3,1) forwards; }
  .tzeva-adom-banner.leaving { animation: tzevaAdomSlideOut 0.4s cubic-bezier(.5,0,.8,.2) forwards; }
  @keyframes tzevaAdomSlideIn {
    0%   { transform: translateX(-120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }
  @keyframes tzevaAdomSlideOut {
    0%   { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-120%); opacity: 0; }
  }
  .tzeva-adom-banner-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 4px;
  }
  .tzeva-adom-banner-list { display: flex; flex-direction: column; gap: 3px; }
  .tzeva-adom-banner-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: var(--text-primary);
  }
  .tzeva-adom-banner-item .site-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tzeva-adom-banner-item .alert-type { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
  body.light-theme .tzeva-adom-banner { background: rgba(224,67,61,0.10); border-color: rgba(224,67,61,0.35); }

  .fh2-widget {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 80;
    background: rgba(18,21,28,0.92);
    border: 1px solid #232A36;
    border-radius: 12px;
    padding: 9px 14px;
    width: min(420px, calc(100vw - 36px));
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    box-sizing: border-box;
  }

  /* כפתור מוד ערנות למשמרת לילה - עגול, מערכת עצמאית לגמרי, לא תלוי ב-JS או ב-DOM
     של הטלמטריה בשום צורה. המיקום מחושב ב-CSS טהור (משוכפל מאותם מספרים שהטלמטריה
     משתמשת בהם למיקום שלה - 18px/420px/36px - אבל בלי שום קריאה בפועל לרכיב שלה) */
  .night-mode-btn {
    position: fixed;
    bottom: 34px;
    left: calc(18px + min(420px, calc(100vw - 36px)) + 45px);
    z-index: 80;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255,122,41,0.45);
    color: var(--brand-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .night-mode-btn svg { width: 20px; height: 20px; }
  .night-mode-btn.active {
    background: #ffffff;
    color: #14171F;
    border-color: #ffffff;
  }

  /* קונפטי - ירחים וכוכבים קטנים שיוצאים מהכפתור ברגע ההדלקה */
  .night-mode-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
  }
  .confetti-particle {
    position: absolute;
    top: 50%; left: 50%;
    line-height: 1;
    pointer-events: none;
    animation: confettiFly 1s cubic-bezier(.2,.7,.3,1) forwards;
    will-change: transform, opacity, filter;
  }
  @keyframes confettiFly {
    0%   { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; filter: blur(0); }
    60%  { filter: blur(1px); }
    100% { transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))) rotate(var(--rot, 180deg)) scale(0.3); opacity: 0; filter: blur(0); }
  }

  /* תווית "מוד עירנות דולק" - צומחת מכיוון הכפתור ימינה, ונסוגה בחזרה מאחוריו */
  .night-mode-label {
    position: fixed;
    bottom: 34px;
    /* אותה נקודת התחלה בדיוק כמו הכפתור - לא מוזז ימינה ממנו, כדי שהכפתור "יכסה" את
       הקצה השמאלי המעוגל של הפילה ויראה כאילו הוא חלק פיזי ממנה */
    left: calc(18px + min(420px, calc(100vw - 36px)) + 45px);
    z-index: 78;
    background: #ffffff;
    color: #14171F;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    /* ריווח שמאלי גדול יותר - מפצה על השטח שהכפתור העגול מכסה מעליו */
    padding: 10px 18px 10px 52px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    /* חשיפה מאחורי הכפתור - לא scale של הצורה כולה, אלא "חיתוך" שנפתח משמאל לימין,
       בדיוק כמו מגירה שנשלפת מאחורי נקודה קבועה */
    clip-path: inset(0 100% 0 0);
    filter: blur(0);
    pointer-events: none;
  }
  .night-mode-label.entering {
    animation: nightLabelIn 0.45s cubic-bezier(.2,.8,.3,1) forwards;
  }
  .night-mode-label.leaving {
    animation: nightLabelOut 0.45s cubic-bezier(.5,0,.8,.2) forwards;
  }
  @keyframes nightLabelIn {
    0%   { clip-path: inset(0 100% 0 0); filter: blur(4px); }
    70%  { filter: blur(1px); }
    100% { clip-path: inset(0 0% 0 0); filter: blur(0); }
  }
  @keyframes nightLabelOut {
    0%   { clip-path: inset(0 0% 0 0); filter: blur(0); }
    30%  { filter: blur(1px); }
    100% { clip-path: inset(0 100% 0 0); filter: blur(4px); }
  }

  /* יד שמצביעה על כפתור מוד הלילה, עם ניענוע למעלה-למטה, כשאורבי ממליץ להדליק אותו */
  .night-mode-pointer {
    position: fixed;
    bottom: 82px; /* מעל הכפתור (bottom:34px + גובה 42px + רווח קטן) */
    left: calc(18px + min(420px, calc(100vw - 36px)) + 45px);
    width: 42px;
    text-align: center;
    font-size: 26px;
    z-index: 82;
    display: none;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  }
  .night-mode-pointer.visible {
    display: block;
    animation: nightPointerBounce 0.9s ease-in-out infinite;
  }
  @keyframes nightPointerBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(10px); }
  }

  /* מדריך אינטראקטיבי */
  .tour-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: rgba(255,122,41,0.14);
    border: 1px solid rgba(255,122,41,0.4);
    color: var(--brand-orange);
    border-radius: 10px;
    padding: 11px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.15s ease;
  }
  .tour-start-btn:hover { background: rgba(255,122,41,0.24); }

  /* מקבל קליק על טיימר פעיל בתפריט הלו"ז */
  .schedule-item.clickable-map-trigger { cursor: pointer; transition: background 0.15s ease; }
  .schedule-item.clickable-map-trigger:hover { background: rgba(255,122,41,0.08); }

  /* שכבת מעבר - backflip תלת-ממדי אמיתי: שני "פנים" (אורבי מלפנים, כדור הארץ מאחור) -
     ה-backface-visibility מסתיר כל פן כשהוא לא פונה למצלמה, כך שבדיוק ב-90 מעלות (חצי
     מהסיבוב הכולל של 180) המעבר קורה "בטבעיות" והצד השני נחשף, מדויק לפי איך ש-flip
     תלת-ממדי אמיתי עובד בדפדפן */
  .map-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 970;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6,7,10,0.92);
    backdrop-filter: blur(6px);
  }
  .map-transition-overlay.visible { display: flex; }

  .backflip-scene {
    position: relative;
    width: 110px;
    height: 110px;
    perspective: 500px; /* ערך נמוך-בינוני = תחושת עומק דרמטית יותר, לפי המחקר */
  }
  .backflip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
  }
  .backflip-card.flipping {
    animation: backflipRotate 1s cubic-bezier(.45,.05,.15,.95) forwards;
  }
  .backflip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  .backflip-orb-body {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #2A3040 0%, #181C26 55%, #0B0D13 100%);
    box-shadow: 0 0 40px rgba(255,122,41,0.25);
  }
  .backflip-back {
    transform: rotateX(180deg); /* מסובב מראש - כך שכשה-card כולו יגיע ל-180°, הפן הזה יפנה קדימה בדיוק */
    font-size: 72px;
    filter: drop-shadow(0 0 30px rgba(100,180,255,0.6));
  }
  /* הסיבוב הכולל הוא 180° בדיוק - "חצי פלִיפ" שמסתיים כשכדור הארץ פונה למצלמה. הטשטוש
     מגיע לשיא בדיוק ב-90° (הרגע שבו שני הפנים "בפרופיל", הכי מהיר ויזואלית) - זה ה"רגע
     המכריע" שבו התחושה היא שהאורבי כבר הפך לכדור הארץ באמצע התנועה, כמו שביקשת */
  @keyframes backflipRotate {
    0%   { transform: rotateX(0deg) scale(0.85); filter: blur(0); }
    35%  { filter: blur(3px); }
    50%  { transform: rotateX(90deg) scale(1.15); filter: blur(9px); }
    65%  { filter: blur(3px); }
    100% { transform: rotateX(180deg) scale(1); filter: blur(0); }
  }
  .backflip-card.shrinking {
    animation: backflipShrink 0.45s ease-in forwards;
  }
  @keyframes backflipShrink {
    0%   { transform: rotateX(180deg) scale(1); opacity: 1; }
    100% { transform: rotateX(180deg) scale(0); opacity: 0; }
  }

  /* קווי מהירות - נראים רק סביב שיא הסיבוב (45-70 אחוז מזמן האנימציה), מדמים תנועה מהירה */
  .speed-lines {
    position: absolute;
    inset: -40px;
    pointer-events: none;
    opacity: 0;
  }
  .speed-lines.active { animation: speedLinesFlash 1s ease forwards; }
  .speed-lines::before, .speed-lines::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(140,190,255,0.5);
  }
  .speed-lines::before { transform: scale(1.15); }
  .speed-lines::after { transform: scale(1.35); border-color: rgba(140,190,255,0.25); }
  @keyframes speedLinesFlash {
    0%, 38%  { opacity: 0; }
    48%, 62% { opacity: 1; }
    75%, 100% { opacity: 0; }
  }

  /* חוזר לאורבי במרכז המסך באפקט פופאפ קפיצי */
  .orb-wrap.popup-return {
    animation: orbPopupReturn 0.5s cubic-bezier(.34,1.56,.64,1) forwards;
  }
  @keyframes orbPopupReturn {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
  }

  .satellite-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 960;
    display: none;
    flex-direction: column;
    background: #06070A;
  }
  .satellite-map-overlay.visible { display: flex; }
  .satellite-map-title {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: rgba(18,21,28,0.9);
    border: 1px solid rgba(255,122,41,0.35);
    border-radius: 999px;
    padding: 8px 22px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .satellite-map-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(18,21,28,0.9);
    border: 1px solid rgba(255,122,41,0.35);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .satellite-map-close svg { width: 18px; height: 18px; }
  .satellite-map-close:hover { background: rgba(255,59,92,0.2); border-color: rgba(255,59,92,0.5); }
  .satellite-map-container { flex: 1; width: 100%; }

  .tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    pointer-events: none;
  }
  .tour-overlay.visible { display: block; }

  /* טכניקת ספוטלייט - box-shadow ענק שמכסה את כל המסך חוץ מהאזור הזה עצמו.
     פשוט וחזק יותר מ-clip-path דינמי, ומאפשר מעבר חלק בין אלמנטים עם transition רגיל */
  .tour-spotlight {
    position: fixed;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(4,5,8,0.8);
    transition: top 0.4s cubic-bezier(.3,.9,.4,1), left 0.4s cubic-bezier(.3,.9,.4,1),
                width 0.4s cubic-bezier(.3,.9,.4,1), height 0.4s cubic-bezier(.3,.9,.4,1);
    pointer-events: none;
  }

  .tour-tooltip {
    position: fixed;
    z-index: 901;
    width: 300px;
    background: var(--surface);
    border: 1px solid rgba(255,122,41,0.35);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    pointer-events: auto;
    transition: top 0.4s cubic-bezier(.3,.9,.4,1), left 0.4s cubic-bezier(.3,.9,.4,1);
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
  }
  /* חץ קטן שמצביע בבירור לכיוון האלמנט המוסבר - למעלה או למטה, לפי המיקום בפועל */
  .tour-tooltip-arrow {
    position: absolute;
    width: 14px; height: 14px;
    background: var(--surface);
    border: 1px solid rgba(255,122,41,0.35);
    border-bottom: none; border-right: none;
    transform: rotate(45deg);
    left: 28px;
  }
  .tour-tooltip.arrow-top .tour-tooltip-arrow { top: -8px; }
  .tour-tooltip.arrow-bottom .tour-tooltip-arrow { bottom: -8px; transform: rotate(225deg); }
  .tour-tooltip-step {
    font-size: 10px;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 6px;
  }
  .tour-tooltip-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
  }
  .tour-tooltip-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 16px;
  }
  .tour-tooltip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .tour-tooltip-nav { display: flex; gap: 8px; }
  .tour-btn {
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    border: none;
  }
  .tour-btn-skip {
    background: transparent;
    color: var(--text-muted);
    text-decoration: underline;
    padding: 8px 0;
  }
  .tour-btn-skip:hover { color: var(--text-primary); }
  .tour-btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: 1px solid #232A36;
  }
  .tour-btn-secondary:hover { background: rgba(255,255,255,0.1); }
  .tour-btn-secondary:disabled { opacity: 0.3; cursor: default; }
  .tour-btn-primary {
    background: var(--brand-orange);
    color: #14171F;
  }
  .tour-btn-primary:hover { background: #ff8f4d; }

  .tour-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(10px);
  }
  .tour-confirm-overlay.visible { display: flex; }
  .tour-confirm-box {
    background: var(--surface);
    border: 1px solid #232A36;
    border-radius: 16px;
    padding: 26px;
    width: 300px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
  }
  .tour-confirm-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 18px;
  }
  .tour-confirm-actions { display: flex; gap: 10px; }
  .tour-confirm-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .tour-confirm-btn.yes { background: rgba(0,212,106,0.15); border-color: rgba(0,212,106,0.4); color: var(--safe); }
  .tour-confirm-btn.yes:hover { background: rgba(0,212,106,0.28); transform: scale(1.03); }
  .tour-confirm-btn.no { background: rgba(255,59,92,0.12); border-color: rgba(255,59,92,0.4); color: var(--danger); }
  .tour-confirm-btn.no:hover { background: rgba(255,59,92,0.28); transform: scale(1.03); }
  .tour-confirm-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

  .night-mode-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(10px);
  }
  .night-mode-overlay.visible { display: flex; }
  .night-mode-box {
    background: var(--surface);
    border: 1px solid #232A36;
    border-radius: 16px;
    padding: 30px;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
  }
  .night-mode-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
  }
  .night-mode-code-input {
    width: 100%;
    box-sizing: border-box;
    background: #0B0E13;
    border: 1px solid #232A36;
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 16px;
    text-align: center;
    letter-spacing: 0.3em;
    outline: none;
    font-family: 'Rubik', sans-serif;
  }
  .night-mode-code-input:focus { border-color: var(--brand-orange); }
  .night-mode-error {
    display: none;
    color: var(--danger);
    font-size: 12px;
    text-align: center;
    font-family: 'Rubik', sans-serif;
  }
  .night-mode-error.visible { display: block; }
  .night-mode-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0,212,106,0.15);
    border: 1px solid rgba(0,212,106,0.4);
    color: var(--safe);
    border-radius: 10px;
    padding: 11px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .night-mode-confirm-btn:hover { background: rgba(0,212,106,0.28); }
  .night-mode-confirm-btn svg { width: 16px; height: 16px; }
  .fh2-widget-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .fh2-title-center { text-align: center; }
  .fh2-header-right { display: flex; align-items: center; gap: 6px; }
  .fh2-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
    animation: fh2Blink 1.6s ease-in-out infinite;
  }
  .fh2-dot.connected { background: var(--safe); animation: none; }
  @keyframes fh2Blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
  .fh2-widget-body {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #232A36;
    gap: 8px 6px;
  }
  .fh2-widget-body.visible { display: grid; }
  .fh2-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; text-align: center; }
  .fh2-label { color: var(--text-muted); font-size: 10px; }
  .fh2-value { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; display: flex; align-items: center; gap: 4px; }
  .fh2-signal-bars { display: flex; align-items: flex-end; gap: 2px; height: 19px; }
  .fh2-signal-bar {
    width: 4px;
    background: #3A4150;
    border-radius: 1px;
    transition: background 0.3s ease;
  }
  .fh2-signal-bar.filled {
    background: var(--safe);
    animation: fh2SignalPulse 1.8s ease-in-out infinite;
  }
  .fh2-signal-bar.filled:nth-child(1) { animation-delay: 0s; }
  .fh2-signal-bar.filled:nth-child(2) { animation-delay: 0.08s; }
  .fh2-signal-bar.filled:nth-child(3) { animation-delay: 0.16s; }
  .fh2-signal-bar.filled:nth-child(4) { animation-delay: 0.24s; }
  .fh2-signal-bar.filled:nth-child(5) { animation-delay: 0.32s; }
  @keyframes fh2SignalPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
  .fh2-signal-num { font-size: 10px; color: var(--text-muted); }
  .fh2-signal-empty { color: var(--text-muted); }
  .fh2-rtk-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffffff; border: 1px solid #9AA0A6; }
  .fh2-rtk-dot.bad { background: var(--danger); border-color: var(--danger); }
  .fh2-rtk-dot.good { background: var(--safe); border-color: var(--safe); }
  .fh2-updated { font-size: 10px; color: var(--text-muted); direction: ltr; }
  .fh2-widget-header { cursor: pointer; }
  .fh2-corner-badge {
    position: absolute;
    top: -20px;
    right: 12px;
    background: var(--brand-orange);
    color: #1a1005;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 8px 8px 0 0;
    display: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  .fh2-corner-badge.visible { display: block; }
  .fh2-expand-hint {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
    margin-right: 2px;
  }
  .fh2-widget.expanded .fh2-expand-hint { transform: rotate(180deg); }
  .fh2-expanded {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #232A36;
  }
  .fh2-widget.expanded .fh2-expanded { display: flex; }
  .fh2-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-orange);
    text-align: center;
  }
  .fh2-section-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px 6px;
  }
  .fh2-section-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 4px 0;
  }
  .fh2-alerts-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    max-height: 90px;
    overflow-y: auto;
    padding-top: 4px;
  }
  .fh2-alert-ok {
    font-size: 11px;
    font-weight: 600;
    color: var(--safe);
    text-align: center;
  }
  .fh2-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 7px;
    animation: fh2AlertPulse 1.4s ease-in-out infinite;
  }
  .fh2-alert.danger { background: rgba(255,59,92,0.15); color: #FF8A8A; border: 1px solid rgba(255,59,92,0.4); }
  .fh2-alert.warning { background: rgba(255,196,75,0.15); color: #FFC24B; border: 1px solid rgba(255,196,75,0.4); }
  @keyframes fh2AlertPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
  /* מוצג תמיד (גם כשהווידג'ט מכווץ) - קשר ממסר שנפל, ר' דוח-תחנות-ממסר שאושר. משתמש באותו
     .fh2-alert.danger מפעים כמו התראות דוק/רחפן רגילות, לעקביות ויזואלית */
  .fh2-relay-alerts { display: none; flex-direction: column; gap: 4px; margin-top: 7px; }
  .fh2-relay-alerts.visible { display: flex; }
  /* תת-סעיף תחנת ממסר בתוך ה-widget המורחב - מוסתר כברירת מחדל, מוצג רק כשיש ממסר ידוע לאתר.
     כל אחד משלושת האלמנטים מקבל/מאבד .visible בנפרד ב-JS (בדיוק כמו .fh2-corner-badge.visible
     למעלה), כי display הנכון שונה בין divider/label (block) ל-grid (grid) */
  #fh2RelaySectionDivider, #fh2RelaySectionLabel, #fh2RelaySectionGrid { display: none; }
  #fh2RelaySectionDivider.visible, #fh2RelaySectionLabel.visible { display: block; }
  #fh2RelaySectionGrid.visible { display: grid; }
  body.light-theme .fh2-widget { background: rgba(255,255,255,0.94); border-color: rgba(0,0,0,0.1); }
  body.light-theme .fh2-widget-header { color: #14171F; }
  body.light-theme .fh2-value { color: #14171F; }
  body.light-theme .fh2-widget-body { border-color: rgba(0,0,0,0.08); }

  .event-end-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(10px);
  }
  .event-end-overlay.visible { display: flex; }
  .event-end-box {
    background: var(--surface);
    border: 1px solid #232A36;
    border-radius: 16px;
    padding: 30px;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
  }
  .event-end-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
  }
  .event-end-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,122,41,0.12);
    border: 1px solid rgba(255,122,41,0.4);
    color: var(--brand-orange);
    border-radius: 10px;
    padding: 11px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .event-end-save-btn:hover { background: rgba(255,122,41,0.25); transform: scale(1.03); }
  .event-end-save-btn svg { width: 16px; height: 16px; }
  .event-end-actions { display: flex; gap: 12px; }
  .event-end-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid;
  }
  .event-end-btn svg { width: 16px; height: 16px; }
  .event-end-btn.yes { background: #ffffff; border-color: #ffffff; color: #14171F; transition: transform 0.15s ease, background 0.15s ease; }
  .event-end-btn.yes:hover { background: #DADCE0; transform: scale(1.03); }
  .event-end-btn.no { background: rgba(255,59,92,0.12); border-color: rgba(255,59,92,0.4); color: var(--danger); transition: transform 0.15s ease, background 0.15s ease; }
  .event-end-btn.no:hover { background: rgba(255,59,92,0.28); transform: scale(1.03); }
  .event-end-countdown { display: none; flex-direction: column; align-items: stretch; gap: 8px; }
  .event-end-countdown.visible { display: flex; }
  .event-end-countdown-track {
    height: 8px;
    background: #0B0E13;
    border: 1px solid #232A36;
    border-radius: 4px;
    overflow: hidden;
  }
  .event-end-countdown-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-orange);
    transition: width 0.1s linear;
  }
  .event-end-countdown-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
  }
  .event-end-cancel-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: -apple-system, BlinkMacSystemFont, 'Rubik', sans-serif;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    align-self: center;
  }
  body.light-theme .event-end-box { background: #ffffff; border-color: rgba(0,0,0,0.1); }
  body.light-theme .event-end-btn.yes { background: #F4F5F7; border-color: rgba(0,0,0,0.15); }
  body.light-theme .event-end-countdown-track { background: #F0F1F3; border-color: rgba(0,0,0,0.1); }
/* ============================================================================
   מערכת שיבוש GPS (DOCK-GPS) - מתג חשיפה, כבל, קופסה וכפתור חירום
   ============================================================================
   כל הפאנל מוסתר לגמרי (לא מושבת) כשהמתג כבוי או כשאין טיסה פעילה של הג'אמר
   בעמדה - ר' shouldShowPanel ב-public/gpsJammerUiLogic.js.
   הערה על עומק/צל: הכפתור מנוהל *כולו* מ-JS (paint()), במכוון בלי :hover ב-CSS -
   סגנון inline גובר על :hover ושניהם נלחמים, וזה ייצר גליץ' נראה לעין. */

.jam-toggle-wrapper { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }

/* גלולה 64x34. div ולא button - ר' ההערה ב-index.html */
.jam-switch {
  position: relative; box-sizing: border-box;
  width: 64px; height: 34px; border-radius: 17px;
  cursor: pointer; flex-shrink: 0;
  background: linear-gradient(180deg,#191919,#3a3a3a);
  box-shadow: inset 0 3px 7px rgba(0,0,0,.8), inset 0 -1px 0 rgba(255,255,255,.14);
  transition: background .28s cubic-bezier(.3,.9,.4,1);
  -webkit-tap-highlight-color: transparent;
}
.jam-switch:focus-visible { outline: 2px solid var(--brand-orange,#FF7A29); outline-offset: 3px; }
.jam-switch[aria-checked="true"] { background: linear-gradient(180deg,#7d590a,#C89210); }

.jam-knob {
  position: absolute; top: 3px; right: 3px;
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 40% 28%,#f0f0f0,#b8b8b8 58%,#8a8a8a);
  box-shadow: 0 2px 5px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.9), inset 0 -3px 5px rgba(0,0,0,.3);
  transition: transform .28s cubic-bezier(.3,.9,.4,1), background .28s cubic-bezier(.3,.9,.4,1);
}
.jam-switch[aria-checked="true"] .jam-knob {
  transform: translateX(-30px);
  background: radial-gradient(circle at 40% 28%,#FFEFB8,#F5C842 58%,#D19E10);
}

/* מיקום מוחלט + margin שלילי, ולא flex/grid - מרכוז flex נסחף כשהכפתור מתרגם */
.jam-knob-icon {
  position: absolute; top: 50%; left: 50%; margin: -11px 0 0 -11px;
  width: 22px; height: 22px;
  stroke: #3f3f3f; stroke-width: 2; stroke-linecap: round; fill: none;
  transition: stroke .28s ease;
}
.jam-knob-icon .wave { opacity: 1; transition: opacity .28s ease; }
.jam-knob-icon .slash { opacity: 0; transition: opacity .28s ease; }
.jam-switch[aria-checked="true"] .jam-knob-icon { stroke: #5c4200; }
.jam-switch[aria-checked="true"] .jam-knob-icon .wave { opacity: .16; }
.jam-switch[aria-checked="true"] .jam-knob-icon .slash { opacity: 1; stroke: #C0392B; }

/* ---------------------------------------------------------------- החשיפה */
/* position:fixed + מיקום ב-JS מה-bounding rect של המתג - אותה מוסכמה כמו
   .notif-panel, ומאותה סיבה: מתחת ל-1000px ל-.topbar יש overflow שגוזר absolute */
.jam-reveal {
  position: fixed; z-index: 999998;
  width: 280px;
  max-height: 0; overflow: hidden;
  pointer-events: none;
  transition: max-height .55s cubic-bezier(.3,.9,.35,1);
}
.jam-reveal.open { max-height: 340px; pointer-events: auto; }
/* אחרי שהפתיחה הסתיימה משחררים את ה-overflow, אחרת בועת השגיאה (left:100%)
   נגזרת. ה-JS מוסיף/מסיר את המחלקה סביב המעבר. */
.jam-reveal.overflow-ok { overflow: visible; }
.jam-reveal-inner {
  transform: translateY(-24px); opacity: 0;
  transition: transform .55s cubic-bezier(.3,.9,.35,1), opacity .55s cubic-bezier(.3,.9,.35,1);
}
.jam-reveal.open .jam-reveal-inner { transform: translateY(0); opacity: 1; }

.jam-cable { display: block; }

/* ---------------------------------------------------------------- הקופסה */
.jam-box {
  position: relative;
  width: 268px; margin: 0 6px; box-sizing: border-box;
  border-radius: 16px; padding: 18px 16px 16px;
  background: linear-gradient(168deg,#F5C842 0%,#E0A81E 45%,#C28C10 100%);
  box-shadow: 0 3px 0 #8f6608, 0 12px 0 rgba(0,0,0,.22), 0 18px 30px rgba(0,0,0,.45),
              inset 0 2px 0 rgba(255,255,255,.6), inset 0 -3px 6px rgba(0,0,0,.28);
}

/* אטם הכבל - הלשונית הכהה בקצה העליון שאליה הכבל מתחבר */
.jam-gland {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 13px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg,#454545,#232323);
}

.jam-screw {
  position: absolute; width: 15px; height: 15px; border-radius: 50%;
  background: conic-gradient(from 210deg,#b9b9b9,#6d6d6d 25%,#9d9d9d 50%,#5a5a5a 75%,#b9b9b9);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), inset 0 1px 1px rgba(255,255,255,.5),
              0 1px 2px rgba(0,0,0,.55), 0 0 0 1.5px rgba(0,0,0,.18);
}
.jam-screw.s-tl { top: 8px; left: 8px; }
.jam-screw.s-tr { top: 8px; right: 8px; }
.jam-screw.s-bl { bottom: 8px; left: 8px; }
.jam-screw.s-br { bottom: 8px; right: 8px; }
.jam-screw::before {
  content: ''; position: absolute; inset: 2.5px; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%,rgba(255,255,255,.35),rgba(0,0,0,.18));
}
.jam-screw::after {
  content: ''; position: absolute; left: 2px; right: 2px; top: 50%;
  height: 2.5px; margin-top: -1.25px; border-radius: 1px;
  background: linear-gradient(180deg,#1a1a1a,#3f3f3f);
  box-shadow: 0 1px 0 rgba(255,255,255,.35);
}

/* תא בגובה קבוע - כדי שהחלפת טקסט לא תזיז את הקופסה */
.jam-title-cell { height: 18px; display: grid; place-items: center; margin-bottom: 10px; }
.jam-title {
  font-family: 'Rubik', sans-serif; font-weight: 900; font-size: 13px; color: #4A3806;
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
  white-space: nowrap; text-align: center;
  transition: opacity .32s ease, transform .32s ease, filter .32s ease;
}
/* שוקע לתוך הצהוב, מתחלף, וצף בחזרה */
.jam-title.sinking { opacity: 0; transform: translateY(5px) scale(.96); filter: blur(1.5px); }

.jam-socket {
  width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%,#2f2f2f,#1c1c1c);
  box-shadow: inset 0 4px 8px rgba(0,0,0,.75), 0 1px 0 rgba(255,255,255,.35);
}
.jam-estop-wrap { position: relative; display: grid; place-items: center; }

/* הזוהר יושב מאחורי הכפתור וכאח שלו, לא בתוכו - לכפתור יש overflow:hidden */
.jam-glow {
  position: absolute; inset: -18px; border-radius: 50%;
  filter: blur(3px); pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
}
.jam-glow.active {
  opacity: 1;
  background: radial-gradient(circle,rgba(255,140,20,.6),transparent 70%);
  animation: jamBreathe 3s cubic-bezier(.45,0,.55,1) infinite;
}
.jam-glow.error {
  opacity: 1;
  background: radial-gradient(circle,rgba(224,62,45,.75),transparent 70%);
  animation: jamAlarm 1.6s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes jamBreathe {
  0%, 100% { opacity: .22; transform: scale(.9); }
  45% { opacity: .95; transform: scale(1.08); }
}
@keyframes jamAlarm {
  0%, 100% { opacity: .25; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.12); }
}

.jam-estop {
  position: relative;
  width: 128px; height: 128px; border-radius: 50%;
  border: none; padding: 0; overflow: hidden; cursor: pointer;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
  /* הרקע/הצל/ה-transform מוזרקים inline מ-paint() ב-app.js. אין hover כאן במכוון. */
  transition: background .18s ease;
}
.jam-estop:focus-visible { outline: 3px solid #FFEFB8; outline-offset: 3px; }
/* שתי השכבות (חיצים + מונה) באותו תא רשת - נערמות, לא נפרסות לשתי שורות */
.jam-estop > * { grid-area: 1 / 1; }
.jam-arrows { display: block; pointer-events: none; }

/* רשת ולא line-height - SVG inline יושב על קו-הבסיס וגולש מטה מול הספרות */
.jam-timer {
  display: grid; place-items: center;
  width: 56px; height: 46px; line-height: 1;
  font-family: 'Rubik', sans-serif; font-weight: 900; font-size: 36px;
  color: #fff; pointer-events: none; user-select: none;
}
.jam-timer svg { display: block; }
.jam-timer.pop { animation: jamDigitPop .26s cubic-bezier(.3,1.4,.5,1); }
@keyframes jamDigitPop { from { transform: scale(1.35); } to { transform: scale(1); } }

.jam-caption {
  margin-top: 12px; text-align: center;
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 11.5px; color: #4A3806;
}

/* ---------------------------------------------------------------- בועת שגיאה */
.jam-bubble {
  position: absolute; left: 100%; margin-left: 16px; top: 50%;
  width: 190px; transform-origin: left center;
  transform: translateY(-50%) translateX(-16px) scale(.85); opacity: 0;
  pointer-events: none;
  transition: transform .38s cubic-bezier(.25,1.5,.45,1), opacity .38s cubic-bezier(.25,1.5,.45,1);
}
.jam-bubble.visible { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
.jam-bubble-inner {
  position: relative;
  background: linear-gradient(180deg,#8a2018,#5c1410);
  border-radius: 12px; padding: 12px 13px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.55);
}
.jam-bubble-inner::after {
  content: ''; position: absolute; left: -9px; top: 50%; margin-top: -8px;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-right: 9px solid #7c1c15;
}
.jam-bubble-title { font-family: 'Rubik', sans-serif; font-weight: 900; font-size: 12px; color: #FFC9C2; }
.jam-bubble-body { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 10.5px; color: #FFE3DF; line-height: 1.5; margin-top: 4px; }

/* רשת ביטחון: אם אין מקום לבועה מימין (המתג יושב קרוב לקצה המסך) היא מתהפכת
   לצד השני, יחד עם הזנב. ברירת המחדל נשארת ימין, כמפרט. */
.jam-bubble.flip { left: auto; right: 100%; margin-left: 0; margin-right: 16px; transform-origin: right center; }
.jam-bubble.flip { transform: translateY(-50%) translateX(16px) scale(.85); }
.jam-bubble.flip.visible { transform: translateY(-50%) translateX(0) scale(1); }
.jam-bubble.flip .jam-bubble-inner::after { left: auto; right: -9px; border-right: none; border-left: 9px solid #7c1c15; }

/* מצב מושבת לכפתור החירום (08/09): הכפתור נראה אך אינו לחיץ. הרקע/הצל עדיין
   מוזרקים מ-paint() - כאן רק מה שאינו חלק מהתאורה: סמן, בחירה ותגובת מגע. */
.jam-estop.is-disabled { cursor: not-allowed; }
.jam-estop.is-disabled .jam-timer { opacity: .55; }
