:root {
  --night: #0b1020; --ink: #111a33; --plate: rgba(11,16,32,0.82); --line: rgba(244,227,193,0.18);
  --sand: #f4e3c1; --mute: #9aa6c4; --sun: #ff6b3d; --sea: #19c3b2; --gold: #ffc24b; --ok: #2fd08a; --bad: #ff4d5e;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--night); color: var(--sand); font-family: "Rubik", "Segoe UI", Arial, sans-serif; overscroll-behavior: none; touch-action: none; }
button { font-family: inherit; }
.hidden { display: none !important; }
#canvas-root { position: fixed; inset: 0; z-index: 1; }
#canvas-root canvas { display: block; width: 100%; height: 100%; }
#vignette { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(5,8,22,0.55) 100%); transition: box-shadow 0.2s; }
body.nitro #vignette { box-shadow: inset 0 0 140px rgba(25,195,178,0.35); }
/* מהירות: השוליים מתכהים ככל שנוסעים מהר יותר (רק שקיפות משתנה, בלי ציור מחדש). בטורבו: פסי מהירות בשוליים */
#speed-fx { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; will-change: opacity; transition: opacity 0.15s linear; background: radial-gradient(ellipse at 50% 56%, transparent 36%, rgba(5,8,22,0.5) 100%); }
#vignette { overflow: hidden; }
#vignette::after { content: ""; position: absolute; inset: -22%; opacity: 0; transition: opacity 0.18s; background: repeating-conic-gradient(from 0deg at 50% 56%, rgba(255,255,255,0) 0deg 2.3deg, rgba(214,246,255,0.55) 2.5deg 2.7deg, rgba(255,255,255,0) 2.9deg 5.6deg); -webkit-mask-image: radial-gradient(ellipse at 50% 56%, transparent 36%, #000 80%); mask-image: radial-gradient(ellipse at 50% 56%, transparent 36%, #000 80%); }
body.nitro #vignette::after { opacity: 0.22; animation: streak 0.16s steps(3) infinite; }
@keyframes streak { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(1.4deg) scale(1.03); } 100% { transform: rotate(-1deg) scale(1.01); } }
@media (prefers-reduced-motion: reduce) { body.nitro #vignette::after { animation: none; } }

.brand-a, .brand-b { font-weight: 900; letter-spacing: 0.14em; font-size: 15px; }
.brand-a { color: var(--sand); } .brand-b { color: var(--sun); margin-inline-start: 8px; }

/* פתיחה */
#start-modal { position: fixed; inset: 0; z-index: 40; background: linear-gradient(180deg, rgba(11,16,32,0.55), rgba(11,16,32,0.93) 60%); display: flex; align-items: center; justify-content: center; padding: 14px; overflow-y: auto; touch-action: pan-y; transition: opacity 0.4s; }
#start-modal.hidden { display: flex !important; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.4s, visibility 0s 0.4s; }   /* visibility: שכבה שקופה לא נשארת בסדר ה-Tab */
.modal-card { width: min(640px, 100%); background: var(--plate); border: 1px solid var(--line); border-top: 3px solid var(--sun); padding: 22px; text-align: right; backdrop-filter: blur(14px); max-height: 100%; overflow-y: auto; }
.modal-card h1 { font-size: clamp(24px, 5vw, 38px); font-weight: 900; margin: 8px 0 6px; line-height: 1.1; }
.lead { font-size: 14px; color: var(--mute); margin-bottom: 14px; line-height: 1.5; }
.step-pills { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.s-pill { background: none; border: none; border-bottom: 3px solid transparent; color: var(--mute); padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; margin-bottom: -1px; }
.s-pill.active { color: var(--sand); border-bottom-color: var(--sun); }
.field-row { margin-bottom: 12px; }
.field-row label { display: block; font-size: 12px; font-weight: 700; color: var(--mute); margin-bottom: 6px; }
.field-row input { width: 100%; background: rgba(0,0,0,0.35); border: 1px solid var(--line); padding: 11px 14px; color: #fff; font-size: 16px; font-family: inherit; outline: none; user-select: text; -webkit-user-select: text; }
.field-row input:focus { border-color: var(--sea); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.opt-card { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-inline-start: 3px solid transparent; padding: 10px 12px; color: var(--sand); text-align: right; cursor: pointer; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.opt-card span { grid-row: span 2; font-size: 22px; }
.opt-card strong { font-size: 14px; }
.opt-card small { font-size: 11.5px; color: var(--mute); line-height: 1.3; }
.opt-card.active { border-inline-start-color: var(--sun); background: rgba(255,107,61,0.14); }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--sand); padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.chip-btn i { width: 14px; height: 14px; border: 1px solid rgba(255,255,255,0.4); display: inline-block; }
.chip-btn.active { border-color: var(--sun); background: rgba(255,107,61,0.16); }
.keys-hint { font-size: 12px; color: var(--mute); line-height: 1.5; }
.w-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-pri { flex: 2; background: var(--sun); border: none; color: #1a0d06; padding: 14px; font-size: 17px; font-weight: 900; cursor: pointer; }
.btn-sec { flex: 1; background: none; border: 1px solid var(--line); color: var(--sand); padding: 14px; font-size: 14px; font-weight: 700; cursor: pointer; }

/* HUD */
#hud { position: fixed; top: calc(8px + var(--safe-t)); left: 10px; right: 10px; z-index: 20; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.hud-left, .hud-right { display: flex; gap: 6px; flex-wrap: wrap; pointer-events: auto; align-items: stretch; }
.badge, .hud-btn { background: var(--plate); backdrop-filter: blur(10px); border: 1px solid var(--line); padding: 6px 10px; font-size: 12px; color: var(--sand); display: flex; align-items: center; gap: 6px; }
.badge div { display: flex; flex-direction: column; line-height: 1.2; }
.badge small { font-size: 10px; color: var(--mute); }
#hud-identity { border-inline-start: 3px solid var(--sun); }
#hud-dna { border-inline-start: 3px solid var(--sea); }
#hud-dna strong { color: var(--sea); }
.badge.num strong { font-variant-numeric: tabular-nums; }
.badge.boost .bar { width: 54px; height: 6px; background: rgba(255,255,255,0.12); flex-direction: row; }
.badge.boost .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--sea), var(--gold)); transition: width 0.1s linear; }
#hud-boost { min-width: 34px; font-variant-numeric: tabular-nums; }
.hud-btn { cursor: pointer; font-weight: 700; position: relative; }
.hud-btn:active { background: rgba(255,107,61,0.3); }
#phone-dot { position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; background: var(--sun); border-radius: 50%; display: none; }
#phone-dot.on { display: block; }

#radar-box { position: fixed; top: calc(64px + var(--safe-t)); left: 10px; z-index: 18; background: var(--plate); border: 1px solid var(--line); padding: 5px; text-align: center; width: 162px; }
#radar { display: block; width: 150px; height: 150px; border-radius: 50%; background: #0a1226; }
#radar-zone { font-size: 11px; font-weight: 700; color: var(--gold); margin-top: 4px; }
#goal-hint { font-size: 10.5px; color: var(--mute); margin-top: 2px; min-height: 13px; white-space: pre-line; }

#mission-panel { position: fixed; top: calc(64px + var(--safe-t)); right: 10px; width: min(340px, calc(100vw - 190px)); z-index: 18; background: var(--plate); backdrop-filter: blur(12px); border: 1px solid var(--line); border-top: 3px solid var(--sea); padding: 11px; }
.m-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.m-ico { width: 36px; height: 36px; background: rgba(25,195,178,0.18); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.m-title { font-size: 13px; font-weight: 800; }
.m-sub { font-size: 11px; color: var(--mute); }
.m-pay { margin-inline-start: auto; color: var(--ok); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-desc { font-size: 12.5px; color: var(--sand); line-height: 1.45; margin-bottom: 8px; }
.m-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 8px; }
.m-choice { background: rgba(255,255,255,0.04); border: 1px solid var(--line); padding: 5px 8px; color: var(--sand); text-align: right; cursor: pointer; }
.m-choice strong { display: block; font-size: 11px; }
.m-choice small { font-size: 10px; color: var(--mute); }
.m-choice.active { border-color: var(--sea); background: rgba(25,195,178,0.16); }
.m-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--gold); border-top: 1px solid var(--line); padding-top: 6px; }
#m-timer { color: #fff; background: var(--bad); padding: 2px 8px; font-variant-numeric: tabular-nums; }
#btn-skip-mission { background: none; border: 1px solid var(--line); color: var(--mute); padding: 3px 8px; font-size: 10.5px; cursor: pointer; }

#toast { position: fixed; bottom: calc(112px + var(--safe-b)); left: 50%; transform: translateX(-50%) translateY(8px); z-index: 30; background: var(--plate); border: 1px solid var(--line); border-inline-start: 3px solid var(--gold); padding: 9px 16px; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; max-width: min(520px, 92vw); text-align: center; line-height: 1.4; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#banner { position: fixed; top: 30%; left: 0; right: 0; z-index: 25; text-align: center; pointer-events: none; font-weight: 900; font-size: clamp(26px, 6vw, 54px); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 40px rgba(255,107,61,0.8); opacity: 0; transform: scale(0.8); transition: opacity 0.25s, transform 0.35s cubic-bezier(.2,1.6,.4,1); }
#banner small { display: block; font-size: 0.38em; color: var(--gold); font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,0.7); margin-top: 4px; }
#banner.show { opacity: 1; transform: scale(1); }
/* טלפון לרוחב: ההכרזה יושבת בין הרדאר לכרטיס המשימה. במרכז המסך היא עלתה על הכרטיס כשהוא פתוח */
@media (max-height: 480px) and (min-width: 560px) { #banner { top: 32%; left: 112px; right: min(342px, calc(40vw + 28px)); font-size: clamp(18px, 7.2vh, 30px); } }
/* חלון בינוני (טאבלט, חלונית צרה במחשב): הכרטיס הפתוח מגיע עד שליש המסך, אז ההכרזה יורדת מתחתיו */
@media (min-width: 721px) and (max-width: 1180px) and (min-height: 481px) { #banner { top: 36%; } }
#combo { position: fixed; bottom: calc(176px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 22; font-weight: 900; font-size: 22px; color: var(--gold); text-shadow: 0 2px 8px rgba(0,0,0,0.8); opacity: 0; transition: opacity 0.2s; pointer-events: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
#combo.show { opacity: 1; }

/* צומת החלטה */
#decision { position: fixed; inset: 0; z-index: 36; background: rgba(5,8,22,0.72); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 14px; overflow-y: auto; touch-action: pan-y; }
.d-card { width: min(560px, 100%); background: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 18px; animation: rise 0.3s ease-out; }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.d-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.d-head span { font-size: 34px; }
.d-head strong { display: block; font-size: 16px; }
.d-head small { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
#d-prompt { font-size: 15px; line-height: 1.55; margin-bottom: 12px; }
#d-options { display: flex; flex-direction: column; gap: 8px; }
.d-opt { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-inline-start: 4px solid var(--mute); color: var(--sand); padding: 11px 12px; text-align: right; cursor: pointer; font-size: 14px; }
.d-opt strong { display: block; margin-bottom: 3px; }
.d-opt small { color: var(--mute); font-size: 12px; line-height: 1.35; display: block; }
.d-opt[data-tag="system"] { border-inline-start-color: var(--sea); }
.d-opt[data-tag="bold"] { border-inline-start-color: var(--sun); }
.d-opt[data-tag="people"] { border-inline-start-color: var(--gold); }
.d-opt:hover, .d-opt:focus { background: rgba(255,255,255,0.1); outline: none; }
.d-foot { display: block; margin-top: 10px; color: var(--mute); font-size: 11px; }

/* טלפון */
#phone-overlay { position: fixed; inset: 0; z-index: 35; background: rgba(5,8,22,0.7); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 12px; }
.phone { width: min(460px, 100%); height: min(680px, 92vh); background: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--sun); overflow: hidden; display: flex; flex-direction: column; }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-size: 14px; }
#btn-close-phone { background: none; border: none; color: var(--mute); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.phone-tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; touch-action: pan-x; scrollbar-width: none; }
.phone-tabs::-webkit-scrollbar { display: none; }
.ptab { flex: 1 0 auto; background: none; border: none; border-bottom: 3px solid transparent; color: var(--mute); padding: 9px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ptab.active { color: var(--sand); border-bottom-color: var(--sun); }
.phone-body { padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; flex: 1; touch-action: pan-y; }
.row-card { background: rgba(255,255,255,0.04); border: 1px solid var(--line); padding: 11px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-card.col { flex-direction: column; align-items: stretch; }
.row-card h4 { font-size: 13.5px; margin-bottom: 2px; }
.row-card p { font-size: 12px; color: var(--mute); line-height: 1.4; }
.row-card.done { border-inline-start: 3px solid var(--ok); }
.act-btn { background: var(--sea); border: none; color: #04201c; padding: 9px 12px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.act-btn.ok { background: var(--ok); }
.act-btn.ghost { background: none; border: 1px solid var(--line); color: var(--sand); }
.act-btn.wide { width: 100%; padding: 12px; font-size: 13px; }
.meter { height: 8px; background: rgba(255,255,255,0.1); margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--sea); }
.meter.sun i { background: var(--sun); } .meter.gold i { background: var(--gold); }
.kv { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.kv b { font-variant-numeric: tabular-nums; color: var(--gold); }
.msg { border-inline-start: 3px solid var(--sea); }
.msg.new { border-inline-start-color: var(--sun); }
.phone-body canvas { width: 100%; height: auto; display: block; background: #0a1226; }
.credit { font-size: 11.5px; color: var(--mute); text-align: center; line-height: 1.5; }
.credit a { color: var(--sea); }

/* שליטה במגע */
#controls { position: fixed; bottom: calc(12px + var(--safe-b)); left: 12px; right: 12px; z-index: 20; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.c-group { display: flex; gap: 8px; align-items: flex-end; pointer-events: auto; }
.c-stack { display: flex; flex-direction: column; gap: 8px; }
.key-btn { width: clamp(60px, 15vw, 78px); height: clamp(60px, 15vw, 78px); border: 2px solid rgba(244,227,193,0.3); background: rgba(11,16,32,0.6); color: #fff; font-size: 22px; font-weight: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; touch-action: none; border-radius: 50%; backdrop-filter: blur(4px); }
.key-btn small { font-size: 9px; margin-top: 1px; }
.key-btn.sm { width: clamp(46px, 11vw, 56px); height: clamp(46px, 11vw, 56px); font-size: 18px; }
.key-btn.on { transform: scale(0.92); background: rgba(255,255,255,0.28); }
.gas-btn { background: rgba(47,208,138,0.55); } .brake-btn { background: rgba(255,77,94,0.5); }
.nitro-btn { background: rgba(25,195,178,0.55); } .drift-btn { background: rgba(255,194,75,0.5); }
.air-only { display: none; background: rgba(255,107,61,0.5); }
body.air-mode .air-only { display: flex; }
body.foot-mode .drift-btn, body.foot-mode .nitro-btn { opacity: 0.25; }
/* הפס שמתחת למהירות הוא מד הסל"ד: מתמלא מימין, ומאדים בקצה. ‎--rev בין 0 ל-1, נקבע ב-main.js */
.speed-pill { background: linear-gradient(90deg, var(--revc, var(--sun)), var(--gold)) right bottom / calc(var(--rev, 1) * 100%) 3px no-repeat border-box, linear-gradient(rgba(255,107,61,0.28), rgba(255,107,61,0.28)) right bottom / 100% 3px no-repeat border-box, var(--plate); border: 1px solid var(--line); border-bottom: 3px solid transparent; padding: 6px 18px; text-align: center; pointer-events: none; }
.speed-pill.hot { --revc: var(--bad); }
#gear { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: inherit; font-weight: 800; line-height: 1; color: var(--gold); white-space: nowrap; }   /* נסיעה אחורה: "אחורה" במקום "קמ\"ש", באותה שורה. אין יותר מספר הילוך (מבקר טרי 2.12) */
#gear:not(:empty) { display: flex; } .speed-pill.rev small { color: transparent; }
.speed-pill strong { display: block; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.speed-pill small { font-size: 10px; color: var(--mute); position: relative; display: inline-block; }
@media (hover: hover) and (pointer: fine) { .c-group { display: none; } #controls { justify-content: center; } }

#boot { position: fixed; inset: 0; z-index: 60; background: var(--night); display: flex; align-items: center; justify-content: center; text-align: center; transition: opacity 0.5s; }
#boot.gone { opacity: 0; pointer-events: none; }
#boot .brand-a, #boot .brand-b { font-size: 26px; }
#boot p { color: var(--mute); margin-top: 12px; font-size: 13px; }

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hud-btn span, #hud-dna small, #hud-identity small { display: none; }
  .badge, .hud-btn { padding: 5px 7px; font-size: 11px; }
  #radar-box { width: 108px; top: calc(92px + var(--safe-t)); } #radar { width: 96px; height: 96px; }
  #mission-panel { width: calc(100vw - 134px); top: calc(92px + var(--safe-t)); padding: 8px; }
  .m-choices { display: none; } .m-desc { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .speed-pill { padding: 4px 12px; } .speed-pill strong { font-size: 20px; }
}
@media (max-height: 480px) {
  #radar-box { top: calc(50px + var(--safe-t)); } #mission-panel { top: calc(50px + var(--safe-t)); width: min(300px, 40vw); }
  .m-desc { display: none; } .modal-card { padding: 12px; } .modal-card h1 { font-size: 20px; } .lead { display: none; }
}

body:not(.started) #hud:not(.prelay), body:not(.started) #radar-box:not(.prelay), body:not(.started) #mission-panel:not(.prelay), body:not(.started) #controls:not(.prelay) { display: none; }
/* מהירות (3.12): הפריסה הראשונה של הממשק עלתה כ-0.1 שנייה בטלפון, בתוך הלחיצה על "לשחק". בזמן שמסך הכותרת פתוח main.js פורס כל חלק פעם אחת (prelay),
   באותו צעד מחזיר, ושום דבר מזה לא מצויר. ראו prelayHUD ב-main.js */
body:not(.started) .prelay { visibility: hidden !important; pointer-events: none !important; }
@media (max-width: 1180px) and (min-width: 721px) { #radar-box, #mission-panel { top: calc(104px + var(--safe-t)); } }
.disclaimer { font-size: 11px; color: var(--mute); line-height: 1.5; margin-top: 10px; opacity: 0.85; }

#ctx-hint { position: fixed; bottom: calc(74px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 19; background: var(--plate); border: 1px solid var(--line); padding: 5px 12px; font-size: 12px; color: var(--sand); white-space: nowrap; max-width: 96vw; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
body:not(.started) #ctx-hint:not(.prelay), body:not(.started) #btn-action:not(.prelay) { display: none; }
#btn-action { position: fixed; bottom: calc(150px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 24; background: var(--gold); color: #1a1205; border: none; padding: 13px 22px; font-family: inherit; font-size: 16px; font-weight: 900; cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,0.5); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.06); } }
body.mode-free #mission-panel { display: none; }
.mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.mode-row .act-btn { padding: 10px 4px; }
.locked { opacity: 0.6; }
@media (max-width: 720px) { #ctx-hint { bottom: calc(100px + var(--safe-b)); font-size: 11px; } #btn-action { bottom: calc(176px + var(--safe-b)); } #toast { bottom: calc(132px + var(--safe-b)); } #combo { bottom: calc(230px + var(--safe-b)); } }
body.inside #mission-panel, body.inside #goal-hint { display: none; }

@media (max-width: 720px) {
  #controls { align-items: flex-end; }
  .speed-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); }
  #ctx-hint { bottom: calc(150px + var(--safe-b)); }
  #toast { bottom: calc(184px + var(--safe-b)); }
  #btn-action { bottom: calc(250px + var(--safe-b)); }
  #combo { bottom: calc(300px + var(--safe-b)); }
  .m-desc { -webkit-line-clamp: 2; }
  .m-title { font-size: 12px; } .m-header { margin-bottom: 4px; }
}
@media (max-height: 480px) {
  .speed-pill { position: static; transform: none; }
  #ctx-hint { bottom: calc(6px + var(--safe-b)); font-size: 10.5px; padding: 3px 8px; }
  #toast { bottom: calc(96px + var(--safe-b)); } #btn-action { bottom: calc(96px + var(--safe-b)); padding: 9px 16px; font-size: 14px; } #combo { bottom: calc(150px + var(--safe-b)); }
  .key-btn { width: 58px; height: 58px; } .key-btn.sm { width: 44px; height: 44px; }
  #radar-box { width: 96px; } #radar { width: 84px; height: 84px; }
  .phone { height: 96vh; }
}

#ctx-hint { transition: opacity 0.6s; }
#ctx-hint.fade { opacity: 0; }
@media (max-width: 720px) { #ctx-hint { bottom: calc(218px + var(--safe-b)); } #toast { bottom: calc(252px + var(--safe-b)); } #btn-action { bottom: calc(318px + var(--safe-b)); } #combo { bottom: calc(372px + var(--safe-b)); } }
@media (max-height: 480px) {
  .hud-btn span, #hud-dna small, #hud-identity small { display: none; }
  .m-choices { display: none; }
  #radar-box, #mission-panel { top: calc(50px + var(--safe-t)); }
  #ctx-hint { bottom: calc(86px + var(--safe-b)); }
  #toast { bottom: calc(118px + var(--safe-b)); } #btn-action { bottom: calc(160px + var(--safe-b)); }
}
/* כפתור הפעולה ("להיכנס ל...") לא יושב על הרכב (מבקר 4.12): בטלפון לאורך מתחת לרכב, בין ההודעה למד המהירות. לרוחב מימין מעל כפתורי הנהיגה,
   ובמחשב מימין לרכב, באותם מקומות שהוא עובר אליהם כשהודעה פתוחה (phoneapps.js). כשהוא לא במרכז יש לו פעימה משלו, בלי translateX, כדי שלא יקפוץ */
@keyframes actPulse { 50% { transform: scale(1.06); } }
@media (max-width: 720px) and (max-aspect-ratio: 1/1) { #btn-action { bottom: calc(140px + var(--safe-b)); } }
@media (max-height: 480px) and (min-aspect-ratio: 4/3) { #btn-action { left: auto; right: calc(14px + var(--safe-r)); transform: none; animation-name: actPulse; bottom: calc(112px + var(--safe-b)); } }
@media (min-width: 721px) and (min-height: 481px) { #btn-action { left: min(calc(50% + 175px), calc(100% - 250px)); transform: none; animation-name: actPulse; bottom: calc(160px + var(--safe-b)); } }
/* כפתור החילוץ (rescue.js) יושב באותה פינה: כשהוא מופיע, כפתור הפעולה זז ממנו (לרוחב מעליו, לאורך קצת שמאלה) */
@media (max-height: 480px) and (min-aspect-ratio: 4/3) { body:has(#rescue-btn.on) #btn-action { bottom: calc(160px + var(--safe-b)); } }
@media (max-width: 720px) and (max-aspect-ratio: 1/1) { body:has(#rescue-btn.on) #btn-action { left: 40%; } }
/* בטיסה: כפתורי עלייה וירידה עולים לשורה מעל, כדי שהכול ייכנס גם במסך צר */
.c-group { position: relative; }
body.air-mode .air-only { position: absolute; bottom: calc(100% + 10px); }
body.air-mode #k-up-alt { right: 0; } body.air-mode #k-down-alt { left: 0; }
body.air-mode .drift-btn { display: none; }
body.air-mode .speed-pill { bottom: calc(100% + 96px); }

/* ===== מסך נקי (22.11.2026): פחות ממשק, אותן יכולות ===== */
#btn-hud-more { min-width: 34px; justify-content: center; font-size: 15px; line-height: 1; }
body.hud-open #btn-hud-more { background: rgba(25,195,178,0.22); border-color: var(--sea); }
.badge, .hud-btn { background: rgba(10,14,26,0.55); }
#mission-panel { top: calc(8px + var(--safe-t)); width: min(330px, calc(100vw - 20px)); transition: width 0.25s; }
#mission-panel .m-header, #mission-panel .m-footer { cursor: pointer; }
#mission-panel.mini { width: min(300px, calc(100vw - 20px)); padding: 6px 10px; background: rgba(10,14,26,0.55); border-top-width: 2px; }
#mission-panel.mini .m-desc, #mission-panel.mini .m-choices, #mission-panel.mini #btn-skip-mission, #mission-panel.mini .m-sub { display: none; }
#mission-panel.mini .m-header { margin-bottom: 2px; gap: 6px; }
#mission-panel.mini .m-ico { width: 22px; height: 22px; font-size: 14px; background: none; }
#mission-panel.mini .m-title { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
#mission-panel.mini .m-footer { border-top: 0; padding-top: 0; font-size: 11px; }
/* מחשב: המפה יורדת לפינה התחתונה, כמקובל, והחלק העליון של המסך נשאר פתוח */
@media (hover: hover) and (pointer: fine) {
  #radar-box { top: auto; bottom: calc(12px + var(--safe-b)); left: 12px; background: rgba(10,14,26,0.55); }
}
@media (max-width: 1180px) and (min-width: 721px) { #mission-panel { top: calc(8px + var(--safe-t)); } }
/* טלפון: שורת מספרים אחת, מתחתיה מפה קטנה מימין לה שורת המטרה */
@media (max-width: 720px) {
  #hud { flex-wrap: nowrap; }
  #radar-box { top: calc(46px + var(--safe-t)); width: 92px; padding: 4px; } #radar { width: 82px; height: 82px; }
  #radar-zone { font-size: 10px; } #goal-hint { display: none; }
  #mission-panel, #mission-panel.mini { top: calc(46px + var(--safe-t)); width: calc(100vw - 118px); }
  #mission-panel.mini .m-title { max-width: 42vw; }
}
@media (max-height: 480px) {
  #radar-box, #mission-panel, #mission-panel.mini { top: calc(44px + var(--safe-t)); }
  #mission-panel, #mission-panel.mini { width: min(280px, 38vw); }
}
@media (max-width: 720px) {
  .hud-right { flex-wrap: nowrap; width: 100%; justify-content: space-between; }
  #hud-boost { display: none; } .badge.boost .bar { width: 34px; }
}

/* ===== תפריטים ושליטה (22.11.2026, חלק שני): מרווח, היררכיה ברורה, אותן יכולות ===== */
kbd { display: inline-block; direction: ltr; font: 700 10.5px/1 "Rubik", "Segoe UI", Arial, sans-serif; color: var(--sand); background: rgba(255,255,255,0.09); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 3px 6px; margin: 0 6px 0 0; white-space: nowrap; vertical-align: middle; }
@media (pointer: coarse) { kbd, .only-fine { display: none !important; } }
@media (hover: hover) and (pointer: fine) { .only-touch { display: none !important; } }
.hud-left { display: none; }

/* --- תפריט נפתח מהכפתור "⋯" --- */
#hud-menu { position: fixed; top: calc(48px + var(--safe-t)); left: 10px; z-index: 26; width: 272px; max-width: calc(100vw - 20px); max-height: calc(100vh - 60px - var(--safe-t)); overflow-y: auto; touch-action: pan-y; display: none; flex-direction: column; gap: 2px; padding: 8px; background: rgba(11,16,32,0.95); backdrop-filter: blur(14px); border: 1px solid var(--line); border-top: 3px solid var(--sea); box-shadow: 0 18px 44px rgba(0,0,0,0.5); }
body.started.hud-open #hud-menu { display: flex; }
.hm-who { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.hm-who .badge { background: none; border: 0; border-inline-start: 3px solid var(--sun); backdrop-filter: none; padding: 2px 10px; font-size: 13px; }
.hm-who #hud-dna { border-inline-start-color: var(--sea); }
#hud-menu .badge small { display: block; font-size: 11px; }
.hm-veh { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 2px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.hm-chip { position: relative; width: 44px; height: 44px; font-size: 21px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--sand); cursor: pointer; font-family: inherit; }
.hm-chip:hover { background: rgba(255,255,255,0.12); }
.hm-chip.on { border-color: var(--sea); background: rgba(25,195,178,0.22); }
.hm-chip kbd { position: absolute; bottom: -6px; left: -6px; margin: 0; font-size: 9px; padding: 2px 4px; background: var(--ink); }
#hud-menu .hud-btn { width: 100%; min-height: 44px; padding: 10px; gap: 8px; background: none; border: 0; backdrop-filter: none; font-size: 13.5px; justify-content: flex-start; text-align: right; }
#hud-menu .hud-btn:hover { background: rgba(255,255,255,0.08); }
#hud-menu .hud-btn span { display: inline; }
#hud-menu .hud-btn[data-key]::after { content: attr(data-key); direction: ltr; margin-right: auto; font-size: 10.5px; font-weight: 700; line-height: 1; color: var(--mute); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 3px 6px; }
@media (pointer: coarse) { #hud-menu .hud-btn[data-key]::after { display: none; } }
#btn-action kbd { color: #1a1205; border-color: rgba(26,18,5,0.35); background: rgba(26,18,5,0.1); margin-right: 10px; }

/* --- הטלפון במשחק --- */
#phone-overlay { padding: 16px; }
.phone { width: min(880px, 100%); height: min(660px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.phone-top { padding: 10px 16px; gap: 14px; border-bottom: 1px solid var(--line); }
#phone-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.phone-stats { margin-inline-start: auto; display: flex; gap: 14px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#btn-close-phone, #btn-close-help { flex: none; min-width: 44px; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 12px; font-size: 16px; font-family: inherit; color: var(--sand); background: rgba(255,255,255,0.05); border: 1px solid var(--line); cursor: pointer; }
#btn-close-phone:hover, #btn-close-help:hover { background: rgba(255,255,255,0.12); }
.phone-main { flex: 1; min-height: 0; display: flex; }
.phone-nav { flex: none; width: 172px; display: flex; flex-direction: column; gap: 4px; padding: 10px; background: rgba(0,0,0,0.2); border-inline-end: 1px solid var(--line); }
.pnav { position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 12px; background: none; border: 0; border-inline-start: 3px solid transparent; color: var(--mute); font-size: 14.5px; font-weight: 700; text-align: right; cursor: pointer; }
.pnav i { font-style: normal; font-size: 20px; line-height: 1; }
.pnav kbd { margin-right: auto; }
.pnav:hover { color: var(--sand); background: rgba(255,255,255,0.05); }
.pnav.active { color: var(--sand); background: rgba(255,107,61,0.15); border-inline-start-color: var(--sun); }
.pnav .dot { display: none; position: absolute; top: 9px; inset-inline-start: 28px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); }
.pnav .dot.on { display: block; }
.phone-pane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.phone-sub { flex: none; display: flex; gap: 8px; padding: 14px 18px 0; }
.psub { position: relative; min-height: 40px; padding: 8px 18px; background: none; border: 1px solid var(--line); color: var(--mute); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.psub:hover { color: var(--sand); }
.psub.active { background: var(--sand); border-color: var(--sand); color: var(--night); }
.psub.dot-on::after { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.phone-body { padding: 16px 18px 20px; gap: 12px; }
.phone-body > * { flex: none; }
.p-head { font-size: 12px; font-weight: 700; color: var(--mute); letter-spacing: 0.05em; margin-top: 8px; }
.p-head:first-child { margin-top: 0; }
.row-card { padding: 14px; gap: 14px; }
.row-card > div { min-width: 0; }
.row-card .grow { flex: 1; }
.row-card.col { gap: 10px; }
.row-card h4 { font-size: 14.5px; margin-bottom: 3px; line-height: 1.35; }
.row-card p { font-size: 12.5px; line-height: 1.5; }
.row-card p.gap { margin-top: 8px; }
.row-card.accent { border-top: 2px solid var(--sea); background: rgba(25,195,178,0.06); }
.row-card.active { border-inline-start: 3px solid var(--ok); }
.row-card p.body-text { font-size: 13.5px; color: var(--sand); line-height: 1.6; }
.row-card p.status-line { font-size: 13px; font-weight: 700; color: var(--gold); }
.row-card p.mini-label { font-size: 11.5px; font-weight: 700; color: var(--mute); }
.lead-row { display: flex; align-items: center; gap: 12px; }
.big-ico { flex: none; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: rgba(25,195,178,0.16); }
.lead-row .pay { margin-inline-start: auto; flex: none; color: var(--ok); font-size: 15px; font-variant-numeric: tabular-nums; }
.act-btn { flex: none; min-height: 40px; padding: 10px 14px; font-size: 13px; font-family: inherit; }
.act-btn.wide { min-height: 46px; }
.act-btn.danger { color: var(--bad); border-color: rgba(255,77,94,0.5); }
a.act-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.fb-link { margin-top: 8px; }
.grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 13px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--sand); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pchip:hover { background: rgba(255,255,255,0.1); }
.pchip.on { border-color: var(--sea); background: rgba(25,195,178,0.2); }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; padding: 12px 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--sand); font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer; }
.quick:hover { background: rgba(255,255,255,0.1); }
.quick i { font-style: normal; font-size: 24px; line-height: 1; }
.quick kbd { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; }
.stat-row span { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--mute); }
.stat-row b { font-size: 17px; color: var(--sand); font-variant-numeric: tabular-nums; }
.map-wrap { display: flex; justify-content: center; }
.phone-body .map-wrap canvas { width: min(100%, 58vh); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--mute); }
.legend span { display: inline-flex; align-items: center; }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-inline-end: 6px; }
.lg.me { background: #fff; }
.lg.sq { border-radius: 0; background: var(--sea); border: 1px solid #fff; }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-row { display: block; width: 100%; padding: 12px 14px; text-align: right; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-inline-start: 4px solid transparent; color: var(--sand); font-family: inherit; cursor: pointer; }
.opt-row b { display: block; font-size: 14px; margin-bottom: 3px; }
.opt-row small { font-size: 12px; color: var(--mute); line-height: 1.45; }
.opt-row.on { border-inline-start-color: var(--sea); background: rgba(25,195,178,0.16); }
.load-row { display: flex; gap: 8px; }
.load-row input { flex: 1; min-width: 0; background: rgba(0,0,0,0.35); border: 1px solid var(--line); padding: 10px 12px; color: #fff; font-size: 16px; font-family: inherit; outline: none; user-select: text; -webkit-user-select: text; }
.load-row input:focus { border-color: var(--sea); }
.new-tag { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--sun); color: #1a0d06; padding: 2px 6px; margin-inline-start: 8px; vertical-align: middle; }
.kv { gap: 12px; padding: 5px 0; } .kv b { flex: none; text-align: left; }

/* --- צומת החלטה ותוצאה --- */
#decision { padding: 16px; }
.d-card { width: min(620px, 100%); max-height: 100%; overflow-y: auto; touch-action: pan-y; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.d-head { gap: 14px; margin-bottom: 16px; }
.d-head > span { flex: none; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: rgba(255,194,75,0.12); }
.d-head small { display: block; margin-bottom: 2px; }
.d-head strong { font-size: 17px; line-height: 1.3; }
#d-step { flex: none; margin-inline-start: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--mute); border: 1px solid var(--line); padding: 5px 10px; white-space: nowrap; }
#d-prompt { font-size: 16.5px; line-height: 1.6; margin-bottom: 18px; }
#d-options { gap: 10px; }
.d-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 13px 14px; font-family: inherit; transition: background 0.12s, transform 0.12s; }
.d-opt:active { transform: scale(0.99); }
.d-opt:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }
.d-opt kbd { flex: none; margin: 0; font-size: 13px; padding: 6px 9px; }
.d-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.d-txt em { font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--mute); }
.d-opt[data-tag="system"] em { color: var(--sea); } .d-opt[data-tag="bold"] em { color: var(--sun); } .d-opt[data-tag="people"] em { color: var(--gold); }
.d-opt strong { margin: 0; font-size: 15px; line-height: 1.4; }
.d-opt small { font-size: 12.5px; line-height: 1.45; }
.d-result { display: flex; flex-wrap: wrap; gap: 10px; }
.d-result span { padding: 9px 16px; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.d-result .good { color: var(--ok); background: rgba(47,208,138,0.12); } .d-result .bad { color: var(--bad); background: rgba(255,77,94,0.12); }
.d-next { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 54px; margin-top: 6px; padding: 12px; background: var(--gold); border: 0; color: #1a1205; font-family: inherit; font-size: 16px; font-weight: 900; cursor: pointer; }
.d-next kbd { color: #1a1205; border-color: rgba(26,18,5,0.35); background: rgba(26,18,5,0.1); margin-right: 10px; }
.d-foot { margin-top: 14px; font-size: 12px; line-height: 2; }
.d-foot:empty { display: none; }

/* --- מסך הפתיחה: כותרת, גוף נגלל, וכפתורים שתמיד נראים --- */
#start-modal { padding: 16px; overflow: hidden; }
.modal-card { width: min(700px, 100%); max-height: 100%; padding: 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.mc-head { flex: none; padding: 22px 26px 14px; }
.modal-card h1 { margin: 10px 0 8px; }
.lead { margin: 0; font-size: 14.5px; line-height: 1.55; }
.step-pills { flex: none; margin: 0; padding: 0 26px; gap: 6px; }
.s-pill { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 12px; font-size: 13.5px; font-family: inherit; }
.s-pill b { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; }
.s-pill.active b { background: var(--sun); border-color: var(--sun); color: #1a0d06; }
.mc-body { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; padding: 20px 26px 16px; }
.field-row { margin-bottom: 20px; }
.field-row label { font-size: 13px; margin-bottom: 8px; }
.field-row input { padding: 12px 14px; }
.grid-2 { gap: 10px; }
.opt-card { min-height: 66px; padding: 12px 14px; column-gap: 12px; font-family: inherit; }
.opt-card span { font-size: 26px; }
.opt-card strong { font-size: 14.5px; }
.opt-card small { font-size: 12px; line-height: 1.4; }
.opt-card:hover, .chip-btn:hover { background: rgba(255,255,255,0.09); }
.opt-card.active:hover, .chip-btn.active:hover { background: rgba(255,107,61,0.2); }
.chip-btn { min-height: 42px; padding: 9px 14px; font-size: 13px; font-family: inherit; }
.keys-hint { font-size: 12.5px; line-height: 2; }
.keys-hint kbd { margin: 0 2px 0 4px; }
.disclaimer { margin-top: 2px; }
.w-actions { flex: none; margin: 0; gap: 10px; padding: 14px 26px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(0,0,0,0.22); }
.btn-pri, .btn-sec { min-height: 50px; font-family: inherit; }

/* --- מסך העזרה --- */
#help { position: fixed; inset: 0; z-index: 37; background: rgba(5,8,22,0.74); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.help-card { width: min(900px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--sea); box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.help-top { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
.help-body { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; padding: 18px 20px 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 28px; align-content: start; }
.help-body h4 { font-size: 13.5px; color: var(--gold); padding-bottom: 7px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.hk { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 13px; line-height: 1.45; }
.hk .keys { flex: none; min-width: 96px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; direction: ltr; justify-content: flex-end; }
.hk .keys kbd { margin: 0; font-size: 11.5px; padding: 4px 7px; }
.hk .keys i { font-style: normal; color: var(--mute); }
.help-touch .hk .keys { min-width: 52px; font-size: 18px; justify-content: center; }
.help-pad .hk .keys { min-width: 52px; font-size: 11.5px; font-weight: 700; color: var(--mute); }
@media (pointer: coarse) { .help-kb { display: none; } }
@media (hover: hover) and (pointer: fine) { .help-touch { display: none; } }

/* --- ג׳ויסטיק מגע --- */
#joy-zone { display: none; position: fixed; left: 0; bottom: 0; z-index: 19; width: 46vw; height: clamp(190px, 46vh, 340px); touch-action: none; }
body.started.ctl-stick #joy-zone, body.started.ctl-hybrid #joy-zone { display: block; }
#joy-base { position: absolute; left: calc(18px + env(safe-area-inset-left, 0px)); bottom: calc(18px + var(--safe-b)); width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(244,227,193,0.28); background: radial-gradient(circle, rgba(11,16,32,0.3), rgba(11,16,32,0.62)); backdrop-filter: blur(3px); opacity: 0.78; transition: opacity 0.15s, border-color 0.15s; pointer-events: none; }
#joy-base.on { bottom: auto; opacity: 1; border-color: var(--sea); }
#joy-knob { width: 58px; height: 58px; border-radius: 50%; background: rgba(25,195,178,0.78); border: 2px solid rgba(255,255,255,0.6); box-shadow: 0 4px 14px rgba(0,0,0,0.45); will-change: transform; }
@media (hover: hover) and (pointer: fine) { #joy-zone { display: none !important; } }
body.ctl-stick #k-left, body.ctl-stick #k-right, body.ctl-hybrid #k-left, body.ctl-hybrid #k-right, body.ctl-stick #k-gas, body.ctl-stick #k-brake { display: none; }
.key-btn.sm small { font-size: 8.5px; font-weight: 700; }
.walk-btn { background: rgba(244,227,193,0.2); }
body.ctl-stick .c-stack { flex-direction: row; align-items: flex-end; }
body.ctl-stick .drift-btn, body.ctl-stick .nitro-btn { width: clamp(62px, 17vw, 76px); height: clamp(62px, 17vw, 76px); font-size: 24px; }
body.ctl-stick .key-btn.sm small { font-size: 9.5px; }
/* כפתור היציאה: בג׳ויסטיק מלא הוא בשורה עם דריפט וטורבו. בשאר המצבים הוא מעל הדוושות */
body:not(.ctl-stick) #k-walk { position: absolute; bottom: calc(100% + 10px); right: 0; }
body.air-mode:not(.ctl-stick) #k-walk { right: auto; left: 0; }
body.air-mode.ctl-stick #k-down-alt, body.air-mode.ctl-hybrid #k-down-alt { left: auto; right: calc(clamp(60px, 15vw, 78px) + 8px); }

/* --- טלפון לאורך --- */
@media (max-width: 720px) {
  .badge, .hud-btn { min-height: 36px; }
  #hud .hud-btn { min-width: 42px; justify-content: center; font-size: 16px; }
  #phone-overlay, #help, #start-modal { padding: 0; }
  .phone, .help-card { width: 100%; height: 100%; max-height: none; border-inline: 0; border-bottom: 0; }
  .phone-top, .help-top { padding: calc(8px + var(--safe-t)) 12px 8px; }
  .phone-main { flex-direction: column-reverse; }
  #ph-rep { display: none; }
  #hud-rep span { display: none; }
  .phone-nav { width: 100%; flex-direction: row; gap: 2px; padding: 4px 4px calc(4px + var(--safe-b)); border-inline-end: 0; border-top: 1px solid var(--line); }
  .pnav { flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; font-size: 11.5px; text-align: center; border-inline-start: 0; border-top: 3px solid transparent; }
  .pnav.active { border-top-color: var(--sun); }
  .pnav i { font-size: 21px; }
  .pnav .dot { top: 6px; inset-inline-start: calc(50% + 6px); }
  .phone-sub { padding: 12px 12px 0; gap: 6px; }
  .psub { flex: 1; padding: 8px 4px; }
  .phone-body { padding: 14px 12px 18px; }
  .grid-list { grid-template-columns: 1fr; }
  .quick-grid, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .phone-body .map-wrap canvas { width: 100%; }
  #decision { align-items: flex-end; padding: 0; }
  .d-card { width: 100%; max-height: 94%; padding: 20px 16px calc(20px + var(--safe-b)); border-inline: 0; border-bottom: 0; }
  #d-prompt { font-size: 16px; }
  .modal-card { width: 100%; height: 100%; border-inline: 0; border-bottom: 0; }
  .mc-head { padding: calc(16px + var(--safe-t)) 16px 10px; }
  .step-pills { padding: 0 8px; gap: 0; }
  .s-pill { flex: 1; justify-content: center; padding: 10px 2px; font-size: 12.5px; gap: 6px; }
  .mc-body { padding: 16px 16px 12px; }
  .w-actions { padding: 12px 16px calc(12px + var(--safe-b)); }
  .help-body { padding: 14px 16px 20px; grid-template-columns: 1fr; }
}
/* --- טלפון לרוחב --- */
@media (max-height: 480px) {
  #phone-overlay, #help, #start-modal { padding: 0; }
  .phone, .help-card { width: 100%; height: 100%; max-height: none; border-inline: 0; border-bottom: 0; }
  .phone-top, .help-top { padding: 5px calc(12px + env(safe-area-inset-right, 0px)) 5px calc(12px + env(safe-area-inset-left, 0px)); }
  #btn-close-phone, #btn-close-help { min-height: 38px; }
  .badge, .hud-btn { min-height: 36px; }
  #hud .hud-btn { min-width: 42px; justify-content: center; font-size: 16px; }
  .phone-main { flex-direction: row; }
  .phone-nav { width: 92px; flex-direction: column; gap: 2px; padding: 4px; border-top: 0; border-inline-end: 1px solid var(--line); overflow-y: auto; touch-action: pan-y; }
  .pnav { flex: 1; flex-direction: column; justify-content: center; gap: 1px; min-height: 44px; padding: 3px 2px; font-size: 11px; text-align: center; border-top: 0; border-inline-start: 3px solid transparent; }
  .pnav.active { border-inline-start-color: var(--sun); }
  .pnav i { font-size: 18px; } .pnav kbd { display: none; }
  .pnav .dot { top: 4px; inset-inline-start: calc(50% + 6px); }
  .phone-sub { padding: 8px 12px 0; } .psub { flex: 0 1 auto; min-height: 36px; padding: 6px 16px; }
  .phone-body { padding: 10px 12px 14px; gap: 10px; }
  .grid-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .quick-grid, .stat-row { grid-template-columns: repeat(4, 1fr); }
  .quick { min-height: 70px; }
  .phone-body .map-wrap canvas { width: min(100%, 100vh); }
  #decision { align-items: center; padding: 6px; }
  .d-card { width: min(820px, 100%); max-height: 100%; padding: 12px 16px; border: 1px solid var(--line); border-top: 3px solid var(--gold); }
  .d-head { margin-bottom: 8px; gap: 10px; } .d-head > span { width: 40px; height: 40px; font-size: 24px; } .d-head strong { font-size: 15px; }
  #d-prompt { font-size: 14.5px; line-height: 1.5; margin-bottom: 10px; }
  #d-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .d-opt { align-items: flex-start; min-height: 0; padding: 10px; }
  .d-opt strong { font-size: 13.5px; } .d-opt small { font-size: 12px; }
  .d-result, .d-next { grid-column: 1 / -1; } .d-next { min-height: 46px; margin-top: 0; }
  .d-foot { display: none; }
  .modal-card { width: 100%; height: 100%; border-inline: 0; border-bottom: 0; }
  .mc-head { display: flex; align-items: baseline; gap: 14px; padding: 8px 16px 2px; }
  .modal-card h1 { font-size: 17px; margin: 0; }
  .step-pills { padding: 0 8px; } .s-pill { min-height: 36px; padding: 6px 12px; }
  .mc-body { padding: 10px 16px 8px; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .field-row { margin-bottom: 12px; }
  .opt-card { min-height: 54px; padding: 8px 12px; }
  .w-actions { padding: 8px 16px calc(8px + var(--safe-b)); }
  .btn-pri, .btn-sec { min-height: 42px; padding: 8px 14px; }
  .help-body { padding: 10px 16px 14px; grid-template-columns: repeat(2, 1fr); gap: 12px 22px; }
  #joy-base { width: 112px; height: 112px; } #joy-knob { width: 50px; height: 50px; }
}
.brand, #boot > div { direction: ltr; } .brand { text-align: right; }
#hud { justify-content: flex-end; }
.phone-body, .mc-body, .help-body, .d-card, #hud-menu { scrollbar-width: thin; scrollbar-color: rgba(244,227,193,0.25) transparent; }
/* חלון מחשב צר: המשימה יורדת מתחת לשורה העליונה במקום לעלות עליה */
@media (max-width: 1100px) and (min-width: 721px) and (min-height: 481px) { #mission-panel, #mission-panel.mini { top: calc(52px + var(--safe-t)); } }
/* חלון נמוך: המפה נשארת למעלה ולא נמתחת בין שני הקצוות */
@media (max-height: 480px) { #radar-box { bottom: auto; } }
/* שורת הרמזים: כל רמז ביחידה משלו, כדי שעברית ואנגלית לא יתערבבו בסדר */
#ctx-hint { display: flex; gap: 0; padding: 6px 4px; }
#ctx-hint span { display: inline-block; padding: 0 10px; border-inline-start: 1px solid var(--line); white-space: nowrap; }
#ctx-hint span:first-child { border-inline-start: 0; }
@media (max-width: 720px) { #ctx-hint { flex-wrap: wrap; justify-content: center; row-gap: 4px; white-space: normal; max-width: 94vw; } #ctx-hint span { padding: 0 7px; } }
.badge.num strong { white-space: nowrap; }

/* ---------- מפה אמיתית: קרדיט חובה ל-OpenStreetMap (רישיון ODbL) ---------- */
#radar-hood { font-size: 10px; color: var(--mute); min-height: 12px; }
@media (max-width: 720px), (max-height: 480px) { #radar-hood { display: none; } }
#osm-credit { display: block; font-size: 8.5px; line-height: 1.25; color: var(--mute); text-decoration: none; margin-top: 3px; direction: ltr; opacity: 0.9; }
.map-wrap { position: relative; }
.phone-body .map-wrap.map-big { direction: ltr; display: block; overflow: auto; max-height: 64vh; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.phone-body .map-wrap.map-big canvas { width: 1200px; max-width: none; display: block; }
.map-credit.map-credit-out { position: static; display: inline-block; margin-top: 4px; }
.map-credit { position: absolute; left: 6px; bottom: 6px; font-size: 10px; direction: ltr; color: #dfe6f5; background: rgba(10,14,26,0.7); padding: 2px 6px; border-radius: 4px; text-decoration: none; }

/* ---------- מרחק ליעד בכרטיס המשימה ---------- */
#m-dist { margin-inline-start: auto; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
#m-dist:empty { display: none; }

/* ---------- מסך הטעינה: לוגו, קו אופק שמתמלא, ושורה שאומרת מה קורה ---------- */
#boot { background: radial-gradient(120% 75% at 50% 112%, rgba(255,107,61,0.34), rgba(255,194,75,0.08) 38%, rgba(11,16,32,0) 62%), var(--night); transition: opacity 0.8s; }
#boot .boot-logo { animation: bootIn 0.9s cubic-bezier(.2,.8,.2,1) both; }
#boot .brand-a, #boot .brand-b { font-size: clamp(26px, 6.4vw, 52px); letter-spacing: 0.2em; }
#boot .boot-line { width: min(340px, 70vw); height: 2px; margin: 22px auto 0; background: rgba(244,227,193,0.16); overflow: hidden; }
#boot .boot-line { position: relative; }
#boot .boot-line i { display: block; height: 100%; width: 100%; transform: scaleX(0.04); transform-origin: 0 50%; background: linear-gradient(90deg, var(--sun), var(--gold)); will-change: transform; }
#boot .boot-line::after { content: ''; position: absolute; top: 0; bottom: 0; width: 34%; left: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent); animation: bootShine 1.5s linear infinite; will-change: transform; }
@keyframes bootShine { from { transform: translateX(-110%); } to { transform: translateX(400%); } }
#boot p { margin-top: 14px; font-size: 13px; letter-spacing: 0.02em; direction: rtl; min-height: 1.4em; }
@keyframes bootIn { from { opacity: 0; transform: translateY(10px); letter-spacing: 0.4em; } to { opacity: 1; transform: none; } }

/* ---------- מסך הכותרת: העיר מאחור, שורה אחת גדולה, כפתור אחד ---------- */
#title-screen { position: fixed; inset: 0; z-index: 41; display: flex; flex-direction: column; justify-content: space-between; padding: calc(22px + var(--safe-t)) clamp(18px, 5vw, 64px) calc(16px + var(--safe-b));
  background: linear-gradient(to top, rgba(11,16,32,0.94) 0%, rgba(11,16,32,0.62) 30%, rgba(11,16,32,0) 60%), linear-gradient(to bottom, rgba(11,16,32,0.55), rgba(11,16,32,0) 22%); transition: opacity 0.5s; }
#title-screen.gone, body.started #title-screen { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
body.started #title-screen { display: none; }
#title-screen .ts-top { direction: ltr; text-align: right; }
#title-screen .ts-top .brand-a, #title-screen .ts-top .brand-b { font-size: clamp(15px, 2.2vw, 20px); letter-spacing: 0.22em; }
#title-screen .ts-main { max-width: 640px; margin-top: auto; animation: tsIn 0.9s 0.25s cubic-bezier(.2,.8,.2,1) both; }
#title-screen .ts-kicker { color: var(--gold); font-size: clamp(11px, 1.5vw, 13px); font-weight: 700; letter-spacing: 0.16em; margin-bottom: 10px; text-shadow: 0 1px 10px rgba(5,8,22,0.9), 0 0 2px rgba(5,8,22,0.8); }
#title-screen h1 { font-size: clamp(38px, min(9vw, 15vh), 92px); font-weight: 900; line-height: 0.98; color: #fff; text-shadow: 0 3px 30px rgba(5,8,22,0.7); }
#title-screen h1.ts-name { text-align: right; }
#title-screen h1.ts-name .brand-a, #title-screen h1.ts-name .brand-b { font-size: inherit; letter-spacing: 0.06em; margin: 0; }
/* השם בעברית, "אני בדרך": שורה אחת ב-Rubik 900 (העברית של Meir Sadan), בלי ריווח אותיות כי ריווח מפרק אותיות עבריות.
   "בדרך" בכתום של השמש, ומתחת שורת משנה לטינית קטנה ISRAEL HORIZON, כדי שמי שהכיר את השם הקודם יזהה */
.brand-he .brand-a, .brand-he .brand-b { letter-spacing: 0; margin: 0; }
.brand.brand-he, #boot .boot-logo.brand-he { direction: rtl; }
#boot .brand-he .brand-a, #boot .brand-he .brand-b { font-size: clamp(34px, 8.4vw, 64px); letter-spacing: 0; }
#title-screen h1.ts-name.brand-he { font-size: clamp(50px, min(15vw, 17vh), 118px); line-height: 1; }
#title-screen h1.ts-name.brand-he .brand-a, #title-screen h1.ts-name.brand-he .brand-b { letter-spacing: -0.01em; }
#title-screen .ts-sub { margin: 8px -0.42em 0 0; font-size: clamp(10px, 1.4vw, 13px); font-weight: 700; letter-spacing: 0.42em; color: var(--sand); opacity: 0.75; text-align: right; text-shadow: 0 1px 10px rgba(5,8,22,0.9); }
#title-screen .ts-lead { margin: 14px 0 22px; font-size: clamp(14px, 2vw, 18px); color: var(--sand); line-height: 1.5; max-width: 460px; }
#title-screen .ts-actions { display: flex; gap: 10px; max-width: 460px; }
#title-screen .ts-actions .btn-pri { flex: 2; font-size: clamp(17px, 2.4vw, 21px); padding: 16px 18px; box-shadow: 0 10px 40px rgba(255,107,61,0.35); transition: transform 0.15s, box-shadow 0.15s; }
#title-screen .ts-actions .btn-pri:hover { transform: translateY(-2px); box-shadow: 0 14px 46px rgba(255,107,61,0.5); }
#title-screen .ts-actions .btn-sec { flex: 1; background: rgba(11,16,32,0.5); }
#title-screen .ts-hint { margin-top: 10px; min-height: 1.4em; font-size: clamp(12px, 1.6vw, 14px); color: var(--sand); opacity: 0; transition: opacity 0.6s 0.3s; text-shadow: 0 1px 10px rgba(5,8,22,0.9); }
#title-screen .ts-hint.on { opacity: 0.9; }
/* השמירה: הכרטיס הצף (רק כשהרכב עומד), הנקודה על הטלפון, וכרטיס הדפדפן שבתוך אפליקציה */
#save-tip, #upd-tip { position: fixed; z-index: 35; top: calc(60px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: min(400px, calc(100vw - 24px)); }
#save-tip .row-card, #upd-tip .row-card, #iab-tip .row-card { background: rgba(11,16,32,0.94); backdrop-filter: blur(10px); box-shadow: 0 12px 40px rgba(0,0,0,0.45); }
#save-tip p, #upd-tip p, #iab-tip p, .save-card p { font-size: 13px; color: var(--sand); line-height: 1.45; }
.save-row { display: flex; flex-wrap: wrap; gap: 8px; }
.save-row .act-btn { flex: 1 1 auto; }
#btn-open-phone.tip::after { content: ''; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--night); }
#iab-tip { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,8,22,0.6); }
#iab-tip .row-card { max-width: 420px; }
@media (max-height: 480px) { #save-tip, #upd-tip { top: calc(50px + var(--safe-t)); width: min(560px, calc(100vw - 24px)); } #save-tip .row-card { padding: 10px; gap: 6px; } #save-tip p { font-size: 12px; } #save-tip .act-btn { min-height: 40px; padding: 6px 10px; } }
/* בטלפון (סקירת הטלפון 27.11): אישור של פעולת שמירה מוצג מעל הטלפון שבמשחק; שורת האייפון רק בכרטיס שבטלפון; הודעות ברוחב הטקסט ולא בחצי מסך */
body:has(#phone-overlay:not(.hidden)) #toast { z-index: 38; }
body:has(#iab-tip:not(.hidden)) #ts-hint { visibility: hidden; }
#save-tip p + p { display: none; }
#toast, #ctx-hint { width: max-content; }
@media (pointer: coarse) { #title-screen .ts-foot { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; font-size: 12px; margin-top: 8px; } #title-screen .ts-link, #title-screen .ts-foot a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; white-space: nowrap; } }
#title-screen .ts-foot { margin-top: 18px; font-size: 11px; color: var(--mute); }
#title-screen .ts-foot a { color: inherit; }
#title-screen .ts-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
/* קרדיטים: אותו תוכן בטלפון שבמשחק ובחלון ממסך הכותרת */
.credits { font-size: 12.5px; line-height: 1.5; color: var(--sand); }
.credits a { color: inherit; }
.credits .cr-osm { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.credits .cr-lead { margin-bottom: 10px; }
.credits .cr-list dt { font-weight: 700; color: var(--gold); margin-top: 8px; font-size: 12px; }
.credits .cr-list dd { margin: 2px 0 0; }
.credits .cr-ver { margin-top: 10px; font-size: 11px; color: var(--mute); direction: rtl; }
#credits-overlay { position: fixed; inset: 0; z-index: 72; background: rgba(5,8,22,0.72); display: flex; align-items: flex-start; justify-content: center; padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b)); overflow-y: auto; }
#credits-overlay .cr-box { width: min(560px, 100%); background: rgba(11,16,32,0.96); border: 1px solid var(--line); padding: 14px 16px; }
#credits-overlay .cr-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -14px; z-index: 1; background: rgba(11,16,32,0.96); margin: -14px -16px 8px; padding: 14px 16px 8px; }
#credits-overlay h3 { font-size: 16px; color: #fff; }
@keyframes tsIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
body:not(.started) #hud, body:not(.started) #radar-box, body:not(.started) #mission-panel, body:not(.started) #controls, body:not(.started) #joy-zone { visibility: hidden; }
@media (max-height: 420px) { #title-screen .ts-lead { margin: 8px 0 12px; } #title-screen .ts-hint { margin-top: 4px; } #title-screen .ts-kicker { margin-bottom: 4px; } #title-screen .ts-foot { margin-top: 8px; } #title-screen .ts-actions .btn-pri { padding: 10px 14px; } }
@media (prefers-reduced-motion: reduce) { #boot .boot-logo, #title-screen .ts-main { animation: none; } }
body.toasting #ctx-hint { opacity: 0; }

/* ---------- שורה עליונה במסך צר: שום דבר לא נדחק אל מחוץ למסך, והדף לא יכול לזוז הצידה ---------- */
html, body { overflow: clip; }
.hud-right > .badge { min-width: 0; overflow: hidden; }
.hud-right > .hud-btn { flex-shrink: 0; }
@media (max-width: 359px) {
  .hud-right { gap: 4px; }
  #hud .badge { padding: 5px 5px; gap: 4px; }
  .badge.boost .bar { width: 24px; }
  .phone-top { gap: 8px; }
  .phone-stats { gap: 8px; font-size: 12px; }
  #ph-rep { display: none; }
  #phone-title { font-size: 14px; }
}
/* מצב בודק (רק עם ?bodek=, לאורי): תג קבוע, חלון מידע, תוצאות החיפוש */
#tester-badge { position: fixed; z-index: 34; bottom: calc(6px + var(--safe-b, 0px)); left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,194,75,0.6); background: rgba(11,16,32,0.8); color: var(--gold); font: 700 11px Rubik, sans-serif; opacity: 0.85; }
#tester-badge:not(.on) { color: var(--sand); border-color: rgba(255,255,255,0.25); }
#tester-info { position: fixed; z-index: 34; bottom: calc(30px + var(--safe-b, 0px)); left: 8px; max-width: min(340px, calc(100vw - 16px)); padding: 8px; border-radius: 10px; background: rgba(5,8,22,0.82); color: #e6ecff; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
#tester-info pre { margin: 0; font: 11px/1.4 ui-monospace, Consolas, monospace; white-space: pre-wrap; direction: rtl; text-align: right; }
#tester-q { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: inherit; font: inherit; }
.tester-res { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }

/* ===== חוויית טלפון (28.11.2026): שוליים בטוחים מכל הצדדים, טקסט של 14 פיקסלים בזמן נסיעה, הזמנה להתקנה, השהיה ברקע ===== */
:root { --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
/* לרוחב החריץ של האייפון נמצא בצד: כל מה שצמוד לקצה מתרחק ממנו */
#hud { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); }
@media (pointer: coarse) { #radar-box { left: calc(10px + var(--safe-l)); } }
#mission-panel, #mission-panel.mini { right: calc(10px + var(--safe-r)); }
#controls { left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); }
#hud-menu { left: calc(10px + var(--safe-l)); }
@media (max-width: 720px) and (min-height: 481px) { #mission-panel, #mission-panel.mini { width: calc(100vw - 118px - var(--safe-l) - var(--safe-r)); } }   /* לרוחב בטלפון קטן נשאר הרוחב הקיים (38vw) */
/* מה שקוראים בזמן נסיעה: לפחות 14 פיקסלים במגע. במסך צר הטקסט נחתך בשלוש נקודות ולא דוחף את השאר */
@media (pointer: coarse) {
  .badge, .hud-btn, #hud .badge strong { font-size: 14px; }
  #radar-zone { font-size: 14px; line-height: 1.2; overflow-wrap: normal; word-break: keep-all; }
  .m-title, #mission-panel.mini .m-title, .m-pay, .m-desc, .m-footer, #mission-panel.mini .m-footer, #m-dist { font-size: 14px; }
  .m-sub, #btn-skip-mission { font-size: 14px; }
  #toast, #ctx-hint, #btn-action { font-size: 14px; }
  .speed-pill small { font-size: 14px; }
  .key-btn small, .key-btn.sm small, body.ctl-stick .key-btn.sm small { font-size: 14px; font-weight: 800; line-height: 1.1; }
  .key-btn.sm { font-size: 16px; }
  #banner small { font-size: max(14px, 0.38em); }
  #save-tip p, #upd-tip p { font-size: 14px; }
  #goal-hint { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (pointer: coarse) and (max-height: 480px) { #ctx-hint { font-size: 14px; padding: 4px 8px; } }

/* הזמנה להתקנה כאפליקציה: כרטיס קטן באמצע למעלה, רק כשהרכב כמעט עומד */
#install-tip { position: fixed; z-index: 36; top: calc(60px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: min(400px, calc(100vw - 24px - var(--safe-l) - var(--safe-r))); animation: tipIn 0.35s cubic-bezier(.2,.8,.2,1) both; }
#install-tip .row-card { background: rgba(11,16,32,0.95); backdrop-filter: blur(10px); box-shadow: 0 12px 40px rgba(0,0,0,0.5); border-top: 3px solid var(--sun); flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
#install-tip h4 { font-size: 16px; color: #fff; }
#install-tip p { font-size: 14px; color: var(--sand); line-height: 1.45; }
#install-tip .it-steps { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 700; color: #fff; direction: rtl; }
#install-tip .it-steps span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); }
#install-tip .it-steps svg { width: 22px; height: 22px; flex: none; }
#install-tip .it-arrow { color: var(--gold); font-size: 18px; }
#install-tip .save-row .act-btn { min-height: 44px; font-size: 14px; }
@media (max-height: 480px) { #install-tip { top: calc(50px + var(--safe-t)); } #install-tip .row-card { padding: 10px 12px; gap: 8px; } }
@keyframes tipIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translateX(-50%); } }

/* המשחק ירד לרקע: כשחוזרים, מסך השהיה קטן. נגיעה אחת ממשיכים מאותה נקודה */
#bg-pause { position: fixed; inset: 0; z-index: 66; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5,8,22,0.55); backdrop-filter: blur(3px); cursor: pointer; }
#bg-pause .bp-card { text-align: center; padding: 18px 26px; background: rgba(11,16,32,0.92); border: 1px solid var(--line); border-top: 3px solid var(--sea); }
#bg-pause strong { display: block; font-size: 20px; color: #fff; }
#bg-pause span { display: block; margin-top: 6px; font-size: 15px; color: var(--sand); }

/* באייפון אין רטט לאתרים: במקומו הבהוב עדין בשולי המסך (זהב לאירוע טוב, אדום לפגיעה) */
#cue-flash { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; box-shadow: inset 0 0 70px 12px var(--cue, rgba(255,194,75,0.55)); }
#cue-flash.on { animation: cueFlash 0.32s ease-out; }
@keyframes cueFlash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #cue-flash.on { animation-duration: 0.5s; } #install-tip { animation: none; } }

/* ===== תפריט בטלפון, עזרה גלויה וכפתור התקנה (28.11.2026) ===== */
/* בשורה העליונה במגע: ☰ בפינה ו-? לידו. אותו גודל כמו כפתור הטלפון, עם מסגרת בצבע הים כדי שיבלטו */
#btn-hud-more.tm-open { font-size: 20px; border-color: rgba(25,195,178,0.75); }
#btn-hud-help { font-size: 18px; font-weight: 900; color: var(--gold); justify-content: center; }
/* לאורך יש עכשיו שלושה כפתורים בשורה: הכפתורים והפס של הטורבו קצת צרים יותר, כדי שהכסף והרמה לא ייחתכו */
@media (pointer: coarse) and (max-width: 720px) { .hud-right { gap: 4px; } #hud .hud-btn { min-width: 38px; padding-inline: 4px; } .badge.boost .bar { width: 22px; } #hud .badge { padding-inline: 6px; gap: 4px; } }
@media (pointer: coarse) and (max-width: 380px) { .hud-right { gap: 3px; } #hud .badge { padding-inline: 4px; gap: 3px; } #hud .hud-btn { min-width: 36px; } .badge.boost .bar { width: 16px; } }
/* החלון: מגיע מלמטה לאורך, מהצד לרוחב. רקע כהה בלי טשטוש, כך שרואים מאחור מה המצלמה שנבחרה */
#tmenu { position: fixed; inset: 0; z-index: 38; display: flex; align-items: flex-end; justify-content: center; background: rgba(5,8,22,0.5); }
.tm-card { width: min(560px, 100%); max-height: 86%; display: flex; flex-direction: column; background: rgba(11,16,32,0.97); border: 1px solid var(--line); border-bottom: 0; border-top: 3px solid var(--sea); box-shadow: 0 -16px 44px rgba(0,0,0,0.5); padding-bottom: var(--safe-b); padding-inline: var(--safe-r) var(--safe-l); animation: tmUp 0.18s ease-out both; }
@keyframes tmUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.tm-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tm-top strong { font-size: 17px; color: #fff; }
.tm-paused { font-size: 14px; color: var(--mute); margin-inline-start: auto; }
#btn-close-tmenu { min-width: 44px; min-height: 44px; font-size: 18px; font-family: inherit; color: var(--sand); background: rgba(255,255,255,0.05); border: 1px solid var(--line); cursor: pointer; }
.tm-body { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tm-body > * { flex-shrink: 0; }   /* לרוחב הלוח נמוך: גוללים, ושום שורה לא נמעכת */
.tm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tm-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 78px; padding: 8px 4px; text-align: center; font-family: inherit; color: var(--sand); background: rgba(255,255,255,0.05); border: 1px solid var(--line); cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tm-btn:active { background: rgba(25,195,178,0.22); }
.tm-btn i { font-style: normal; font-size: 26px; line-height: 1; }
.tm-btn span { display: flex; flex-direction: column; gap: 2px; }
.tm-btn b { font-size: 15px; color: #fff; line-height: 1.2; }
.tm-btn small { font-size: 14px; color: var(--mute); line-height: 1.2; }
.tm-btn.on small { color: var(--sea); }
.tm-btn.help { border-color: rgba(255,194,75,0.6); }
.tm-btn.install { border-color: var(--sun); background: rgba(255,107,61,0.14); }
.tm-set { grid-template-columns: repeat(4, 1fr); }
.tm-set .tm-btn { min-height: 70px; }
.tm-label { font-size: 14px; font-weight: 700; color: var(--mute); margin-top: 4px; }
.tm-veh { display: flex; gap: 8px; overflow-x: auto; touch-action: pan-x; padding-bottom: 2px; }
.tm-chip { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; min-height: 56px; padding: 6px 8px; font-family: inherit; color: var(--sand); background: rgba(255,255,255,0.05); border: 1px solid var(--line); cursor: pointer; }
.tm-chip i { font-style: normal; font-size: 22px; line-height: 1; }
.tm-chip small { font-size: 14px; white-space: nowrap; }
.tm-chip.on { border-color: var(--sea); background: rgba(25,195,178,0.22); }
@media (max-width: 359px) { .tm-set { grid-template-columns: repeat(2, 1fr); } }
/* לרוחב: לוח בצד ימין, כל הגובה, כך שהכביש נשאר גלוי משמאל */
@media (max-height: 480px) {
  #tmenu { align-items: stretch; justify-content: flex-start; }
  .tm-card { width: min(470px, 62vw); max-height: none; height: 100%; border-top: 0; border-bottom: 0; border-inline-end: 3px solid var(--sea); box-shadow: 16px 0 44px rgba(0,0,0,0.5); padding: 0 var(--safe-r) var(--safe-b) 0; animation-name: tmSide; }
  .tm-top { padding: calc(4px + var(--safe-t)) 12px 4px; }
  .tm-btn { min-height: 64px; } .tm-set .tm-btn { min-height: 60px; }
  .tm-btn i { font-size: 22px; }
}
@keyframes tmSide { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tm-card { animation: none; } }
/* כפתור ההתקנה במסך הפתיחה: מתחת לכפתור הראשי, ברור אבל לא מתחרה בו */
#title-screen .ts-install { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; min-height: 44px; padding: 0 18px; font: 700 15px Rubik, sans-serif; color: #fff; background: rgba(11,16,32,0.5); border: 1px solid rgba(255,194,75,0.65); cursor: pointer; }
#title-screen .ts-install.hidden { display: none; }
@media (max-height: 420px) { #title-screen .ts-install { margin-top: 8px; min-height: 40px; } }
/* חלון ההתקנה שנפתח בכפתור: באמצע המסך, מעל הכול (גם מעל מסך הפתיחה), והמשחק עוצר */
#install-tip.modal { inset: 0; top: 0; left: 0; transform: none; width: auto; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 16px calc(16px + var(--safe-r)) 16px calc(16px + var(--safe-l)); background: rgba(5,8,22,0.6); animation: none; }
#install-tip.modal .row-card { width: min(420px, 100%); max-height: 100%; overflow-y: auto; }
#install-tip .it-note { font-size: 14px; color: var(--mute); text-align: center; }
@media (max-width: 380px) { #install-tip .it-steps { gap: 6px; } #install-tip .it-steps span { padding: 6px 6px; } }

/* ===== טלפון, סבב 3 (28.11.2026 בלילה): בכל מסך מגע אין טקסט מתחת ל-14 פיקסלים ואין יעד מגע קטן מ-44 על 44 =====
   בסוף הקובץ ועם מזהה של מכל (#phone-overlay, #help, #title-screen, #start-modal), כדי לגבור על הכללים המוקדמים שבתוך שאילתות המסך */
@media (pointer: coarse) {
  /* השורה העליונה: כפתורים וחלונות של 44, והמפה וכרטיס המשימה יורדים בהתאם (8 למעלה, 44 השורה, 4 רווח) */
  #hud .hud-btn { min-width: 44px; min-height: 44px; justify-content: center; }
  #hud .badge { min-height: 44px; }
  #mission-panel #btn-skip-mission { min-height: 44px; font-size: 14px; }
  /* הקרדיט של המפה בזמן נסיעה: לא קישור במגע (נגיעה בטעות הייתה פותחת דף אחר באמצע נסיעה) אלא שורה בגודל קריא מתחת למפה.
     הקישור המלא נשאר בטלפון שבמשחק: על המפה ובשמירה וקרדיטים */
  #radar-box { overflow: visible; }
  #radar-box #osm-credit { position: absolute; top: calc(100% + 8px); left: -1px; font-size: 14px; line-height: 1.2; white-space: nowrap; padding: 2px 6px; margin: 0; color: var(--sand); background: rgba(10,14,26,0.55); pointer-events: none; opacity: 1; }

  /* מסך הפתיחה */
  #title-screen .ts-kicker, #title-screen .ts-sub, #title-screen .ts-hint { font-size: 14px; }
  #title-screen .ts-sub { letter-spacing: 0.3em; margin-inline-end: -0.3em; }
  #title-screen .ts-foot, #title-screen .ts-foot a, #title-screen .ts-foot .ts-link { font-size: 14px; }
  #title-screen .ts-foot a, #title-screen .ts-foot .ts-link { min-height: 44px; min-width: 44px; justify-content: center; }
  #title-screen .ts-install { min-height: 44px; }

  /* בחירת דמות ופתיחת משחק */
  #start-modal .s-pill, #start-modal .s-pill b { font-size: 14px; }
  #start-modal .s-pill { min-height: 44px; }
  #start-modal .field-row label, #start-modal .cs-card small, #start-modal .opt-card small, #start-modal .disclaimer { font-size: 14px; }
  #start-modal .btn-pri, #start-modal .btn-sec { min-height: 44px; }

  /* הטלפון שבמשחק */
  #phone-overlay #ph-cash, #phone-overlay #ph-rep, #phone-overlay .pnav span, #phone-overlay .p-head, #phone-overlay .row-card p, #phone-overlay .lead-row p,
  #phone-overlay .body-text, #phone-overlay .status-line, #phone-overlay .mini-label, #phone-overlay .quick span, #phone-overlay .legend span,
  #phone-overlay .stat-row span, #phone-overlay .kv span, #phone-overlay .kv b, #phone-overlay .opt-row small, #phone-overlay .credit, #phone-overlay .credit a,
  #phone-overlay .map-credit, #phone-overlay .psub, #phone-overlay .pchip, #phone-overlay .act-btn { font-size: 14px; }
  #phone-overlay .psub, #phone-overlay .pchip, #phone-overlay .act-btn, #phone-overlay #inp-save, #phone-overlay #btn-close-phone { min-height: 44px; }
  #phone-overlay .credit a { display: inline-flex; align-items: center; min-height: 44px; }

  /* העזרה */
  #help h4, #help .hk span, #help .hk .keys { font-size: 14px; }
  #help #btn-close-help { min-height: 44px; }
}
/* לאורך: השורה העליונה גבוהה יותר, אז המפה וכרטיס המשימה מתחילים מתחתיה */
@media (pointer: coarse) and (max-width: 720px) and (min-height: 481px) { #radar-box, #mission-panel, #mission-panel.mini { top: calc(56px + var(--safe-t)); } }
@media (pointer: coarse) and (max-height: 480px) { #radar-box, #mission-panel, #mission-panel.mini { top: calc(56px + var(--safe-t)); } }

/* הודעה קצרה כשהתפריט ☰ פתוח: מעליו ולא מתחתיו. לאורך מתחת לשורה העליונה (מעל הלוח שעולה מלמטה), לרוחב באמצע החלק הפנוי שמשמאל ללוח */
body:has(#tmenu:not(.hidden)) #toast { z-index: 39; }
@media (max-height: 480px) { body:has(#tmenu:not(.hidden)) #toast { left: calc((100vw - min(470px, 62vw)) / 2); bottom: auto; top: 50%; max-width: calc(100vw - min(470px, 62vw) - 24px); width: max-content; } }
@media (min-height: 481px) { body:has(#tmenu:not(.hidden)) #toast { bottom: auto; top: calc(58px + var(--safe-t)); } }
/* כפתור הטורבו: נלחץ (קטן קצת) כשנוגעים, אבל דולק רק כשהטורבו באמת עובד (main.js מסמן body.nitro) */
.key-btn.nitro-btn.on { background: rgba(25,195,178,0.55); }
body.nitro .key-btn.nitro-btn.on { background: rgba(25,195,178,0.95); box-shadow: 0 0 18px rgba(25,195,178,0.7); }
/* "טוען דמות...": יורדים מהרכב לפני שהדמות נטענה (charselect.js מחכה עד 10 שניות). באמצע המסך, מעל הכביש ולא על הרכב */
#hold-hint { position: fixed; z-index: 31; left: 50%; top: 40%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--plate); border: 1px solid var(--line); color: var(--sand); font-size: 14px; font-weight: 700; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0s 0.15s; }
#hold-hint.on { opacity: 1; visibility: visible; transition: opacity 0.2s 0.15s, visibility 0s 0s; }
#hold-hint i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(244,227,193,0.25); border-top-color: var(--gold); animation: holdSpin 0.8s linear infinite; }
@keyframes holdSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #hold-hint i { animation: none; border-color: var(--gold); } }

/* ===== מסך הפתיחה, 1.12: "אני בדרך" הוא הכפתור הראשי (כרטיס ירוק מלא), וברוחב של טלפון לרוחב הכול נכנס בלי לחתוך את השורה התחתונה =====
   מגע: הקישורים בשורה התחתונה נשברים לשורה חדשה, והנקודה שלפני הקרדיט של המפה הייתה נשארת לבד בסוף השורה. במגע היא לא מוצגת */
@media (pointer: coarse) { #title-screen .ts-sep { display: none; } #title-screen .ts-foot a[dir="ltr"] { margin-inline-start: 4px; } }
@media (max-height: 500px) and (min-aspect-ratio: 4/3) {
  #title-screen .ts-kicker, #title-screen .ts-lead { display: none; }
  #title-screen h1.ts-name.brand-he { font-size: clamp(40px, 15vh, 64px); }
  #title-screen .ts-sub { margin-top: 2px; margin-bottom: 8px; }
  /* ההתקנה עוברת לשמאל הכפתור של הסיפור, באותה שורה (ts-main זז באנימציה, ולכן הוא המכל של המיקום) */
  #title-screen .ts-main { position: relative; }
  #title-screen .ts-install { position: absolute; bottom: 26px; right: 470px; margin: 0; min-height: 44px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
  #title-screen .ts-hint { margin-top: 2px; }
  #title-screen .ts-foot { margin-top: 2px; }
}

/* ===== 1.12: הודעות קופצות לא על הרכב =====
   טלפון לרוחב: ההודעה עולה למעלה, בין המפה לכרטיס המשימה (ולא באמצע הכביש מעל הרכב). כשהתראה מהבית פתוחה למעלה, ההודעה יורדת מתחתיה.
   הטלפון פתוח: ההודעה למטה, מעל שורת הלשוניות, ולא על הטקסט של הדף. ספציפיות גבוהה כדי לגבור על הכללים שמוזרקים מ-phoneapps.js */
@media (max-height: 480px) and (min-width: 560px) {
  html body #toast, html body.pa-b1 #toast, html body.pa-b2 #toast { top: calc(54px + var(--safe-t)); bottom: auto; left: 112px; right: min(342px, calc(40vw + 28px)); width: max-content; max-width: calc(100vw - 124px - min(342px, calc(40vw + 28px))); margin: 0 auto; transform: translateY(-6px); }
  html body #toast.show { transform: none; }
  html body:has(#pa-top.on) #toast { top: calc(150px + var(--safe-t)); }
}
/* טלפון לאורך: ההודעה מתחת לרכב (בין הרכב לג'ויסטיק) ולא על הגג שלו. כשיש שיחה או חנייה בשורה למטה, הכללים של phoneapps.js מרימים אותה */
@media (max-width: 720px) and (min-height: 481px) { html body:not(.pa-b1):not(.pa-b2) #toast { bottom: calc(196px + var(--safe-b)); } html body:not(.pa-b1):not(.pa-b2):has(#rescue-btn.on) #toast { bottom: calc(222px + var(--safe-b)); } }   /* כפתור החילוץ בצד ימין למטה: ההודעה עולה מעליו */
html body:has(#phone-overlay:not(.hidden)) #toast { top: auto; bottom: calc(80px + var(--safe-b)); }
/* "יציאה" נכנס בעיגול: במגע הכפתור הקטן מקבל 54 פיקסלים */
@media (pointer: coarse) { #controls .key-btn.sm.walk-btn { width: 60px; height: 60px; } #controls .key-btn.sm.walk-btn small { font-size: 13px; line-height: 1; margin-top: 0; } #controls .key-btn.sm.walk-btn .ic { width: 1.05em; height: 1.05em; } }   /* "יציאה" נכנסת לתוך העיגול (מבקר טרי 2.12: המילה גלשה החוצה) */

/* ======================================================================================================
   UX/UI 1.12.2026: "העיר הלבנה בלילה". כל משטח במשחק הוא חזית באוהאוס תל אביבית: פינה אחת מעוגלת (המרפסת בפינת הרחוב)
   והשאר חדות, ופס "מרפסת" לרוחב החלק העליון בצבע של מה שעושים. כיוון מלא: scratchpad ux/design-direction.md.
   הטוקנים כאן משותפים לכל המסכים (גם לחנויות שנבנות בענף אחר): צבעים, גדלי טקסט, רווחים, צורה ותנועה.
   ====================================================================================================== */
:root {
  --fs-xs: 12px; --fs-s: 14px; --fs-m: 16px; --fs-l: 20px; --fs-xl: 26px;
  --fw-r: 500; --fw-b: 700; --fw-x: 900;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --s1: #0e1530; --s2: #131c3a; --s3: #1b2649; --edge: rgba(244,227,193,0.14); --edge-hi: rgba(244,227,193,0.3);
  --go: #2fd08a; --go-hi: #4be3a3; --go-ink: #05170f; --warn: #ff4d5e;
  --m-errand: #2fd08a; --m-daily: #ffc24b; --m-free: #19c3b2; --m-story: #ff6b3d; --m-rush: #ff3b5c;
  --r-balc: 16px; --r-0: 2px;
  --shape: var(--r-balc) var(--r-0) var(--r-0) var(--r-0);          /* הפינה העליונה השמאלית מעוגלת: המרפסת */
  --shape-s: 10px var(--r-0) var(--r-0) var(--r-0);
  --band: var(--sea);
  --press: transform 0.14s ease, filter 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
  --ts-logo: 56px; --ts-top: max(calc(var(--safe-t) + 72px), 22vh); --ts-colw: 100%; --ts-side: 0px;
}
/* פס המרפסת: 3 פיקסלים מלאים ועוד קו דק מתחתיו, כמו החלונות הארוכים. שכבת רקע נפרדת, כך שהצבע של המשטח נשאר גם בדפדפן ישן */
.band { background-image: linear-gradient(var(--band) 0 3px, transparent 3px 5px, color-mix(in srgb, var(--band) 40%, transparent) 5px 6px, transparent 6px); background-repeat: no-repeat; }

/* ----- מסך הכותרת ----- */
#title-screen.t2 { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 0 16px calc(6px + var(--safe-b));
  background: linear-gradient(to top, rgba(11,16,32,0.96) 0%, rgba(11,16,32,0.72) 36%, rgba(11,16,32,0) 64%), linear-gradient(to bottom, rgba(11,16,32,0.62), rgba(11,16,32,0) 42%); }
#title-screen.t2 .ts-col { display: contents; }
#title-screen.t2 .ts-main { animation: none; }
#title-screen.t2 h1.ts-name.brand-he { margin: var(--ts-top) 0 0; font-size: var(--ts-logo); line-height: 1; text-align: center; white-space: nowrap; }
#title-screen.t2 h1.ts-name.brand-he .brand-a, #title-screen.t2 h1.ts-name.brand-he .brand-b { letter-spacing: 0; }
#title-screen.t2 .ts-lead { display: block; margin: var(--sp-3) 0 0; max-width: 340px; font-size: var(--fs-m); font-weight: var(--fw-r); line-height: 1.4; color: var(--sand); text-align: center; text-wrap: balance; text-shadow: 0 1px 12px rgba(5,8,22,0.95), 0 0 2px rgba(5,8,22,0.9); }
#title-screen.t2 .ts-go { margin-top: auto; width: 100%; max-width: 440px; min-height: 64px; padding: 10px 16px; display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 10px; row-gap: 1px;
  border: 0; border-radius: var(--shape); background: var(--go); color: var(--go-ink); cursor: pointer; font: inherit; box-shadow: inset 0 -4px 0 rgba(5,23,15,0.22), 0 12px 34px rgba(47,208,138,0.28); transition: var(--press); }
#title-screen.t2 .ts-go .ic { width: 22px; height: 22px; --ic2: var(--go-ink); }
#title-screen.t2 .ts-go b { font-size: var(--fs-l); font-weight: var(--fw-x); line-height: 1.15; }
#title-screen.t2 .ts-go small { grid-column: 1 / -1; font-size: 13px; font-weight: var(--fw-b); color: rgba(5,23,15,0.74); }
#title-screen.t2 .ts-go small:empty { display: none; }
#title-screen.t2 .ts-go:hover, #title-screen.t2 .ts-go:focus-visible { background: var(--go-hi); outline: 2px solid #fff; outline-offset: 2px; }
#title-screen.t2 .ts-go:active { transform: scale(0.975); filter: brightness(1.06); }
#title-screen.t2 .ts-hint { display: none; }
#title-screen.t2 .ts-modes { width: 100%; max-width: 440px; margin-top: var(--sp-3); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.ts-mode { --mc: var(--m-errand); position: relative; min-height: 88px; padding: 12px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; color: var(--sand); text-align: center;
  background-color: rgba(14,21,48,0.78); border: 1px solid var(--edge); border-radius: var(--shape-s); transition: var(--press); }
.ts-mode[data-mode="daily"] { --mc: var(--m-daily); } .ts-mode[data-mode="free"] { --mc: var(--m-free); } .ts-mode[data-mode="story"] { --mc: var(--m-story); }
.ts-mode .ic { width: 28px; height: 28px; color: var(--sand); --ic2: var(--mc); }
.ts-mode b { font-size: var(--fs-s); font-weight: 800; line-height: 1.2; }
.ts-mode small { font-size: 11.5px; line-height: 1.25; color: var(--mute); }
.ts-mode kbd { display: none; }
.ts-mode.on { border-color: var(--mc); background-color: color-mix(in srgb, var(--mc) 16%, rgba(14,21,48,0.88)); background-image: linear-gradient(var(--mc) 0 3px, transparent 3px); }
.ts-mode.on b { color: #fff; } .ts-mode.on small { color: var(--sand); }
.ts-mode:hover, .ts-mode:focus-visible { border-color: var(--mc); outline: none; }
.ts-mode:active { transform: scale(0.96); }
#title-screen.t2 .ts-foot { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--mute); text-align: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 10px; }
#title-screen.t2 .ts-foot a, #title-screen.t2 .ts-foot .ts-link { font-size: var(--fs-xs); color: inherit; min-height: 40px; min-width: 0; display: inline-flex; align-items: center; padding: 0 6px; }
#title-screen.t2 .ts-sep { display: none; }
#title-screen.t2 .ts-foot > span { padding: 0 6px; }
/* מסך הטעינה: הלוגו יושב בדיוק איפה שהלוגו של מסך הכותרת, באותו גודל. כשהטעינה נעלמת שום דבר לא זז ולא מוכפל */
#boot > div { position: absolute; top: var(--ts-top); left: 0; right: 0; }
#boot .boot-logo.brand-he { font-size: var(--ts-logo); line-height: 1; white-space: nowrap; }
#boot .boot-logo.brand-he .brand-a, #boot .boot-logo.brand-he .brand-b { font-size: inherit; letter-spacing: 0; }
@media (pointer: fine) { #title-screen.t2 .ts-hint { display: block; margin-top: var(--sp-2); min-height: 18px; font-size: 13px; color: var(--sand); opacity: 0.8; text-shadow: 0 1px 10px rgba(5,8,22,0.9); }
 }
/* לרוחב (טלפון) ובמחשב: שני טורים. מימין הלוגו, השורה והכפתור. משמאל ארבעת המצבים, 2 על 2. בלי שום דבר מתחת לקו המסך */
@media (orientation: landscape) and (max-height: 500px), (orientation: landscape) and (min-width: 900px) {
  :root { --ts-colw: min(420px, 46vw); --ts-side: max(24px, calc(env(safe-area-inset-right, 0px) + 16px)); --ts-logo: 48px; --ts-top: calc(50vh - 96px); }
  #boot > div { left: auto; right: var(--ts-side); width: var(--ts-colw); }
  #title-screen.t2 { display: block; padding: 0; background: linear-gradient(to top, rgba(11,16,32,0.92), rgba(11,16,32,0.42) 46%, rgba(11,16,32,0.6)); }
  #title-screen.t2 .ts-col { display: flex; flex-direction: column; align-items: center; position: absolute; top: var(--ts-top); right: var(--ts-side); width: var(--ts-colw); }
  #title-screen.t2 h1.ts-name.brand-he { margin-top: 0; }
  #title-screen.t2 .ts-go { margin-top: var(--sp-4); }
  #title-screen.t2 .ts-modes { position: absolute; left: max(var(--ts-side), calc(env(safe-area-inset-left, 0px) + 16px)); top: 50%; transform: translateY(-50%); margin: 0; width: min(400px, calc(100vw - var(--ts-colw) - 3 * var(--ts-side))); grid-template-columns: 1fr 1fr; }
  .ts-mode { min-height: 72px; padding: 10px 6px 8px; }
  #title-screen.t2 .ts-foot { position: absolute; left: 0; right: 0; bottom: calc(2px + var(--safe-b)); margin: 0; }
}
@media (orientation: landscape) and (min-width: 900px) and (min-height: 501px) {
  :root { --ts-colw: 460px; --ts-side: 64px; --ts-logo: 72px; --ts-top: calc(50vh - 130px); }
  .ts-mode { min-height: 96px; }
  .ts-mode .ic { width: 32px; height: 32px; } .ts-mode b { font-size: var(--fs-m); } .ts-mode small { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { #title-screen.t2 .ts-go, .ts-mode { transition: none; } }

/* ----- העור: אותם טוקנים, אותה צורה ואותו פס בכל המסכים (HUD, כרטיס המשימה, הודעות, חלונות, טלפון, תפריט, עזרה, "אני בדרך") ----- */
/* כפתורי השורה העליונה: אייקון ומילה מתחתיו (במגע), או לצידו (במחשב) */
#hud .hud-btn.hud-ico { flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-width: 50px; min-height: 48px; padding: 5px 6px 4px; border-radius: var(--shape-s); background-color: rgba(11,16,32,0.74); border: 1px solid var(--edge); color: var(--sand); transition: var(--press); }
#hud .hud-btn.hud-ico .ic { width: 22px; height: 22px; --ic2: var(--sea); }
#btn-open-phone.hud-ico .ic { --ic2: var(--go); } #btn-hud-help.hud-ico .ic { --ic2: var(--gold); } #btn-hud-more.hud-ico .ic { --ic2: var(--sun); }
#hud .hud-btn.hud-ico .lb { display: block; font-style: normal; font-size: 11px; font-weight: var(--fw-b); line-height: 1; color: var(--sand); white-space: nowrap; }
#hud .hud-btn.hud-ico:active { transform: scale(0.94); filter: brightness(1.15); }
#btn-hud-more.tm-open.hud-ico { font-size: inherit; border-color: var(--edge); }
@media (pointer: fine) { #hud .hud-btn.hud-ico { flex-direction: row; gap: 6px; min-height: 38px; padding: 5px 10px; } #hud .hud-btn.hud-ico .lb { font-size: 13px; } }
#hud .badge { border-radius: var(--shape-s); background-color: rgba(11,16,32,0.74); border-color: var(--edge); }
#hud .badge .ic { width: 17px; height: 17px; --ic2: var(--gold); color: var(--sand); }
/* ב"אני בדרך" למעלה רק מה שצריך: התפריט, העזרה והטלפון. הכסף, הרמה והטורבו מחכים בטלפון. במגע הטורבו תמיד בכפתור שלו */
body.er-on #hud .badge.num, body.er-on #hud .badge.boost { display: none; }
@media (pointer: coarse) { #hud .badge.boost { display: none; } }
/* הקרדיט של OpenStreetMap (חובה ברישיון): שורה קטנה בקצה התחתון, לא מקום יקר ליד המפה */
body #radar-box #osm-credit { position: fixed; top: auto; right: auto; left: calc(6px + env(safe-area-inset-left, 0px)); bottom: calc(2px + var(--safe-b)); z-index: 21; margin: 0; padding: 0 4px; font-size: 10px; line-height: 1.3; white-space: nowrap; color: rgba(244,227,193,0.62); background: none; opacity: 1; pointer-events: auto; }
/* בסידורים השורה מתחת למפה מראה את העצירה הבאה (main.js), לכן היא לא מוסתרת יותר */
/* המפה וכרטיס המשימה */
#radar-box, #mission-panel { border-radius: var(--shape-s); border-color: var(--edge); }
#mission-panel .ic { width: 1.2em; height: 1.2em; }
#mission-panel #m-ico .ic { width: 22px; height: 22px; --ic2: var(--go); color: var(--sand); }
#mission-panel #m-status { font-size: 15px; font-weight: 800; color: #fff; }
#mission-panel.mini #m-status { font-size: 14px; }
#mission-panel #m-status .ic { --ic2: var(--go); color: var(--sand); }
#mission-panel #m-pay { display: inline-flex; align-items: center; gap: 4px; }
/* השעון והמרחק כמו בשלט של תחנת אוטובוס: ספרות כבדות בתוך תיבה, בצהוב של השילוט */
body #mission-panel #m-timer, body.er-on #mission-panel #m-timer { background: #1a1404; color: var(--gold); border: 1px solid rgba(255,194,75,0.45); border-radius: 2px; padding: 1px 7px; font-weight: var(--fw-x); font-variant-numeric: tabular-nums; }
body.er-on #mission-panel #m-timer.er-late { background: #2a0a10; color: #ff8a96; border-color: rgba(255,77,94,0.6); }
#mission-panel #m-dist { font-variant-numeric: tabular-nums; font-weight: var(--fw-x); color: var(--gold); }
/* הודעות קופצות */
#toast { border-radius: var(--shape-s); border: 1px solid var(--edge); border-inline-start-width: 1px; background-color: rgba(11,16,32,0.94); background-image: linear-gradient(var(--gold) 0 3px, transparent 3px); padding-top: 11px; font-size: var(--fs-s); }
/* כל החלונות: אותה חזית. פינה אחת מעוגלת, פס המרפסת למעלה בצבע של החלון */
.er-sheet, .modal-card, .help-card, .tm-card, #phone-overlay .phone, .d-card, .cr-box, #bg-pause .bp-card, #save-tip .row-card, #upd-tip .row-card, #iab-tip .row-card, #mode-card {
  --band: var(--sea); border-radius: var(--shape); border: 1px solid var(--edge); background-color: var(--s1);
  background-image: linear-gradient(var(--band) 0 3px, transparent 3px 5px, rgba(244,227,193,0.12) 5px 6px, transparent 6px); background-repeat: no-repeat; box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.er-sheet { --band: var(--go); border-top: 1px solid var(--edge); padding-top: 20px; }
#er-time .er-sheet { --band: var(--warn); }
.help-card { --band: var(--gold); } .d-card { --band: var(--sun); } .modal-card { --band: var(--sun); } #mode-card { --band: var(--mc, var(--go)); border-top: 1px solid var(--edge); padding-top: 16px; }
#phone-overlay .phone { --band: var(--go); overflow: hidden; }
.er-sheet .er-k { display: flex; align-items: center; gap: 6px; }
.er-sheet .ic { width: 1.25em; height: 1.25em; }
.er-sheet .er-k .ic { width: 18px; height: 18px; --ic2: currentColor; }
.er-sheet .er-h .er-hi { width: 1.05em; height: 1.05em; vertical-align: -0.14em; }
.er-sheet .er-l2 { margin-top: 2px; font-size: var(--fs-m); color: var(--sand); }
.er-lines li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.er-lines li .ic { color: var(--sand); --ic2: var(--go); }
/* סולם המדליות בכרטיס הפתיחה: כותרת קטנה ומתחתיה שורה של חמש (errands-ui.js .er-medrow) */
.er-meds { display: block; }
.er-md { border-radius: var(--shape-s); }
.er-md .ic { width: 28px; height: 28px; }
.er-wd i .ic { width: 15px; height: 15px; }
.er-intro.ready .er-load { visibility: hidden; }
/* כפתורים: ירוק אחד ראשי לכל חלון. השאר עם קו, באותה פינה. לחיצה: מתכווץ קצת ומאיר, 140 מ"ש */
.btn-pri { background: var(--go); color: var(--go-ink); border-radius: var(--shape-s); box-shadow: inset 0 -3px 0 rgba(5,23,15,0.22); }
.btn-pri:hover { background: var(--go-hi); }
.er-go { border-radius: var(--shape-s); box-shadow: inset 0 -4px 0 rgba(5,23,15,0.22); transition: var(--press); }
.er-go::before, .er-go::after { display: none; }
.er-go b { display: flex; align-items: center; justify-content: center; gap: 8px; }
.er-go .ic { width: 20px; height: 20px; --ic2: var(--go-ink); color: var(--go-ink); }
.er-skip, .er-row button, .er-chips button, .er-mod, .er-daily, .er-cont, .btn-sec, .act-btn, .tm-btn, .tm-chip, .pchip, .psub, .opt-card, .chip-btn, .d-opt, .m-choice, .quick, .pa-btn, .pa-qr button, #rescue-btn, #btn-action, #er-pill {
  border-radius: var(--shape-s); transition: var(--press); }
.er-row button, .er-skip, .tm-btn, .act-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.er-row button .ic, .er-skip .ic, .er-lvl .ic, .act-btn .ic { width: 18px; height: 18px; --ic2: var(--go); }
.er-lvl { display: inline-flex; align-items: center; gap: 6px; }
.er-go:active, .er-skip:active, .er-row button:active, .btn-pri:active, .btn-sec:active, .act-btn:active, .tm-btn:active, .pchip:active, .opt-card:active, .d-opt:active, .pa-btn:active, .pa-qr button:active, #rescue-btn:active, .ts-mode:active { transform: scale(0.97); filter: brightness(1.08); }
/* ☰ תפריט, טלפון, עזרה */
.tm-btn i .ic, .quick i .ic { width: 26px; height: 26px; --ic2: var(--sea); color: var(--sand); }
.tm-btn.help i .ic { --ic2: var(--gold); }
#phone-title .ic { width: 22px; height: 22px; --ic2: var(--go); }
#phone-overlay .pnav i .ic { width: 24px; height: 24px; --ic2: var(--sea); color: var(--sand); }
#phone-overlay .pnav.active i .ic { --ic2: var(--go); }
#btn-close-phone .ic, #btn-close-help .ic, #btn-close-tmenu .ic { width: 20px; height: 20px; }
.ph-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-2); }
.ph-modes .ts-mode { min-height: 84px; }
.ph-warn { font-size: 13px; font-weight: var(--fw-b); color: var(--gold); margin: 0 0 var(--sp-2); }
.lead-row .big-ico .ic { width: 28px; height: 28px; --ic2: var(--m-rush); }
#help .help-goal { border-inline-start: 3px solid var(--mc, var(--go)); padding-inline-start: 10px; }
/* העזרה: המצב שבו אתם והשליטה פתוחים, כל השאר מקופל תחת "עוד" (מבקר 4.12) */
#help .help-more { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 4px; }
#help .help-more > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 46px; cursor: pointer; font-size: 14.5px; font-weight: 800; color: var(--sand); }
#help .help-more > summary::-webkit-details-marker { display: none; }
#help .help-more > summary::after { content: ""; margin-inline-start: auto; width: 9px; height: 9px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
#help .help-more[open] > summary::after { transform: rotate(135deg); }
#help .help-more > summary .ic { width: 20px; height: 20px; }
#help .help-more .more-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px 28px; padding-top: 8px; }
#help .help-goal.more { opacity: .92; }
#help h4 { display: flex; align-items: center; gap: 8px; }
#help h4 .ic { width: 20px; height: 20px; --ic2: var(--gold); }
#help .hk .keys .ic { width: 22px; height: 22px; --ic2: var(--sea); color: var(--sand); }
#help .help-goal .hk span:last-child { font-size: var(--fs-m); color: #fff; font-weight: var(--fw-b); }
/* חלונות מעל כרטיסי "אני בדרך" (עזרה ב-H בזמן כרטיס הפתיחה נפתחה מתחתיו) */
body.er-modal #help, body.er-modal #tmenu, body.er-modal #phone-overlay { z-index: 42; }
/* כפתורי הנהיגה במגע: האייקונים שלנו */
.key-btn .ic { width: 26px; height: 26px; color: #fff; --ic2: currentColor; }
#k-nitro .ic { --ic2: var(--gold); } #k-drift .ic { --ic2: var(--sea); }
#rescue-btn .ic { width: 20px; height: 20px; --ic2: var(--sun); }
/* ההתראות והשיחה: בלי גלולות */
.pa-note { border-radius: var(--shape-s); }
#er-pill { background-image: linear-gradient(var(--m-free) 0 3px, transparent 3px); border-top-width: 1px; border-color: var(--edge); }
#er-pill span { color: var(--m-free); display: flex; align-items: center; gap: 5px; } #er-pill b { display: flex; align-items: center; gap: 6px; }
#er-pill .ic { width: 16px; height: 16px; --ic2: var(--m-free); }
@media (prefers-reduced-motion: reduce) { #hud .hud-btn.hud-ico, .er-go, .tm-btn, .act-btn, .pchip, .opt-card, .d-opt { transition: none; } }
#phone-overlay .phone-stats .ic { width: 18px; height: 18px; --ic2: var(--gold); }
/* בחירת הדמות: בלי אמוג'י על הכרטיסים, רק השם וההסבר. הכפתור הראשי ירוק כמו בכל המשחק */
#start-modal .opt-card > span:first-child { display: none; }
#start-modal .opt-card { border-radius: var(--shape-s); }
#start-modal .opt-card.active { border-color: var(--go); background-image: linear-gradient(var(--go) 0 3px, transparent 3px); }
#start-modal .s-pill { border-radius: var(--shape-s); }
/* במחשב הכרטיס של המשימה גדול יותר: שורת היעד נקראת במבט, לא כמו ממשק טלפון שהוקטן */
@media (pointer: fine) and (min-width: 1100px) and (min-height: 650px) {
  #mission-panel, #mission-panel.mini { width: 400px; }
  #mission-panel #m-status, #mission-panel.mini #m-status { font-size: 18px; }
  #mission-panel.mini .m-title { font-size: 14px; max-width: 260px; }
  body #mission-panel #m-timer, #mission-panel #m-dist { font-size: 17px; }
  #m-tag { font-size: 13px; }
}
/* חזית העיר הלבנה בכרטיס המשימה: קווי חלונות סרט דקים בצד, מאחורי הטקסט */
#mission-panel[data-mode] { background-image: repeating-linear-gradient(180deg, transparent 0 9px, rgba(244,227,193,0.045) 9px 11px); background-size: 34% 100%; background-position: left top; background-repeat: no-repeat; }
.er-lines li > span { flex: 1; min-width: 0; }
/* במחשב: המצבים באותו גובה של הלוגו והכפתור, כקבוצה אחת שקוראים משמאל לימין, לא צפים באמצע */
@media (orientation: landscape) and (min-width: 900px) and (min-height: 501px) {
  #title-screen.t2 .ts-modes { top: calc(var(--ts-top) + 8px); transform: none; width: min(440px, calc(100vw - var(--ts-colw) - 3 * var(--ts-side))); }
}
/* שם הרחוב ליד המפה: כמו שלט רחוב תל אביבי, כחול עם מסגרת לבנה פנימית. הדבר הכי מקומי שיש על המסך */
body #radar-zone { display: inline-block; max-width: 100%; margin-top: 5px; padding: 2px 8px 3px; border-radius: 3px; background: #1a4fa8; color: #fff; font-weight: 800; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.9), 0 0 0 1px #0b2a66; }
#title-screen.t2 .ts-foot a, #title-screen.t2 .ts-foot .ts-link { min-width: 44px; justify-content: center; }
@media (pointer: coarse) { body #radar-box #osm-credit { pointer-events: none; } }
/* כרטיס המשימה ב"אני בדרך": השורה של המרחק והזמן היא שלט של תחנת אוטובוס (פס כהה, ספרות כתומות-צהובות). בכרטיס המקופל רק התגית, היעד והשלט */
body.er-on #mission-panel .m-footer { margin: 6px -11px -11px; padding: 6px 11px 7px; background: #07080a; border-top: 1px solid rgba(255,194,75,0.25); }
body.er-on #mission-panel.mini .m-footer { margin: 4px -10px -6px; padding: 5px 10px 6px; }
/* טלפון לרוחב: שורת המשימה ("לקנות 2 חלב בסופר") בשורה משלה לכל הרוחב, והמרחק והשעון מתחתיה. קודם היא נדחסה ל-100 פיקסלים ונשברה לשתיים (מבקר טרי 2.12) */
@media (max-height: 480px) { body.er-on #mission-panel .m-footer { flex-wrap: wrap; row-gap: 4px; } }
body.er-on #mission-panel.mini .m-header { display: none; }
body.er-on #mission-panel #m-status { color: #fff; }
body.er-on #mission-panel #m-timer { background: transparent; border-color: rgba(255,194,75,0.55); }
.er-wk { font-size: 12px; font-weight: 700; color: var(--mute); margin: 12px 0 -8px; }
/* התפריט הנפתח במחשב: אותה חזית, בלי שורות הזהות של הסיפור, והשיחה מחכה כשהוא פתוח */
#hud-menu { border-radius: var(--shape); border: 1px solid var(--edge); background-color: rgba(14,21,48,0.97); background-image: linear-gradient(var(--sea) 0 3px, transparent 3px); }
#hud-menu .hm-who { display: none; }
#hud-menu .hud-btn .ic { width: 20px; height: 20px; --ic2: var(--sea); }
body.hud-open #pa-callbox, body.hud-open #coach { visibility: hidden; }
#tmenu .tm-btn.install { border-color: var(--edge); background-color: rgba(255,255,255,0.04); }

/* ======================================================================================================
   סבב עיצוב 2 (2.12.2026): "תל אביב מהמדרכה". אותם טוקנים, ועוד שלושה חומרים שכל אחד מהם אומר משהו:
   1. שלט רחוב תל אביבי (כחול, מסגרת לבנה פנימית, ושלט הסבר לבן מתחתיו): שמות של מקומות. הלוגו הוא שלט רחוב בשם "אני בדרך".
   2. טראצו של חדר מדרגות ישן: החומר של כל חלון וגיליון (שבבים קטנים של חול, ים, שקיעה וזהב על כחול לילה).
   3. לוח לד של תחנת אוטובוס (רקע שחור, ספרות כתומות מנקודות): כל מספר שזז. זמן, מרחק, תור.
   ועוד: אריחי המצבים הם חזיתות באוהאוס, והחלונות הסרטיים שלהם נדלקים במצב שנבחר.
   ====================================================================================================== */
:root {
  --sign: #1b4fa6; --sign-deep: #0f3270; --plaster: #eef2f6;
  --led: #ffb23e; --led-bg: #07080a; --led-edge: rgba(255,178,62,0.4);
  --terrazzo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 400 400'%3E%3Cpath fill='%23f4e3c1' fill-opacity='0.09' d='M2 10l-2 4l-4 -3l3 -3l3 0zM179 73l-3 2l-3 -1l-3 -3l2 -5l5 3zM377 221l-6 4l-4 -3l3 -6l4 0zM188 270l-4 4l-7 -3l0 -4l5 -3l7 2zM273 44l-4 1l-3 0l-1 -6l4 -1l4 2zM344 63l-6 3l-3 -2l-1 -4l5 -8l4 4zM26 176l-2 2l-3 -2l0 -2l4 0zM145 303l0 2l-4 -1l-1 -4l3 -1l1 2zM175 322l-7 3l-4 -4l3 -5l7 -1zM150 281l-2 1l-4 -3l2 -3l3 -2zM74 218l-2 1l-2 -2l4 -1zM12 166l-5 4l-1 -4l0 -5l5 1zM368 281l-2 1l-6 -2l1 -2l4 -5l2 3zM294 290l-3 1l-3 -1l0 -2l3 -2l2 0zM169 313l-2 1l-4 -2l2 -3l3 0zM235 63l-7 4l-1 -6l6 -2zM196 393l-6 3l0 -6l5 -2z'/%3E%3Cpath fill='%23fff' fill-opacity='0.06' d='M254 396l-3 3l-2 -3l1 -4l3 0zM319 176l-3 2l-1 -3l2 -2zM100 374l-2 0l-3 0l-1 -4l2 -1l4 0zM303 311l-4 1l-1 -3l4 -1zM131 281l-2 0l-3 -2l1 -2l4 1zM37 53l-3 3l-9 -3l1 -7l6 -3l7 1zM134 244l-3 3l-4 -1l0 -5l1 -3l5 2z'/%3E%3Cpath fill='%239aa6c4' fill-opacity='0.1' d='M58 64l-3 1l-1 -1l0 -2l1 -1l2 0zM122 305l-3 1l-2 -3l3 -2zM68 128l-4 1l-6 -1l4 -5l4 -2zM263 336l-6 2l-6 -6l9 -6zM292 379l-4 0l-3 -2l2 -3l4 0zM168 107l-5 3l-1 -4l3 -2zM39 101l-2 0l-3 -1l2 -2l2 0zM358 304l-3 2l-3 -4l0 -3l6 0zM358 206l-3 2l-1 -1l-1 -2l2 -2l3 1zM116 90l-3 2l-2 -3l3 -3zM331 152l-4 4l-3 -2l-4 -5l6 -3l5 1z'/%3E%3Cpath fill='%2319c3b2' fill-opacity='0.13' d='M394 194l-4 2l-9 -1l0 -5l5 -4l7 2zM331 293l-3 1l-2 -4l3 -1zM323 78l-1 1l-3 1l0 -3l1 -2l3 1zM6 67l-2 3l-3 -3l0 -2l3 -2l3 2zM69 264l-5 4l-4 -4l1 -6l7 2z'/%3E%3Cpath fill='%23ff6b3d' fill-opacity='0.12' d='M52 37l-2 1l-6 0l0 -4l4 -3l5 2zM244 42l-2 2l-2 -2l1 -3l3 -1zM320 294l-4 2l-5 -2l2 -8l6 0zM355 378l-8 8l-6 -1l-2 -10l4 -5l9 2zM389 194l-2 3l-6 0l-1 -4l3 -6l5 2zM29 124l0 5l-10 -4l1 -6l3 -3l7 2z'/%3E%3Cpath fill='%23ffc24b' fill-opacity='0.1' d='M178 401l-3 1l-1 -3l2 -1zM248 176l-6 3l-6 -3l1 -8l5 -5l4 5zM71 315l-4 5l-10 0l0 -12l7 1l8 -3zM123 30l-3 3l-4 -6l7 0z'/%3E%3C/svg%3E");
  --clock-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 8.6V13l3 2M9.5 2.8h5'/%3E%3C/svg%3E");
}
/* ----- 1. הלוגו: שלט רחוב. אותו שלט בדיוק במסך הטעינה, כך שהמעבר לא קופץ ----- */
#title-screen.t2 h1.ts-name.brand-he, #boot .boot-logo.brand-he {
  display: inline-block; width: auto; font-weight: 900; letter-spacing: 0; word-spacing: 0; font-family: "Rubik", "Segoe UI", Arial, sans-serif; padding: 0.14em 0.42em 0.2em; background: var(--sign); color: #fff; border-radius: 0.3em 3px 3px 3px;
  box-shadow: inset 0 0 0 0.07em var(--sign), inset 0 0 0 0.11em #fff, 0 14px 34px rgba(5,8,22,0.5); text-shadow: none; }
#title-screen.t2 h1.ts-name.brand-he .brand-a, #title-screen.t2 h1.ts-name.brand-he .brand-b, #boot .boot-logo.brand-he .brand-a, #boot .boot-logo.brand-he .brand-b { color: #fff; }
/* שלט ההסבר הלבן שמתחת לשלט הרחוב: מה המשחק, במשפט */
#title-screen.t2 .ts-lead { margin-top: 6px; max-width: min(calc(var(--ts-logo) * 4.9), calc(100vw - 48px)); padding: 6px 12px 7px; background: var(--plaster); color: var(--sign-deep); font-size: 14.5px; font-weight: 600; line-height: 1.35; border-radius: 2px; text-shadow: none; box-shadow: 0 8px 24px rgba(5,8,22,0.4); }
#boot .boot-logo.brand-he { margin: 0 auto; }

/* ----- 2. אריחי המצבים: ארבעה בניינים ברחוב. בבניין שנבחר האור דולק בחלונות הסרטיים ----- */
.ts-mode { overflow: hidden; padding-bottom: 20px; background-color: rgba(14,21,48,0.9); }
.ts-mode::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 5px; height: 10px; pointer-events: none;
  background: linear-gradient(var(--win, rgba(244,227,193,0.1)) 0 3px, transparent 3px 7px, var(--win, rgba(244,227,193,0.1)) 7px 10px); transition: background 0.14s; }
.ts-mode.on { --win: var(--mc); background-color: color-mix(in srgb, var(--mc) 14%, rgba(14,21,48,0.94)); }
.ts-mode.on .ic { color: #fff; }
@media (orientation: landscape) and (max-height: 500px) { .ts-mode { padding-bottom: 16px; } .ts-mode::after { bottom: 4px; height: 8px; background: linear-gradient(var(--win, rgba(244,227,193,0.1)) 0 2px, transparent 2px 6px, var(--win, rgba(244,227,193,0.1)) 6px 8px); } }

/* ----- 3. טראצו: כל גיליון וחלון. השבבים חלשים מספיק כדי שהטקסט יישאר נקי ----- */
html body .er-sheet, html body .modal-card, html body .help-card, html body .tm-card, html body #phone-overlay .phone, html body .d-card, html body .cr-box, html body #bg-pause .bp-card, html body #mode-card, html body #shop-ui .sh-sheet {
  background-image: linear-gradient(var(--band) 0 3px, transparent 3px 5px, rgba(244,227,193,0.12) 5px 6px, transparent 6px), var(--terrazzo);
  background-repeat: no-repeat, repeat; background-size: auto, 200px 200px; }
html body #phone-overlay .phone-body { background: transparent; }

/* ----- 4. לוח לד של תחנת אוטובוס: הזמן, המרחק והתור. שתי שכבות: ספרות כתומות, ורשת דקה של נקודות מעליהן ----- */
html body #mission-panel #m-timer, html body #mission-panel #m-dist, html body #shop-ui .sh-clock, html body .led {
  position: relative; display: inline-flex; align-items: center; gap: 5px; background: var(--led-bg); color: var(--led); border: 1px solid var(--led-edge); border-radius: 2px;
  padding: 1px 8px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; white-space: nowrap; }
html body #mission-panel #m-timer::after, html body #mission-panel #m-dist::after, html body #shop-ui .sh-clock::after, html body .led::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: linear-gradient(90deg, rgba(7,8,10,0.5) 1px, transparent 1px), linear-gradient(rgba(7,8,10,0.5) 1px, transparent 1px); background-size: 3px 3px; }
html body #mission-panel #m-timer::before, html body #shop-ui .sh-clock::before { content: ""; flex: none; width: 1em; height: 1em; background: currentColor; -webkit-mask: var(--clock-mask) center / contain no-repeat; mask: var(--clock-mask) center / contain no-repeat; }
html body #mission-panel #m-dist:empty { display: none; }
html body.er-on #mission-panel #m-timer.er-late, html body #shop-ui .sh-clock.late { color: #ff6b78; border-color: rgba(255,77,94,0.6); background: #12060a; }
html body #shop-ui .sh-clock.bump { color: #fff; background: #3a2400; border-color: var(--led); }

/* ----- 5. שמות של מקומות: שלט רחוב קטן (המפה כבר כזאת). שם החנות, והמקום בחלון ההחלטה ----- */
html body #shop-ui .sh-name { background: var(--sign); border: 0; border-radius: 10px 2px 2px 2px; box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.5px #fff, 0 6px 18px rgba(0,0,0,0.35); color: #fff; padding: 7px 12px 7px; display: flex; flex-direction: column; justify-content: center; }
html body #shop-ui .sh-name .ic { width: 20px; height: 20px; color: #fff; --ic2: var(--sh-c, var(--go)); margin-inline-end: 4px; vertical-align: -4px; }
html body #shop-ui .sh-name small { color: #d6e2ff; font-weight: 700; display: flex; align-items: center; gap: 4px; }
html body #decision .d-head strong#d-who { display: inline-block; margin-top: 3px; padding: 2px 10px 3px; background: var(--sign); color: #fff; border-radius: 8px 2px 2px 2px; box-shadow: inset 0 0 0 1.5px var(--sign), inset 0 0 0 2.8px #fff; font-size: 15px; }
html body #decision .d-head strong#d-who:empty { display: none; }
html body #decision .d-head #d-ico { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--shape-s); background: rgba(255,107,61,0.14); border: 1px solid rgba(255,107,61,0.4); font-size: 0; }
html body #decision .d-head #d-ico .ic { width: 28px; height: 28px; color: var(--sand); --ic2: var(--sun); }
html body #decision .d-opt em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 12px; font-weight: 800; margin-bottom: 2px; color: var(--mute); }
html body #decision .d-opt em .ic { width: 15px; height: 15px; }
html body #decision .d-opt[data-tag="system"] em { color: var(--sea); } html body #decision .d-opt[data-tag="bold"] em { color: var(--sun); } html body #decision .d-opt[data-tag="people"] em { color: var(--gold); }
html body #decision .d-opt em .ic { --ic2: currentColor; }

/* ----- 6. החנויות: אותה משפחה כמו כל המשחק. ירוק אחד ראשי, השאר עם קו, ומספר התור בלוח לד ----- */
html body #shop-ui .sh-clock { min-height: 44px; padding: 0 12px; font-size: 16px; flex: none; transition: background-color 0.3s, color 0.3s; }
html body #shop-ui .sh-skip { border-radius: var(--shape-s); border-color: var(--edge-hi); color: var(--sand); display: inline-flex; align-items: center; gap: 6px; }
/* כפתור הדילוג שעוד לא זמין (ביקור ראשון) לא תופס מקום: הוא דחק את שם החנות ל"בית מרקחת השד..." (מבקר 4.12) */
html body #shop-ui .sh-skip:not(.on) { display: none; }
html body #shop-ui .sh-skip .ic { width: 18px; height: 18px; --ic2: var(--gold); }
html body #shop-ui .sh-tk { display: flex; align-items: stretch; gap: 0; padding: 0; background: var(--led-bg); color: var(--led); border: 1px solid var(--led-edge); border-inline-start: 1px solid var(--led-edge); border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,0.4); font-size: 14px; }
html body #shop-ui .sh-tk > span { position: relative; display: flex; align-items: baseline; gap: 6px; padding: 5px 10px 6px; }
html body #shop-ui .sh-tk > span + span { border-inline-start: 1px solid rgba(255,178,62,0.25); }
html body #shop-ui .sh-tk small { font-size: 12px; font-weight: 700; color: rgba(255,178,62,0.75); }
html body #shop-ui .sh-tk b { font-size: 20px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
html body #shop-ui .sh-tk b::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(90deg, rgba(7,8,10,0.5) 1px, transparent 1px), linear-gradient(rgba(7,8,10,0.5) 1px, transparent 1px); background-size: 3px 3px; }
html body #shop-ui .sh-tk > span.ok b { color: #5cf0a8; }
html body #shop-ui .sh-tk .ic { width: 18px; height: 18px; align-self: center; color: var(--led); --ic2: var(--led); }
html body #shop-ui .sh-sheet { --band: var(--sh-c, var(--go)); border: 1px solid var(--edge); border-radius: var(--shape); background-color: var(--s1); padding: 14px 12px 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
html body #shop-ui .sh-q { color: var(--sand); font-size: 15px; }
html body #shop-ui .sh-opts button { display: flex; align-items: center; gap: 10px; border-radius: var(--shape-s); border: 1px solid var(--edge-hi); background: rgba(255,255,255,0.04); color: var(--sand); transition: var(--press); }
html body #shop-ui .sh-opts button:first-child { background: var(--go); border-color: var(--go); color: var(--go-ink); box-shadow: inset 0 -3px 0 rgba(5,23,15,0.22); }
html body #shop-ui .sh-opts button .ic { width: 22px; height: 22px; flex: none; color: var(--sand); --ic2: var(--gold); }
html body #shop-ui .sh-opts button:first-child .ic { color: var(--go-ink); --ic2: var(--go-ink); }
html body #shop-ui .sh-opts button kbd { margin-inline-start: auto; float: none; }
html body #shop-ui .sh-opts button:active { transform: scale(0.97); filter: brightness(1.08); }
html body #shop-ui .sh-opts button:hover, html body #shop-ui .sh-opts button:focus-visible { border-color: var(--go); outline: none; }
html body #shop-ui .sh-msg { border-radius: var(--shape-s); border: 1px solid var(--edge); border-inline-start-width: 1px; background-color: rgba(14,21,48,0.96); background-image: linear-gradient(var(--sea) 0 3px, transparent 3px); padding-top: 10px; }
html body #shop-ui .sh-msg small { display: flex; align-items: center; gap: 5px; }
html body #shop-ui .sh-msg small .ic { width: 15px; height: 15px; --ic2: var(--go); }
@media (prefers-reduced-motion: reduce) { html body #shop-ui .sh-opts button { transition: none; } }

/* ----- 7. הודעות קופצות, התראות ושורות הטלפון: בלי גלולות, אותה פינה, ואייקונים שלנו ----- */
html body #toast { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
html body #toast .ic { width: 18px; height: 18px; color: var(--sand); --ic2: var(--gold); }
html body .pa-note { border-radius: var(--shape); background-color: rgba(14,21,48,0.97); background-image: linear-gradient(var(--sea) 0 3px, transparent 3px); padding-top: 12px; }
html body .pa-note .av, html body .pa-bar .av { border-radius: var(--shape-s); }
html body .pa-note .av .ic, html body .pa-bar .av .ic { width: 24px; height: 24px; color: #fff; --ic2: #fff; }
html body .pa-note .av.app { background: var(--sign); box-shadow: inset 0 0 0 1.5px var(--sign), inset 0 0 0 2.6px #fff; }
html body .pa-bar { border-radius: var(--shape); }
html body .pa-park .av { border-radius: 8px 2px 2px 2px; background: var(--sign); box-shadow: inset 0 0 0 1.5px var(--sign), inset 0 0 0 2.6px #fff; }
html body .pa-park .num { color: var(--led); font-weight: 900; }
html body .pa-qr button, html body .pa-btn { border-radius: var(--shape-s); }
html body .pa-qr button.go, html body .pa-btn.go { background: var(--go); border-color: var(--go); color: var(--go-ink); }
html body .pa-btn.stop { border-radius: var(--shape-s); }
html body #pa-call .card { border-radius: var(--shape); background-color: var(--s1); background-image: linear-gradient(var(--go) 0 3px, transparent 3px 5px, rgba(244,227,193,0.12) 5px 6px, transparent 6px), var(--terrazzo); background-repeat: no-repeat, repeat; background-size: auto, 200px 200px; }
html body .pa-app i { border-radius: 10px 2px 2px 2px; background: var(--sign); box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.4px #fff; }
html body .pa-meter { border-radius: var(--shape); background: var(--led-bg); border-color: var(--led-edge); }
html body .pa-meter .num, html body .pa-meter b { color: var(--led); }
html body #hud-menu .hm-chip { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
html body #hud-menu .hm-chip .ic { width: 22px; height: 22px; --ic2: var(--sea); }
html body #phone-overlay .gar-ico .ic, html body #phone-overlay .row-card h4 .ic { width: 20px; height: 20px; --ic2: var(--sea); vertical-align: -4px; margin-inline-end: 4px; }
html body #mode-card b { display: flex; align-items: center; justify-content: center; gap: 6px; }
html body #mode-card b .ic { width: 18px; height: 18px; --ic2: var(--mc, var(--go)); color: var(--sand); }

/* ----- 8. מסך הסוף: הכותרת "השבוע שלכם" לא נוגעת באריחים (לרוחב היא ישבה עליהם), והאריח הבא בלי פעימה ----- */
html body .er-wk { margin: 12px 0 6px; }
html body .er-wk + .er-week { margin-top: 0; }
html body .er-wd.next::after { animation: none; opacity: 1; inset: -2px; border-width: 1px; }
html body .er-wd { border-radius: 8px 2px 2px 2px; }
html body .er-md { border-radius: var(--shape-s); }
html body .er-tags span { border-radius: 2px; }
@media (max-height: 500px) and (min-aspect-ratio: 4/3) { html body #er-end .er-wk { margin: 0 0 5px; } html body #er-end .er-week { margin: 0 0 2px; } }
html body #shop-ui .sh-name .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body #shop-ui .sh-name small .ic { width: 15px; height: 15px; margin: 0; color: #d6e2ff; --ic2: #d6e2ff; }
html body .tm-chip .ic { width: 24px; height: 24px; color: var(--sand); --ic2: var(--sea); }
html body .pa-note .hd span .ic { width: 14px; height: 14px; vertical-align: -2px; }
/* תת-הלשוניות בטלפון: בלי מילוי בצבע חול. הלשונית הפעילה מסומנת כמו מצב שנבחר: פס ירוק וקו */
html body .psub.active { background-color: rgba(47,208,138,0.14); background-image: linear-gradient(var(--go) 0 3px, transparent 3px); border-color: var(--go); color: #fff; }
/* הגיליונות של "אני בדרך": רק הפס של החלון למעלה, בלי עוד קו ירוק מעליו */
html body .er-sheet { border-top: 1px solid var(--edge); }
html body #btn-action .ic { width: 22px; height: 22px; color: #1a1205; --ic2: #1a1205; margin-inline-end: 6px; vertical-align: -5px; }
html body .pa-card, html body .pa-back { border-radius: var(--shape-s); }
html body #pa-call .card { border-radius: var(--shape); }
@media (max-height: 480px) and (min-width: 560px) { html body #pa-call .card { border-radius: var(--shape); } }

/* ===== סבב עיצוב 2, חלק ב (אחרי סוקר ראשון): המספרים נקיים, החומרים בכל המסכים, והכפתור הראשי הוא שלט הכוונה ירוק ===== */
:root { --r-balc: 20px; --shape: 20px 2px 2px 2px; --shape-s: 14px 2px 2px 2px; --go-sign: #0e7a4b; --go-sign-hi: #12905a; }
/* לד: הספרות שלמות. הנקודות הכבויות של הלוח מאחוריהן, לא עליהן */
html body #mission-panel #m-timer::after, html body #mission-panel #m-dist::after, html body #shop-ui .sh-clock::after, html body .led::after, html body #shop-ui .sh-tk b::after { content: none; }
html body #mission-panel #m-timer, html body #mission-panel #m-dist, html body #shop-ui .sh-clock, html body .led, html body #shop-ui .sh-tk {
  background-color: var(--led-bg); background-image: radial-gradient(circle, rgba(255,178,62,0.13) 0.75px, transparent 1.05px); background-size: 3px 3px; }
html body #shop-ui .sh-tk small { color: #d9dde8; font-weight: 700; }
html body #shop-ui .sh-clock { font-size: 17px; }
@media (pointer: fine) { html body #shop-ui .sh-clock { font-size: 18px; } html body #shop-ui .sh-tk b { font-size: 22px; } }
/* הכפתור הראשי: שלט הכוונה ירוק כמו בכבישים בארץ. ירוק עמוק, טקסט לבן ומסגרת לבנה פנימית */
html body #title-screen.t2 .ts-go, html body .er-go, html body .btn-pri, html body #shop-ui .sh-opts button:only-child {
  background: var(--go-sign); color: #fff; border: 0; box-shadow: inset 0 0 0 3px var(--go-sign), inset 0 0 0 5px rgba(255,255,255,0.92), 0 8px 22px rgba(5,8,22,0.35); }
html body #title-screen.t2 .ts-go .ic, html body .er-go .ic, html body #shop-ui .sh-opts button:only-child .ic { color: #fff; --ic2: #fff; }
html body #title-screen.t2 .ts-go small, html body .er-go small { color: rgba(255,255,255,0.86); }
html body #title-screen.t2 .ts-go:hover, html body #title-screen.t2 .ts-go:focus-visible, html body .er-go:hover, html body .er-go:focus-visible, html body .btn-pri:hover, html body #shop-ui .sh-opts button:only-child:hover { background: var(--go-sign-hi); }
/* בחירות בחנות: כמו בחירות בסיפור. אף אחת לא נראית כמו "התשובה הנכונה". פעולה יחידה (לשלם, לקחת מספר) היא שלט ירוק */
html body #shop-ui .sh-opts button:first-child:not(:only-child) { background: rgba(255,255,255,0.04); border: 1px solid var(--edge-hi); color: var(--sand); box-shadow: none; }
html body #shop-ui .sh-opts button:first-child:not(:only-child) .ic { color: var(--sand); --ic2: var(--gold); }
/* אריחי המצבים: בלי הפסים (נראו כמו פס התקדמות). המרפסת המעוגלת גדולה, והבניין שנבחר מקבל גג בצבע המצב */
html body .ts-mode::after { content: none; }
html body .ts-mode { padding-bottom: 8px; border-radius: 22px 2px 2px 2px; }
@media (orientation: landscape) and (max-height: 500px) { html body .ts-mode { padding-bottom: 8px; } }
html body .ts-mode.on { background-image: linear-gradient(var(--mc) 0 4px, transparent 4px 7px, color-mix(in srgb, var(--mc) 45%, transparent) 7px 8px, transparent 8px); }
/* טראצו אמיתי: שבבים גדולים יותר, כמו רצפה של בניין ישן */
/* (הערך של --terrazzo מוגדר מחדש למטה) */
/* שמות מקומות בכרטיס היום: שלטי רחוב קטנים בתוך השורה */
html body .er-lines li b { display: inline-block; padding: 0 8px 1px; margin: 0 2px; background: var(--sign); color: #fff; font-weight: 800; line-height: 1.45; border-radius: 7px 2px 2px 2px; box-shadow: inset 0 0 0 1.5px var(--sign), inset 0 0 0 2.6px #fff; }
/* השבוע: קו אוטובוס. ששת הימים הם תחנות על קו אחד, היום שלכם מודגש */
html body .er-week { position: relative; gap: 0; }
html body .er-week::before { content: ""; position: absolute; top: 15px; left: calc(100% / 12); right: calc(100% / 12); height: 4px; background: rgba(244,227,193,0.16); border-radius: 2px; }
html body .er-wd { position: relative; border: 0; background: none; padding: 2px 0 0; gap: 3px; border-radius: 0; }
html body .er-wd i { position: relative; z-index: 1; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--s1); border: 2px solid rgba(244,227,193,0.3); }
html body .er-wd.now i, html body .er-wd.next i { border-color: var(--go); background: color-mix(in srgb, var(--go) 22%, var(--s1)); }
html body .er-wd.now, html body .er-wd.next { background: none; color: #fff; }
html body .er-wd.next::after { content: none; }
html body .er-wd.miss i { border-color: var(--sun); }
html body .er-wd.fri i { border-style: double; border-width: 3px; }
html body .er-cont .er-week::before { top: 10px; } html body .er-cont .er-wd i { width: 20px; height: 20px; }
html body .er-cont .er-wd { background: none; border: 0; }
/* המדליות: על סרט, בלי קופסאות אפורות. מה שעוד לא הושג חלש, מה שהושג במסגרת זהב */
html body .er-medals { gap: 2px; padding: 4px 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
html body .er-md { background: none; border: 1px solid transparent; }
html body .er-md.got { background: rgba(255,194,75,0.08); border-color: rgba(255,194,75,0.5); }
/* הטלפון: אבן שפה כחול-לבן מתחת לשורה העליונה, כמו ליד חנייה בתל אביב */
html body #phone-overlay .phone-top { border-bottom: 0; background-image: repeating-linear-gradient(90deg, var(--sign) 0 16px, var(--plaster) 16px 32px); background-size: 100% 4px; background-position: bottom; background-repeat: no-repeat; padding-bottom: 14px; }
html body #phone-overlay .pnav.active { background: color-mix(in srgb, var(--go) 12%, transparent); }
/* בלי הילה ירוקה מתחת לכפתור במסך הכותרת */
html body #title-screen.t2 .ts-go { box-shadow: inset 0 0 0 3px var(--go-sign), inset 0 0 0 5px rgba(255,255,255,0.92), 0 10px 26px rgba(5,8,22,0.45); }
/* ההכרזה באמצע המסך: בלי זוהר כתום */
html body #banner { text-shadow: 0 3px 0 rgba(5,8,22,0.5), 0 2px 18px rgba(5,8,22,0.85); }
html body .lead-row .big-ico .ic { width: 28px; height: 28px; color: var(--sand); --ic2: var(--sea); }
html body .er-lines li b { margin: 0 2px 0 0; }

/* ===== סבב עיצוב 2, חלק ג (אחרי סוקר שני): שפת השלטים גם בכפתורי הנהיגה ובמצבים ===== */
/* כפתורי הנהיגה במגע: עיגולים כמו תמרורי חובה. דיסק מלא בצבע של הפעולה וטבעת לבנה פנימית */
html body .key-btn { border: 0; backdrop-filter: none; box-shadow: inset 0 0 0 3px var(--kb, #3b4a6b), inset 0 0 0 5px rgba(255,255,255,0.88), 0 6px 16px rgba(5,8,22,0.45); background: var(--kb, #3b4a6b); }
html body .gas-btn { --kb: var(--go-sign); } html body .brake-btn { --kb: #b3263a; }
html body .nitro-btn { --kb: #0d7f76; } html body .drift-btn { --kb: #a8730c; } html body .walk-btn { --kb: #3b4a6b; }
html body .key-btn .ic { color: #fff; --ic2: rgba(255,255,255,0.75); }
html body #k-nitro .ic, html body #k-drift .ic { --ic2: rgba(255,255,255,0.75); }
html body .key-btn.on { transform: scale(0.92); filter: brightness(1.15); }
html body .key-btn.nitro-btn.on { --kb: #10a497; }
/* המצבים: לוחות כמו שלט. הנבחר הוא שלט מלא בצבע של המצב, עם מסגרת לבנה פנימית. השאר כהים עם מסגרת דקה */
html body .ts-mode { border: 0; box-shadow: inset 0 0 0 1px var(--edge-hi); }
html body .ts-mode.on { background: var(--mc); background-image: none; color: var(--go-ink); box-shadow: inset 0 0 0 3px var(--mc), inset 0 0 0 5px rgba(255,255,255,0.9); }
html body .ts-mode.on b, html body .ts-mode.on small { color: #0b1020; }
html body .ts-mode.on .ic { color: #0b1020; --ic2: #fff; }
html body .ts-mode:hover, html body .ts-mode:focus-visible { box-shadow: inset 0 0 0 2px var(--mc); }
html body .ts-mode.on:hover, html body .ts-mode.on:focus-visible { box-shadow: inset 0 0 0 3px var(--mc), inset 0 0 0 5px #fff; }
html body .ts-mode:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* שלט ההסבר מתחת ללוגו: אותה מסגרת פנימית של שלט */
html body #title-screen.t2 .ts-lead { box-shadow: inset 0 0 0 2px var(--plaster), inset 0 0 0 3.2px var(--sign-deep), 0 8px 24px rgba(5,8,22,0.4); padding: 8px 14px 9px; }
/* בחירות בחנות: כרטיסי בחירה פעילים כמו בסיפור (קו צבע בצד, טקסט לבן), לא קופסאות שנראות כבויות */
html body #shop-ui .sh-opts button, html body #shop-ui .sh-opts button:first-child:not(:only-child) { background-color: var(--s3); color: #fff; border: 1px solid var(--edge-hi); border-inline-start: 4px solid var(--gold); }
html body #shop-ui .sh-opts button:only-child { border: 0; }
/* שם החנות: השלט ברוחב של השם, לא נמתח על חצי מסך */
html body #shop-ui .sh-name { flex: 0 1 auto; max-width: 70%; }
/* הטראצו חלש יותר (ערך חדש ל---terrazzo), ושורות הטלפון ובחירות הסיפור על משטח אחיד */
html body #phone-overlay .row-card, html body .d-opt { background-color: var(--s2); }
/* התראה מהטלפון: אטומה לגמרי, כדי שמה שמתחתיה לא ייראה דרכה */
html body .pa-note { background-color: var(--s1); box-shadow: 0 14px 34px rgba(0,0,0,0.6); }
html body .key-btn.sm { box-shadow: inset 0 0 0 2px var(--kb, #3b4a6b), inset 0 0 0 3.5px rgba(255,255,255,0.88), 0 6px 16px rgba(5,8,22,0.45); }

/* ===== סבב עיצוב 2, חלק ד (אחרי סוקר שלישי): הכפתור הירוק הוא הדבר הכי חזק במסך הכותרת ===== */
html body .ts-mode.on { background: color-mix(in srgb, var(--mc) 16%, var(--s1)); color: var(--sand); box-shadow: inset 0 0 0 2px var(--mc), inset 0 0 0 4px rgba(255,255,255,0.5); }
html body .ts-mode.on b { color: #fff; } html body .ts-mode.on small { color: var(--sand); }
html body .ts-mode.on .ic { color: #fff; --ic2: var(--mc); }
html body .er-md { opacity: 0.55; } html body .er-md.got { opacity: 1; }
html body .er-md small { color: var(--sand); }
html body .pa-meter { background: var(--s2); border-color: var(--edge-hi); }

/* ======================================================================================================
   סבב עיצוב 3 (2.12.2026): הנסיעה עצמה. ה-HUD עובר לשפת הרחוב, ולסט האייקונים יש חתימה אחת:
   הלוחית. מסגרת של מרפסת באוהאוס (פינה אחת מעוגלת) ופס המרפסת בצבע הדגש מתחת לסמל. נדלקת רק במקומות הבולטים.
   ====================================================================================================== */
.ic .fr { display: none; }
html body :is(.ts-mode, #hud .hud-ico, .pnav i, .tm-btn i, #d-ico, #m-ico, .lead-row .big-ico, #phone-title) .ic .fr { display: inline; }
html body :is(.ts-mode, #hud .hud-ico, .pnav i, .tm-btn i, #d-ico, #m-ico, .lead-row .big-ico, #phone-title) .ic .gl { transform: translate(5px, 3.3px) scale(0.58); stroke-width: 3.1; }
html body .ts-mode .ic { width: 36px; height: 36px; }
@media (orientation: landscape) and (max-height: 500px) { html body .ts-mode .ic { width: 30px; height: 30px; } }
html body #hud .hud-btn.hud-ico .ic { width: 28px; height: 28px; }
html body #phone-overlay .pnav i .ic { width: 30px; height: 30px; }
html body .tm-btn i .ic { width: 34px; height: 34px; }
html body #decision #d-ico .ic { width: 36px; height: 36px; }
html body #decision .d-head #d-ico { background: none; border: 0; }
html body .lead-row .big-ico .ic { width: 34px; height: 34px; }
html body #phone-title .ic { width: 28px; height: 28px; }

/* ----- כפתורי השורה העליונה: לוחות אטומים בצבע לילה, בלי מסגרת אפורה. הלוחית שבאייקון היא מה שמזהה אותם ----- */
html body #hud .hud-btn.hud-ico { background-color: #111c3f; border: 0; box-shadow: 0 4px 14px rgba(5,8,22,0.4); border-radius: 16px 2px 2px 2px; }
html body #hud .hud-btn.hud-ico .lb { font-size: 12px; }

/* ----- כרטיס המשימה: הכותרת היא שלט הכוונה בצבע המצב (כהה, טקסט לבן, מסגרת לבנה פנימית), הגוף חזית עם חלונות סרט ----- */
html body #m-tag { margin: -11px -11px 9px; padding: 4px 12px; background: color-mix(in srgb, var(--mc, #19c3b2) 62%, #04120c); color: #fff; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mc, #19c3b2) 62%, #04120c), inset 0 0 0 3.2px rgba(255,255,255,0.9); border-radius: 14px 2px 0 0; font-size: 13px; line-height: 20px; }
html body #m-tag .ic { color: #fff; --ic2: #fff; }
html body #mission-panel.mini #m-tag { margin: -6px -10px 6px; }
html body #mission-panel[data-mode] { background-color: #0d1631; border: 0; box-shadow: 0 8px 22px rgba(5,8,22,0.45);
  background-image: repeating-linear-gradient(180deg, transparent 0 8px, rgba(244,227,193,0.075) 8px 11px); background-size: 26% calc(100% - 64px); background-position: left 10px top 34px; background-repeat: no-repeat; }
html body #mission-panel #m-ico { background: none; }
html body #mission-panel #m-ico .ic { width: 30px; height: 30px; }

/* ----- המהירות: עוד לוח לד, כמו הזמן והמרחק ----- */
html body .speed-pill { background-color: var(--led-bg); border: 1px solid var(--led-edge); border-radius: 2px; }
html body .speed-pill { background-image: linear-gradient(90deg, var(--revc, var(--sun)), var(--gold)), radial-gradient(circle, rgba(255,178,62,0.13) 0.75px, transparent 1.05px);
  background-size: calc(var(--rev, 1) * 100%) 3px, 3px 3px; background-position: right bottom, 0 0; background-repeat: no-repeat, repeat; }
html body .speed-pill strong { color: var(--led); }
html body .speed-pill small { color: rgba(244,227,193,0.8); }

/* ----- המפה: לוח אטום, המפה העגולה בטבעת לבנה כמו תמרור, ומתחת לשלט הרחוב שלט ההסבר הלבן (השכונה), כמו בשלטים של תל אביב ----- */
html body #radar-box { background-color: #111c3f; border: 0; box-shadow: 0 6px 18px rgba(5,8,22,0.45); border-radius: 16px 2px 2px 2px; }
html body #radar { outline: 2px solid rgba(255,255,255,0.8); outline-offset: -2px; }
html body #radar-zone { background: var(--sign); box-shadow: inset 0 0 0 1.5px var(--sign), inset 0 0 0 2.8px #fff; border-radius: 8px 2px 2px 2px; padding: 3px 9px 4px; }
html body #radar-hood:not(:empty) { display: block; width: fit-content; max-width: 100%; margin: 3px auto 0; padding: 1px 8px 2px; background: var(--plaster); color: var(--sign-deep); font-size: 13px; font-weight: 700; line-height: 1.3; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px var(--sign-deep); }
@media (max-height: 500px) { html body #radar-hood:not(:empty) { display: none; } }

/* ----- השיחה: הלוח של השיחה אטום, וכפתור הניתוק הוא תמרור עגול אדום עם טבעת לבנה ----- */
html body #pa-callbox .pa-bar { background-color: #0d1631; border: 0; box-shadow: 0 8px 22px rgba(5,8,22,0.5); }
html body .pa-round { box-shadow: inset 0 0 0 2px var(--rb, #d8394a), inset 0 0 0 3.5px rgba(255,255,255,0.88), 0 4px 12px rgba(5,8,22,0.4); }
html body .pa-round.no { --rb: #c32a3c; background: #c32a3c; } html body .pa-round.ok { --rb: var(--go-sign); background: var(--go-sign); }

/* ----- כפתור הדלת: הפעולה הראשית של הרגע, אז הוא שלט הכוונה הירוק (וגם הרמזים אומרים עכשיו "ירוק") ----- */
html body #btn-action { background: var(--go-sign); color: #fff; border: 0; box-shadow: inset 0 0 0 3px var(--go-sign), inset 0 0 0 5px rgba(255,255,255,0.92), 0 8px 22px rgba(5,8,22,0.45); }
html body #btn-action .ic { color: #fff; --ic2: #fff; }
html body #btn-action kbd { color: #fff; border-color: rgba(255,255,255,0.6); }

/* ----- החנויות: שם החנות הוא שלט חזית של החנות עצמה (כמו בחוץ), לא שלט רחוב כחול. בית המרקחת לבן עם פס ירוק, ההמבורגרייה שחורה עם פסים כתומים ----- */
html body #shop-ui.pharmacy .sh-name { background: #f4f7f5; color: #146b39; border-radius: 2px; box-shadow: inset 0 -5px 0 #1f8f4e, 0 6px 18px rgba(0,0,0,0.35); padding-bottom: 10px; }
html body #shop-ui.pharmacy .sh-name .ic { color: #146b39; --ic2: #20d16a; }
html body #shop-ui.pharmacy .sh-name small, html body #shop-ui.pharmacy .sh-name small .ic { color: #2d5b42; --ic2: #2d5b42; }
html body #shop-ui.burger .sh-name { background: #141012; color: #ffc24b; border-radius: 2px; box-shadow: inset 0 4px 0 #ff9a1f, inset 0 -4px 0 #ff9a1f, 0 6px 18px rgba(0,0,0,0.45); padding: 9px 12px; }
html body #shop-ui.burger .sh-name .ic { color: #ffc24b; --ic2: #ff9a1f; }
html body #shop-ui.burger .sh-name small, html body #shop-ui.burger .sh-name small .ic { color: #f4efe6; --ic2: #f4efe6; }
/* הבחירה הראשונה (מה שרוב האנשים עושים) קצת בולטת: פס זהב מלא ומשטח בהיר. השאר עם פס חלש. אף אחת לא ירוקה */
html body #shop-ui .sh-opts button:not(:only-child) { background-color: var(--s2); border-inline-start-color: rgba(255,194,75,0.32); color: var(--sand); }
html body #shop-ui .sh-opts button:first-child:not(:only-child) { background-color: var(--s3); border-inline-start-color: var(--gold); color: #fff; }
/* תשובה מהירה בהתראה ("אני בדרך!"), והכפתורים הירוקים של אפליקציות הטלפון: אותו שלט הכוונה ירוק */
html body .pa-qr button.go, html body .pa-btn.go { background: var(--go-sign); border: 0; color: #fff; box-shadow: inset 0 0 0 2px var(--go-sign), inset 0 0 0 3.5px rgba(255,255,255,0.9); }
html body .pa-qr button.go .ic { color: #fff; --ic2: #fff; vertical-align: -4px; }
/* ----- סבב 3, תיקונים אחרי סוקר: שכבות ומחשב ----- */
/* שורת השיחה לא נראית מעל חלון פתוח (הכרטיס של "נגמר הזמן" ושאר החלונות). השורה עצמה מסומנת visible, אז מסתירים אותה ישירות */
html body.er-modal #pa-callbox .pa-bar, html body:has(#tmenu:not(.hidden)) #pa-callbox .pa-bar, html body:has(#help:not(.hidden)) #pa-callbox .pa-bar, html body:has(#phone-overlay:not(.hidden)) #pa-callbox .pa-bar, html body:has(#decision:not(.hidden)) #pa-callbox .pa-bar { visibility: hidden; }
/* כשהשיחה נכנסת הרמז נעלם מיד, בלי לדעוך מתחת לשורת השיחה */
html body.pa-calling #coach { visibility: hidden; transition: none; }
/* מחשב: שלט הרחוב והכפתורים העליונים בגודל שנקרא במבט */
@media (pointer: fine) and (min-width: 1100px) {
  html body #radar-zone { font-size: 15px; } html body #radar-hood:not(:empty) { font-size: 13px; }
  html body #hud .hud-btn.hud-ico { min-height: 44px; padding: 6px 12px; } html body #hud .hud-btn.hud-ico .ic { width: 28px; height: 28px; } html body #hud .hud-btn.hud-ico .lb { font-size: 14px; }
}
/* חלונות הסרט בכרטיס המשימה בצבע הים */
html body #mission-panel[data-mode] { background-image: repeating-linear-gradient(180deg, transparent 0 8px, rgba(25,195,178,0.12) 8px 11px); }
/* ----- סבב 3, אחרי סוקר שני ----- */
/* חלונות הסרט בכרטיס המשימה: רצועה צרה בקצה, לא מאחורי הטקסט */
html body #mission-panel[data-mode] { background-size: 12px calc(100% - 44px); background-position: left 6px top 36px; }
/* אבן שפה כחול-לבן מתחת לשלט המצב בכרטיס המשימה, כמו ברחוב */
html body #m-tag { position: relative; }
html body #m-tag::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: repeating-linear-gradient(90deg, var(--sign) 0 12px, var(--plaster) 12px 24px); }
/* הג'ויסטיק: סימון עגול על הכביש (טבעת מקווקוות לבנה), והידית היא תמרור חובה כחול עם טבעת לבנה */
html body #joy-base { border: 3px dashed rgba(255,255,255,0.5); background: rgba(13,22,49,0.45); }
html body #joy-base.on { border-color: rgba(255,255,255,0.8); }
html body #joy-knob { background: var(--sign); border: 0; box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px rgba(255,255,255,0.9), 0 4px 14px rgba(0,0,0,0.45); }
/* פעולות משניות: לוח לילה עם מסגרת לבנה פנימית של שלט, לא קופסה אפורה */
html body .er-row button, html body .er-skip, html body .act-btn.ghost, html body .btn-sec, html body .tm-btn, html body .pa-btn:not(.go):not(.stop) { border: 0; background-color: rgba(17,28,63,0.92); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42); }
html body .er-skip { box-shadow: inset 0 0 0 1px rgba(47,208,138,0.7); }
/* "1 מתוך 2" בחלון ההחלטה: לוח לד קטן */
html body #d-step { color: var(--led); background-color: var(--led-bg); background-image: radial-gradient(circle, rgba(255,178,62,0.13) 0.75px, transparent 1.05px); background-size: 3px 3px; border: 1px solid var(--led-edge); border-radius: 2px; font-weight: 900; font-variant-numeric: tabular-nums; }
html body #m-tag { padding-bottom: 8px; } html body #m-tag::after { bottom: 0; }
/* מסגרת הלוחית באייקון: לבן אמייל, לא חול */
html body :is(.ts-mode, #hud .hud-ico, .pnav i, .tm-btn i, #d-ico, #m-ico, .lead-row .big-ico, #phone-title) .ic .fr { color: #fff; }

/* ======================================================================================================
   קריאות (2.12.2026, בקשה של אורי): טקסט אף פעם לא נבלע ברקע. נמדד בכלי ניגודיות על כל מסך, ביום ובלילה.
   יעד: טקסט רגיל 7:1 לפחות, תוויות מודגשות 4.5:1, מול הרקע הכי גרוע שמאחוריהן. אין טקסט ישר על הסצנה בלי לוח אטום.
   ההיררכיה היא בגודל ובמשקל, לא בעמעום. מצב כבוי מסומן בצורה (מסגרת מקווקוות, מנעול), לא בטקסט אפור
   ====================================================================================================== */
:root { --mute: #c9d1e4; --line: rgba(244,227,193,0.42); --edge: rgba(244,227,193,0.42); --edge-hi: rgba(244,227,193,0.62); }
/* מצב נעול או כבוי: הטקסט נשאר מלא, המסגרת מקווקוות */
html body .locked { opacity: 1; border-style: dashed; border-color: var(--edge-hi); }
html body .er-md, html body .er-md:not(.got) { opacity: 1; }
html body .er-md:not(.got) { border: 1px dashed var(--edge); }
html body .er-md:not(.got) .ic { opacity: 0.45; filter: grayscale(1); }
html body .er-md small { color: var(--sand); font-size: 12px; font-weight: 700; }
html body .er-go small, html body #title-screen.t2 .ts-go small { opacity: 1; color: #fff; }
/* כותרות קטנות (שבוע 1, השעון הגיע לאפס, צומת החלטה): 14 פיקסלים מודגש */
html body .er-k, html body #decision .d-head small, html body #decision .d-opt em { font-size: 14px; }
html body .er-wd { color: var(--sand); font-size: 12px; }
/* טקסט שיושב על הסצנה: תמיד על לוח אטום */
html body #radar-box #osm-credit { background: rgba(5,8,22,0.86); color: var(--sand); padding: 1px 6px; border-radius: 2px; }
html body #pa-callbox .pa-hang { background: rgba(5,8,22,0.88); color: #fff; text-shadow: none; padding: 1px 4px; border-radius: 2px; width: auto; left: 6px; }
/* כותרת המצב בכרטיס המשימה: ירוק עמוק יותר ו-14 פיקסלים, כדי שהלבן יבלוט */
html body #m-tag { font-size: 14px; background: color-mix(in srgb, var(--mc, #19c3b2) 48%, #04120c); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mc, #19c3b2) 48%, #04120c), inset 0 0 0 3.2px rgba(255,255,255,0.9); }
html body .drift-btn { --kb: #8a5c05; } html body .nitro-btn { --kb: #0a6b63; }
/* מסגרות של כרטיסים וכפתורים משניים: קו בהיר שרואים */
html body .er-row button, html body .er-skip, html body .act-btn.ghost, html body .btn-sec, html body .tm-btn, html body .pa-btn:not(.go):not(.stop) { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.6); }
html body #phone-overlay .row-card, html body .d-opt, html body #shop-ui .sh-opts button { border-color: var(--edge-hi); }
html body .er-go small, html body #title-screen.t2 .ts-go small { font-size: 14px; font-weight: 700; }
/* ההכרזה באמצע המסך ("שבוע 1 · יום ראשון") ישבה ישר על הסצנה: עכשיו על לוח אטום */
html body #banner { width: fit-content; max-width: 92vw; margin-inline: auto; padding: 8px 18px 10px; background: rgba(8,13,30,0.92); border-radius: var(--shape); text-shadow: none; box-shadow: 0 10px 30px rgba(5,8,22,0.5); }
html body #banner small { text-shadow: none; }
@media (pointer: fine) { html body #title-screen.t2 .ts-hint { opacity: 1; color: var(--sand); } }
:root { --go-sign: #0b6b41; --go-sign-hi: #0f8050; }
/* ----- בהירות (2.12): שמות שלא נשברים באמצע מילה ----- */
/* שורת המשימה תופסת את כל מה שנשאר בשורה, והשעון והמרחק לא מתכווצים. ההתאמה עצמה (גופן ושתי שורות) ב-fitText, modes.js */
html body.er-on #mission-panel #m-status { flex: 1 1 auto; min-width: 0; overflow-wrap: normal; word-break: keep-all; }
html body.er-on #mission-panel #m-timer, html body.er-on #mission-panel #m-dist { flex: none; }
/* שלט המקום בחלון ההחלטה: לא רחב מהכרטיס (fitText מקטין אותו ושובר רק בין מילים) */
html body #decision .d-head > div { min-width: 0; flex: 1 1 auto; }
html body #decision .d-head strong#d-who { max-width: 100%; }
html body .er-lines li b { max-width: 100%; }
/* במצב חופשי יש כרטיס אחד למעלה: "רוצים משימה?". כרטיס המשימה של הסיפור לא נשאר מתחתיו (נראה מבעדו, 2.12) */
html body.er-pill-on #mission-panel { display: none; }
@media (max-height: 480px) { html body.er-on #mission-panel #m-status { flex: 1 0 100%; } }   /* טלפון לרוחב: שורת המשימה לכל הרוחב (אחרי הכלל של 1425, שאחרת גובר) */
/* תריס גלילה (ui.js shutter): פלדה מגולוונת בפסים, טאג, פתק "חוזרים מיד", מסילה ומנעול. מצטייר רק בזמן מעבר */
#shutter { position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 200; display: none; pointer-events: auto; transform: translate3d(0,-104%,0); contain: strict; overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0) 46%, rgba(66,46,28,0.34) 100%), linear-gradient(90deg, rgba(0,0,0,0.38), rgba(0,0,0,0) 5%, rgba(0,0,0,0) 95%, rgba(0,0,0,0.38)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 41px, rgba(255,255,255,0.05) 41px 43px, rgba(0,0,0,0) 43px 97px, rgba(0,0,0,0.07) 97px 98px),
    repeating-linear-gradient(180deg, #59626e 0, #9aa3ae 2px, #c4cbd4 5px, #aab2bc 10px, #848d98 16px, #5b636e 20px, #2f353d 22px, #3c434c 24px); }
#shutter.on { display: block; will-change: transform; }
#shutter.up { pointer-events: none; }
#shutter .shu-tag { position: absolute; top: 22%; inset-inline-end: 6%; width: min(70vw, 440px); opacity: 0.82; }
#shutter .shu-note { position: absolute; top: 47%; inset-inline-start: 10%; transform: rotate(3.5deg); background: #fff; color: #c8202b; padding: 10px 16px 8px; font-style: normal; box-shadow: 0 3px 0 rgba(0,0,0,0.22); }
#shutter .shu-note b { font-size: clamp(20px, 5.6vw, 30px); font-weight: 900; }
#shutter .shu-note::before, #shutter .shu-note::after { content: ""; position: absolute; top: -8px; width: 34px; height: 14px; background: rgba(236,232,214,0.75); }
#shutter .shu-note::before { right: -10px; transform: rotate(32deg); }
#shutter .shu-note::after { left: -10px; transform: rotate(-28deg); }
#shutter .shu-rail { position: absolute; left: 0; right: 0; bottom: 0; height: calc(42px + var(--safe-b)); background: linear-gradient(#454b55, #22262d 28%, #2d323a 72%, #15181d); border-top: 2px solid #79818c; }
#shutter .shu-lock { position: absolute; left: 50%; bottom: calc(8px + var(--safe-b)); width: clamp(46px, 5vw, 76px); height: auto; aspect-ratio: 60 / 70; transform: translateX(-50%); }
#shutter .shu-rail { height: calc(clamp(42px, 4.4vw, 62px) + var(--safe-b)); }
body.shut-closed #title-screen, body.shut-closed #start-modal, body.shut-closed .er-ov, body.shut-closed .er-ov .er-sheet, body.shut-closed #mode-card { transition: none !important; }
/* מסך הסוף: "להמשיך בכל זאת" הוא קישור שקט מתחת לשורה, לא כפתור שני שמתחרה בירוק (סקירה 3.12) */
html body #er-end .er-skip { width: auto; margin: 4px auto 0; min-height: 40px; padding: 4px 12px; border: 0; background: none; box-shadow: none; color: #bff3dc; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* מתג בהגדרות (ui.js swBtn): מלבן עם פינה אחת מעוגלת כמו השלטים, לא גלולה. ירוק כשדלוק */
.tg { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 56px; min-height: 44px; padding: 4px 2px; border: 0; background: none; color: var(--mute); font: inherit; cursor: pointer; }
.tg small { font-size: 12px; font-weight: 800; line-height: 1; }
.tg-sw { position: relative; display: block; width: 50px; height: 28px; border-radius: 9px 2px 2px 2px; background: #28324f; box-shadow: inset 0 0 0 1.5px rgba(244,227,193,0.35); transition: background .2s; }
.tg-sw i { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px 1px 1px 1px; background: #cfd6e6; box-shadow: 0 2px 4px rgba(0,0,0,0.35); transition: right .2s cubic-bezier(.3,1.3,.5,1), background .2s; }
.tg[aria-checked="true"] { color: #bff3dc; }
.tg[aria-checked="true"] .tg-sw { background: var(--go-sign, #0e7a4b); box-shadow: inset 0 0 0 1.5px #7be8b8; }
.tg[aria-checked="true"] .tg-sw i { right: 26px; background: #fff; }
.tg:focus-visible { outline: 2px solid var(--go); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tg-sw, .tg-sw i, .er-sw, .er-sw i { transition: none; } }
/* אין קליטה: שלט קטן מתחת למפה (main.js syncNet). כתום כמו אזהרה, לא אדום של תקלה */
#net-off { display: none; margin-top: 4px; padding: 3px 6px 4px; background: #3a1d08; border: 1px solid rgba(255,140,60,0.7); border-radius: 8px 2px 2px 2px; color: #ffd0a8; text-align: center; line-height: 1.2; }
#net-off.on { display: block; }
#net-off b { display: block; font-size: 12.5px; font-weight: 900; color: #fff; }
#net-off small { display: block; font-size: 10.5px; font-weight: 600; }
body.inside #net-off { display: none; }

/* העזרה בטלפון לרוחב (מבקר 4.12): השורה "עוד" נפלה מתחת לקפל. שורות צפופות יותר, כך שהיא נראית בלי לגלול */
@media (max-height: 480px) and (min-aspect-ratio: 4/3) {
  #help .help-body { padding-top: 6px; padding-bottom: 6px; gap: 6px 22px; }
  #help .help-body h4 { padding-bottom: 4px; margin-bottom: 2px; }
  #help .hk { padding: 1px 0; line-height: 1.3; }
  #help .help-goal .hk span:last-child { font-size: 14.5px; }
  #help .help-more { padding-top: 0; }
  #help .help-more > summary { min-height: 40px; }
}
