:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --navy: #06101f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

img { -webkit-user-drag: none; image-rendering: pixelated; }

/* ---------- רקע ---------- */
/* בסגנון רקע הארנה (כהה, קרני אור באלכסון) אבל בצבעי המשחק: כחול לילה, כחול חשמלי וזהב.
   שכבות: זוהר, 4 קרניים שזזות לאט, רשת עדינה, ופיקסלים שעולים (js/main.js). בלי טקסט (בקשת המשתמש) */
.bg {
  position: fixed;
  inset: -4%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 18% 12%, rgba(40, 96, 220, .45), transparent 70%),
    radial-gradient(ellipse 90% 30% at 50% 108%, rgba(50, 110, 255, .28), transparent 70%),
    radial-gradient(ellipse 50% 45% at 88% 92%, rgba(255, 196, 64, .12), transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 30%, rgba(60, 200, 255, .08), transparent 70%),
    linear-gradient(160deg, #0b1734 0%, #060d20 45%, #03060f 100%);
  transform: translate(var(--px, 0), var(--py, 0)) scale(1.04);
  transition: transform .4s var(--ease-out), filter 1s var(--ease-in-out);
  animation: bg-in 1.4s var(--ease-out) both;
}
body.in-home .bg { filter: brightness(.88); }
.bg > * { position: absolute; pointer-events: none; }

/* זוהר שנושם */
.bg-glow { left: 30%; top: 38%; width: 80vw; height: 70vh; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(56, 120, 255, .22), transparent); animation: bg-breathe 9s ease-in-out infinite; }
@keyframes bg-breathe { 50% { opacity: .55; scale: 1.08; } }

/* קרני אור באלכסון (כמו בארנה), זזות לאט הלוך וחזור */
.bg-beam { top: -30%; bottom: -30%; width: 22vw; rotate: 24deg; mix-blend-mode: screen; animation: bg-beam 16s ease-in-out infinite alternate; }
.bg-beam.b1 { left: 46%; background: linear-gradient(90deg, transparent, rgba(80, 140, 255, .2) 45%, rgba(150, 195, 255, .3) 50%, rgba(80, 140, 255, .2) 55%, transparent); }
.bg-beam.b2 { left: 60%; width: 9vw; background: linear-gradient(90deg, transparent, rgba(110, 170, 255, .14) 50%, transparent); animation-duration: 21s; animation-delay: -6s; }
.bg-beam.b3 { left: 74%; width: 3vw; background: linear-gradient(90deg, transparent, rgba(255, 210, 90, .32) 50%, transparent); animation-duration: 13s; animation-delay: -3s; }
.bg-beam.b4 { left: 8%; width: 14vw; background: linear-gradient(90deg, transparent, rgba(60, 200, 255, .08) 50%, transparent); animation-duration: 25s; animation-delay: -12s; }
@keyframes bg-beam { from { translate: -6vw 0; opacity: .7; } to { translate: 6vw 0; opacity: 1; } }

/* רשת עדינה, נעלמת לכיוון השוליים */
.bg-grid { inset: 0; background: repeating-linear-gradient(0deg, rgba(120, 170, 255, .05) 0 1px, transparent 1px 5vh), repeating-linear-gradient(90deg, rgba(120, 170, 255, .05) 0 1px, transparent 1px 5vh); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000, transparent); mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000, transparent); }

/* פיקסלים מרובעים שעולים לאט */
.bg-pix { inset: 0; }
.bg-pix i { position: absolute; bottom: -4vh; left: var(--x); width: var(--s); height: var(--s); background: var(--c); box-shadow: 0 0 1.2vh var(--c); opacity: 0; animation: bg-rise var(--d) linear var(--w) infinite; }
@keyframes bg-rise { 0% { opacity: 0; translate: 0 0; } 12% { opacity: var(--o); } 85% { opacity: var(--o); } 100% { opacity: 0; translate: var(--dx) -112vh; } }

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(3, 8, 20, .75) 100%);
}

@keyframes bg-in {
  from { opacity: 0; transform: scale(1.12); }
  to   { opacity: 1; transform: translate(var(--px, 0), var(--py, 0)) scale(1.04); }
}

/* ---------- רקע ניטרלי (22.11.2026): אותו רקע, בגרפיט ושחור במקום כחול, והקרן הזהובה נשארת ----------
   המתג הוא class="bg-neutral" על <html> ב-index.html. בלעדיו חוזר הרקע הכחול שלמעלה (גם הפיקסלים ב-js/main.js).
   שאר הממשק (לוחות, כפתורים, מסגרות) מומר לאותם צבעים ב-js/theme.js, והמגרשים ב-js/pitch.js */
html.bg-neutral { --navy: #09090b; }
html.bg-neutral .bg {
  background:
    radial-gradient(ellipse 60% 55% at 18% 12%, rgba(128, 142, 168, .36), transparent 70%),
    radial-gradient(ellipse 90% 30% at 50% 108%, rgba(118, 132, 156, .22), transparent 70%),
    radial-gradient(ellipse 50% 45% at 88% 92%, rgba(255, 196, 64, .11), transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 30%, rgba(170, 182, 200, .08), transparent 70%),
    linear-gradient(160deg, #252932 0%, #15171d 45%, #08090c 100%);
}
html.bg-neutral .bg-glow { background: radial-gradient(closest-side, rgba(146, 158, 180, .2), transparent); }
html.bg-neutral .bg-beam.b1 { background: linear-gradient(90deg, transparent, rgba(170, 180, 198, .18) 45%, rgba(220, 226, 236, .28) 50%, rgba(170, 180, 198, .18) 55%, transparent); }
html.bg-neutral .bg-beam.b2 { background: linear-gradient(90deg, transparent, rgba(180, 190, 206, .13) 50%, transparent); }
html.bg-neutral .bg-beam.b3 { background: linear-gradient(90deg, transparent, rgba(255, 210, 90, .32) 50%, transparent); }
html.bg-neutral .bg-beam.b4 { background: linear-gradient(90deg, transparent, rgba(190, 200, 216, .08) 50%, transparent); }
html.bg-neutral .bg-grid { background: repeating-linear-gradient(0deg, rgba(190, 200, 216, .05) 0 1px, transparent 1px 5vh), repeating-linear-gradient(90deg, rgba(190, 200, 216, .05) 0 1px, transparent 1px 5vh); }
html.bg-neutral .vignette { background: radial-gradient(ellipse at center, transparent 45%, rgba(4, 4, 6, .78) 100%); }
/* הלוח הגדול במסך הראשי: גרפיט כהה כמו לוח "הקבוצה" (בלי זה הכחול השקוף שלו יוצא אפור בהיר ושטוח) */
html.bg-neutral .hub-main:not(.hm-news):not(.hm-club) {
  background: linear-gradient(135deg, rgba(66, 70, 80, .78), rgba(22, 24, 29, .88));
  box-shadow: inset 0 0 0 .2vh rgba(226, 230, 238, .16), 0 2vh 5vh rgba(0, 0, 0, .4);
}
html.bg-neutral.phone .rotate-notice {
  background:
    radial-gradient(ellipse 70% 55% at 20% 12%, rgba(128, 142, 168, .36), transparent 70%),
    linear-gradient(160deg, #252932, #15171d 50%, #08090c);
}

/* ---------- מסכים ---------- */
#app { position: fixed; inset: 0; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.screen.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* ---------- מסך פתיחה ---------- */
.logo {
  width: min(50vw, 74vh);
  animation:
    logo-in 1.1s var(--ease-out) .25s both,
    float 3.6s ease-in-out 1.4s infinite,
    glow 3.6s ease-in-out 1.4s infinite;
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(1.5) translateY(-6vh); filter: blur(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    filter: blur(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.4vh); }
}
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 1.2vw rgba(70, 150, 255, .35)); }
  50%      { filter: drop-shadow(0 0 2.4vw rgba(110, 185, 255, .75)); }
}

.prompt {
  position: absolute;
  bottom: 8vh;
  width: min(30vw, 52vh);
  animation:
    prompt-in .9s var(--ease-out) 1.5s both,
    blink 1.8s ease-in-out 2.4s infinite;
}
@keyframes prompt-in {
  from { opacity: 0; transform: translateY(2vh); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* יציאה ממסך הפתיחה */
#splash.leaving { pointer-events: none; }
#splash.leaving .logo {
  animation: logo-out .75s var(--ease-in-out) forwards;
}
#splash.leaving .prompt {
  animation: prompt-out .35s ease-in forwards;
}
@keyframes logo-out {
  to { opacity: 0; transform: scale(1.35); filter: blur(10px) drop-shadow(0 0 4vw rgba(130, 200, 255, 1)); }
}
@keyframes prompt-out {
  to { opacity: 0; transform: translateY(3vh); }
}

/* ---------- מעבר למסך הבית ---------- */
#home.entering { animation: home-in .8s var(--ease-out) both; }
@keyframes home-in {
  from { opacity: 0; transform: scale(.94); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1);   filter: blur(0); }
}

.logo-btn {
  position: absolute;
  top: 3vh;
  left: 50%;
  translate: -50% 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform .3s var(--ease-out), filter .3s;
}
.logo-small { display: block; width: min(9.5vw, 15vh); }
body.input-mouse .logo-btn:hover,
.logo-btn.nav-focus { transform: scale(1.07); filter: drop-shadow(0 0 1.4vh rgba(110, 185, 255, .8)); }
.logo-btn:active, .logo-btn.pressed { transform: scale(.96) !important; transition-duration: .08s; }
.logo-btn.bump { animation: bump .5s var(--ease-out); }
@keyframes bump { 35% { transform: scale(1.16) rotate(-2deg); } }

/* מעבר כללי בין מסכים */
.screen.leaving:not(#splash) { opacity: 0; transform: scale(1.03); filter: blur(4px); transition: opacity .3s, transform .3s, filter .3s; pointer-events: none; }

/* ---------- שורה עליונה בצד ימין ---------- */
@font-face {
  font-family: "Pixel";
  src: url("../assets/fonts/PressStart2P.ttf") format("truetype");
  font-display: block;
}

.hud-right {
  direction: ltr; /* סדר ויזואלי משמאל לימין: משימות, הגדרות */
  position: absolute;
  right: 2.5vw;
  top: 3vh;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 24px);
}
/* יתרת המטבעות: בפינה השמאלית העליונה, באותה שורה של האייקונים */
.hud-left {
  direction: ltr;
  position: absolute;
  left: 2.5vw;
  top: 3vh;
  display: flex;
  align-items: center;
}
#home.active .hud-left > *, #home.active .hud-right > * { animation: hud-in .7s var(--ease-out) backwards; }
#home.active .hud-left > :nth-child(1) { animation-delay: .25s; }
#home.active .hud-right > :nth-child(1) { animation-delay: .4s; }
#home.active .hud-right > :nth-child(2) { animation-delay: .55s; }
@keyframes hud-in {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* יתרת מטבעות */
.coin-balance {
  display: flex;
  align-items: center;
  gap: 1vh;
  height: clamp(34px, 5.4vh, 56px);
  padding: 0 clamp(14px, 1.4vw, 24px) 0 clamp(6px, .6vw, 10px);
  background: rgba(6, 16, 31, .7);
  box-shadow: inset 0 0 0 3px #1c4fa8, inset 0 0 0 5px rgba(120, 180, 255, .18);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, calc(100% - 6px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 6px) calc(100% - 3px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 3px), 0 calc(100% - 3px), 0 3px, 6px 3px);
}
.coin-balance img { height: 72%; aspect-ratio: 1; }
/* יהלומים: באותו כדור, לפני המטבעות, עם קו מפריד (js/ui.js addGemBalance) */
.gem-part { display: flex; align-items: center; gap: 1vh; height: 100%; }
.coin-balance .gem-part img { height: 64%; }
.wallet-sep { align-self: center; width: 2px; height: 46%; margin: 0 .4vh; background: rgba(120, 180, 255, .35); }
.gem-amount.coin-amount { text-shadow: 2px 0 #0a2a4a, -2px 0 #0a2a4a, 0 2px #0a2a4a, 0 -2px #0a2a4a, 2px 2px #0a2a4a; color: #d8f6ff; }
.tb-coins .gem-part { gap: .6vw; }
.tb-coins .gem-part img { height: 3.1vh; }
.tb-coins .wallet-sep { height: 3vh; margin: 0 .5vw; width: 1px; background: rgba(255, 255, 255, .28); }
.coin-amount {
  font-family: "Pixel", monospace;
  font-size: clamp(11px, 1.8vh, 19px);
  color: #fff;
  letter-spacing: .05em;
  text-shadow: 2px 0 #0a1e4a, -2px 0 #0a1e4a, 0 2px #0a1e4a, 0 -2px #0a1e4a, 2px 2px #0a1e4a;
  font-variant-numeric: tabular-nums;
}

/* כפתורי אייקון */
.icon-btn {
  width: clamp(38px, 6.2vh, 64px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform .25s var(--ease-out), filter .25s;
  filter: drop-shadow(0 .6vh 0 rgba(0, 0, 0, .35));
}
.icon-btn img { width: 100%; height: 100%; display: block; }
/* נקודה אדומה על אייקון המשימות כשיש פרס לאסוף (js/objectives.js) */
.icon-btn { position: relative; }
.icon-btn.has-dot::after {
  content: "";
  position: absolute;
  top: -.2vh;
  right: -.2vh;
  width: 1.9vh;
  height: 1.9vh;
  background: #ff4a3c;
  box-shadow: 0 0 0 .35vh #fff, 0 .4vh 1vh rgba(0, 0, 0, .5);
  animation: dot-pulse 1.2s ease-in-out infinite;
}
@keyframes dot-pulse { 50% { transform: scale(1.25); } }
/* ריחוף (עכבר בלבד) ופוקוס (מקלדת / שלט) נראים אותו דבר */
body.input-mouse .icon-btn:hover,
.icon-btn.nav-focus { transform: translateY(-.6vh) scale(1.1); filter: drop-shadow(0 1.2vh 0 rgba(0, 0, 0, .3)) brightness(1.12); }
.icon-btn:active,
.icon-btn.pressed { transform: translateY(.3vh) scale(.94) !important; transition-duration: .08s; }
body.input-mouse [data-target="settings"]:hover img,
[data-target="settings"].nav-focus img { animation: spin .9s var(--ease-out); }
@keyframes spin { to { transform: rotate(90deg); } }

/* טבעת הפוקוס, לכל אלמנט שמקבל את המחלקה */
.nav-focus {
  outline: 3px solid #ffd54a;
  outline-offset: .8vh;
  animation: ring 1s steps(2, jump-none) infinite;
}
@keyframes ring { 50% { outline-color: #fff6cf; } }

/* כשמשתמשים בשלט או במקלדת אין סמן עכבר */
body.input-keyboard, body.input-keyboard *, body.input-gamepad, body.input-gamepad * { cursor: none !important; }

/* רמזי כפתורים */
.hints {
  position: fixed;
  bottom: 1.4vh;
  left: 50%;
  z-index: 50;
  display: flex;
  gap: 2.2vw;
  padding: 1vh 1.6vw;
  background: rgba(6, 16, 31, .75);
  box-shadow: inset 0 0 0 3px #1c4fa8;
  opacity: 0;
  transform: translate(-50%, 1.5vh);
  transition: opacity .3s, transform .35s var(--ease-out);
  pointer-events: none;
}
.hints.show { opacity: 1; transform: translate(-50%, 0); }
body.no-hints .hints { display: none; }   /* הגדרות: הסתרת רמזי הכפתורים */
.hint { display: flex; align-items: center; gap: .7vw; }
.hint b { font-weight: 600; font-size: clamp(13px, 1.9vh, 18px); }
.pad, .key {
  display: inline-grid;
  place-items: center;
  font: normal clamp(9px, 1.5vh, 13px) "Pixel", monospace;
  color: #fff;
}
.pad { width: clamp(22px, 3.4vh, 32px); aspect-ratio: 1; border-radius: 50%; position: relative; }
.pad-a { background: #2f9e44; }
.pad-b { background: #d8443c; }
.pad-cross { background: #3f63d0; }
.pad-cross::before, .pad-cross::after {
  content: ""; position: absolute; width: 56%; height: 12%; background: #fff; border-radius: 1px;
}
.pad-cross::before { transform: rotate(45deg); }
.pad-cross::after  { transform: rotate(-45deg); }
.pad-circle { background: #d8443c; }
.pad-circle::before { content: ""; width: 50%; aspect-ratio: 1; border: 3px solid #fff; border-radius: 50%; box-sizing: border-box; }
.pad-x { background: #2a6fdb; }
.pad-square { background: #c2579a; }
.pad-square::before { content: ""; width: 46%; aspect-ratio: 1; border: 3px solid #fff; box-sizing: border-box; }
.pad-r3 { background: #4a566f; font-size: clamp(8px, 1.3vh, 12px); }
.key { padding: .5vh .8vw; background: #27324a; box-shadow: inset 0 -3px 0 #121a2b, inset 0 0 0 2px #5b6b92; }

/* ---------- תפריט ראשי ---------- */
.home-main {
  position: absolute;
  top: 19.5vh;
  bottom: 16.5vh;
  left: 0;
  right: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.menu-panel {
  --notch: 12px;
  width: min(86vw, 152vh);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 2.2vh 1.4vw;
  padding: 3vh 1.8vw;
  background: linear-gradient(180deg, rgba(12, 26, 52, .8), rgba(5, 12, 27, .86));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 4px #1c4fa8, inset 0 0 0 7px rgba(120, 180, 255, .14);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - var(--notch)) calc(100% - 4px), calc(100% - var(--notch)) 100%, var(--notch) 100%, var(--notch) calc(100% - 4px), 0 calc(100% - 4px), 0 4px, var(--notch) 4px);
}
#home.active .menu-panel { animation: panel-in .9s var(--ease-out) .15s backwards; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(4vh) scale(.94); }
  to   { opacity: 1; transform: none; }
}

.tile {
  --n: 8px;
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  min-height: 0;
  padding: 2vh 1vw 1.6vh;
  border: 0;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  box-shadow: inset 0 0 0 3px rgba(110, 160, 255, .28), inset 0 -.8vh 0 rgba(0, 0, 0, .28);
  clip-path: polygon(var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - var(--n)) calc(100% - 3px), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - 3px), 0 calc(100% - 3px), 0 3px, var(--n) 3px);
  transition: transform .3s var(--ease-out), background .3s, box-shadow .3s;
}
.tile:nth-child(4) { grid-column: 2 / span 2; }
.tile:nth-child(5) { grid-column: 4 / span 2; }

#home.active .tile { animation: tile-in .7s cubic-bezier(.34, 1.56, .64, 1) backwards; }
#home.active .tile:nth-child(1) { animation-delay: .45s; }
#home.active .tile:nth-child(2) { animation-delay: .55s; }
#home.active .tile:nth-child(3) { animation-delay: .65s; }
#home.active .tile:nth-child(4) { animation-delay: .75s; }
#home.active .tile:nth-child(5) { animation-delay: .85s; }
@keyframes tile-in {
  from { opacity: 0; transform: translateY(5vh) scale(.85); }
  to   { opacity: 1; transform: none; }
}

.tile-icon {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  animation: bob 3.2s ease-in-out infinite;
}
.tile:nth-child(2) .tile-icon { animation-delay: -.6s; }
.tile:nth-child(3) .tile-icon { animation-delay: -1.2s; }
.tile:nth-child(4) .tile-icon { animation-delay: -1.8s; }
.tile:nth-child(5) .tile-icon { animation-delay: -2.4s; }
@keyframes bob { 50% { transform: translateY(-.9vh); } }

.tile-icon img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 82%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 .8vh 0 rgba(0, 0, 0, .35));
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.tile-label {
  --u: max(1.7px, .33vh);
  flex: none;
  display: flex;
  justify-content: center;
}

/* הברק שעובר על הריבוע */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}

/* ריחוף (עכבר) ופוקוס (מקלדת / שלט) */
body.input-mouse .tile:hover,
.tile.nav-focus {
  transform: translateY(-.8vh);
  background: linear-gradient(160deg, rgba(120, 175, 255, .26), rgba(255, 255, 255, .05));
  box-shadow: inset 0 0 0 3px #6fb3ff, inset 0 -.8vh 0 rgba(0, 0, 0, .22), 0 0 3vh rgba(80, 150, 255, .45);
}
body.input-mouse .tile:hover .tile-icon img,
.tile.nav-focus .tile-icon img { transform: scale(1.12) rotate(-2deg); }
.px { display: block; image-rendering: pixelated; width: calc(var(--u) * var(--w)); height: calc(var(--u) * var(--h)); }
.px-h { display: none; }
body.input-mouse .tile:hover .px-n,
.tile.nav-focus .px-n { display: none; }
body.input-mouse .tile:hover .px-h,
.tile.nav-focus .px-h { display: block; }
body.input-mouse .tile:hover::after,
.tile.nav-focus::after { animation: shine .8s var(--ease-out); }
@keyframes shine { to { transform: translateX(130%); } }

.tile:active,
.tile.pressed { transform: translateY(.2vh) scale(.97) !important; transition-duration: .08s; }

/* מסגרת הפוקוס של המקלדת/שלט חיצונית לאריח (clip-path חותך outline), לכן מסמנים בצבע */
.tile.nav-focus { outline: none; animation: none; box-shadow: inset 0 0 0 3px #ffd54a, inset 0 -.8vh 0 rgba(0, 0, 0, .22), 0 0 3vh rgba(255, 213, 74, .35); }

/* ---------- שורת חדשות ---------- */
.news {
  position: absolute;
  bottom: 6.5vh;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 1.6vw;
  width: min(72vw, 128vh);
  height: clamp(46px, 7vh, 76px);
  padding: 0 1.4vw;
  background: rgba(6, 16, 31, .78);
  box-shadow: inset 0 0 0 3px #1c4fa8, inset 0 0 0 5px rgba(120, 180, 255, .14);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 8px) calc(100% - 3px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 3px), 0 calc(100% - 3px), 0 3px, 8px 3px);
}
#home.active .news { animation: news-in .8s var(--ease-out) 1.05s backwards; }
@keyframes news-in { from { opacity: 0; transform: translateY(3vh); } }

.news-tag {
  --u: max(1.5px, .3vh);
  flex: none;
  display: flex;
  padding: 1.1vh 1.1vw;
  background: #ffd54a;
  box-shadow: 0 .4vh 0 #b8860b;
}
.news-text {
  --u: max(1.5px, .31vh);
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
}
.news-tag, .news-text { transition: opacity .3s, transform .35s var(--ease-out); }
.news.swap-out .news-tag, .news.swap-out .news-text { opacity: 0; transform: translateY(-1.4vh); }

.news-dots { flex: none; display: flex; gap: .5vw; }
.news-dots i { width: clamp(6px, 1vh, 10px); aspect-ratio: 1; background: rgba(255, 255, 255, .25); transition: background .3s; }
.news-dots i.on { background: #ffd54a; }

/* הודעה קצרה */
.toast {
  position: absolute;
  bottom: 11vh;
  left: 50%;
  padding: 1.4vh 2vw;
  background: rgba(6, 16, 31, .85);
  box-shadow: inset 0 0 0 3px #1c4fa8;
  font-size: 1.1rem;
  opacity: 0;
  transform: translate(-50%, 2vh);
  transition: opacity .25s, transform .3s var(--ease-out);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* הודעה בראש המסך (UI.toast): משימה שהושלמה, חבילה שנוספה */
.gtoast {
  position: fixed;
  top: 9vh;
  left: 50%;
  z-index: 70;
  max-width: 80vw;
  padding: 1.3vh 2.2vw;
  font-size: clamp(14px, 2.2vh, 22px);
  font-weight: 700;
  color: #fff;
  background: rgba(6, 16, 31, .92);
  box-shadow: inset 0 0 0 3px #1c4fa8, 0 1vh 3vh rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translate(-50%, -2vh);
  transition: opacity .25s, transform .35s var(--ease-out);
  pointer-events: none;
}
.gtoast.show { opacity: 1; transform: translate(-50%, 0); }
.gtoast.good { box-shadow: inset 0 0 0 3px #ffd54a, 0 1vh 3vh rgba(0, 0, 0, .5); }

@media (prefers-reduced-motion: reduce) {
  .logo, .prompt, .bg, .bg * { animation: none !important; }
  .prompt { opacity: 1; }
}
.pad-y { background: #d9a520; }
.pad-triangle { background: #2bb39a; }
.pad-triangle::before { content: ""; width: 0; height: 0; border-left: .55em solid transparent; border-right: .55em solid transparent; border-bottom: .95em solid #fff; transform: translateY(-.08em); }
.pad-sh { width: auto; aspect-ratio: auto; min-width: clamp(28px, 4.2vh, 40px); height: clamp(20px, 3vh, 28px); padding: 0 .5em; border-radius: .6em; background: #4a566f; font-size: clamp(8px, 1.3vh, 12px); }
.pad-opt { width: auto; aspect-ratio: auto; min-width: clamp(28px, 4.2vh, 40px); height: clamp(20px, 3vh, 28px); padding: 0 .55em; border-radius: .6em; background: #4a566f; font-size: clamp(7px, 1.15vh, 11px); letter-spacing: .04em; }
.pad-rs { background: #4a566f; font-size: clamp(8px, 1.3vh, 12px); }
