/* ---------- ההדרכה לשחקן חדש. הלוגיקה ב-js/tutorial.js ---------- */
.tut { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.tut[hidden] { display: none; }

/* החור: הכול מתעמעם חוץ מהאלמנט שצריך ללחוץ עליו */
.tut-hole {
  position: absolute;
  left: 0;
  top: 0;
  box-shadow: 0 0 0 200vmax rgba(4, 5, 9, .76);
  outline: 3px solid #ffd54a;
  outline-offset: 0;
  transition: width .18s ease, height .18s ease, transform .18s ease;
  animation: tut-pulse 1.3s ease-in-out infinite;
}
.tut-hole[hidden] { display: block; width: 0 !important; height: 0 !important; outline: 0; animation: none; }
@keyframes tut-pulse {
  0%, 100% { outline-color: #ffd54a; }
  50% { outline-color: #fff8dc; }
}

.tut-bubble {
  position: absolute;
  left: 0;
  top: 0;
  width: min(36vw, 72vh);
  display: flex;
  flex-direction: column;
  gap: 1vh;
  padding: 1.5vh 1.3vw;
  color: #fff;
  background: linear-gradient(170deg, #24262d, #101116);
  box-shadow: inset 0 0 0 3px #ffd54a, 0 1.2vh 3.4vh rgba(0, 0, 0, .65);
  clip-path: var(--notch);
  pointer-events: auto;
}
.tut-bubble.pop > * { animation: tut-in .28s var(--ease-out) backwards; }
@keyframes tut-in { from { opacity: 0; translate: 0 .8vh; } }
.tut-top { display: flex; align-items: center; justify-content: space-between; gap: 1vw; }
.tut-stage { font-size: clamp(11px, 1.8vh, 18px); font-weight: 800; color: #ffd54a; white-space: nowrap; }
.tut-skip {
  padding: .4vh .5vw;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: clamp(11px, 1.7vh, 17px);
  color: #b8bcc6;
  background: none;
  text-decoration: underline;
  white-space: nowrap;
}
body.input-mouse .tut-skip:hover { color: #fff; }
.tut-text { margin: 0; font-size: clamp(14px, 2.55vh, 26px); font-weight: 700; line-height: 1.35; }
.tut-ok {
  align-self: flex-start;
  padding: .9vh 2vw;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: clamp(13px, 2.3vh, 23px);
  font-weight: 800;
  color: #17130a;
  background: linear-gradient(180deg, #ffe07a, #f2b134);
  box-shadow: inset 0 0 0 2px #a8741a;
}
.tut-ok[hidden] { display: none; }
body.input-mouse .tut-ok:hover { filter: brightness(1.08); }

/* ---------- חלונות: ברוך הבא, הסבר, סיום ---------- */
.modal.tut-modal { position: fixed; z-index: 170; }
.tut-box {
  position: relative;
  width: min(52vw, 100vh);
  max-height: 94vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.7vh;
  padding: 3vh 2.4vw;
  color: #fff;
  text-align: center;
  background: linear-gradient(170deg, #24262d, #0e0f13 70%);
  box-shadow: inset 0 0 0 4px #ffd54a;
  clip-path: var(--notch);
}
.tut-box.wide { width: min(70vw, 132vh); }
.modal.open .tut-box { animation: gal-drop .4s var(--ease-out) backwards; }
.tut-box-title { --u: max(1.8px, .37vh); max-width: 100%; }
.tut-box-text { margin: 0; max-width: 92%; font-size: clamp(14px, 2.6vh, 26px); font-weight: 600; line-height: 1.4; color: #e4e6ea; }
.tut-box-btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1vw; margin-top: .4vh; }
.tut-go { padding: 1.3vh 2.6vw; }
.tut-alt { padding: 1.1vh 1.6vw; }

.tut-welcome { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.3vh; }
.tut-field { display: flex; align-items: center; justify-content: center; gap: 1vw; }
.tut-field .px, .tut-label { --u: max(1.5px, .3vh); }
.tut-input {
  width: min(24vw, 46vh);
  padding: 1vh 1vw;
  border: 0;
  outline: none;
  font: 800 clamp(15px, 2.8vh, 28px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  color: #fff;
  caret-color: #ffd54a;
  background: #08090c;
  box-shadow: inset 0 0 0 3px #4a4e58;
  -webkit-user-select: text;
  user-select: text;
}
.tut-input::placeholder { color: rgba(255, 255, 255, .35); }
.tut-input:focus, .tut-input.nav-focus { box-shadow: inset 0 0 0 3px #ffd54a; animation: none; outline: none; }
.tut-crests { width: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .9vh .6vw; }
.tut-crest {
  display: grid;
  place-items: center;
  padding: .8vh .3vw;
  border: 0;
  cursor: pointer;
  background: #08090c;
  box-shadow: inset 0 0 0 2px #3b3e47;
  transition: transform .16s var(--ease-out), box-shadow .16s;
}
.tut-crest img { width: 8.6vh; height: 8.6vh; object-fit: contain; image-rendering: auto; }
.tut-crest.on { background: rgba(255, 213, 74, .16); box-shadow: inset 0 0 0 3px #ffd54a; }
body.input-mouse .tut-crest:hover, .tut-crest.nav-focus { transform: translateY(-.3vh); box-shadow: inset 0 0 0 3px #fff3c4; outline: none; animation: none; }

.tut-end { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.5vh; }
.tut-reward { display: flex; align-items: center; justify-content: center; gap: 1.4vw; padding: 1vh 1.6vw; background: rgba(255, 213, 74, .1); box-shadow: inset 0 0 0 2px #e0b52e; }
.tut-rw-pack { height: 15vh; width: auto; }
.tut-rw-tx { display: flex; flex-direction: column; align-items: center; gap: .8vh; }
.tut-rw-tx .px { --u: max(1.6px, .32vh); }
.tut-rw-coins { display: flex; align-items: center; gap: .5vw; direction: ltr; }
.tut-rw-coins img { height: 3.6vh; }
.tut-rw-coins .num { font-size: clamp(16px, 3.1vh, 31px); color: #ffd54a; }
.tut-map { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7vw; }
.tut-map-item { display: flex; flex-direction: column; align-items: center; gap: .7vh; padding: 1.1vh .5vw; background: #08090c; box-shadow: inset 0 0 0 2px #3b3e47; }
.tut-map-item .px { --u: max(1.4px, .28vh); }
.tut-map-item span:last-child { font-size: clamp(11px, 1.85vh, 19px); line-height: 1.25; color: #cfd2d9; }

/* ---------- טלפון ---------- */
html.phone .tut-bubble { width: min(44vw, 90vh); }
html.phone .tut-skip { min-height: 40px; padding-inline: 10px; }
html.phone .tut-ok { min-height: 52px; }
html.phone .tut-box { width: min(66vw, 120vh); padding-block: 2.2vh; gap: 1.2vh; }
html.phone .tut-box.wide { width: min(86vw, 164vh); }
html.phone .tut-crest img { width: 7vh; height: 7vh; }
html.phone .tut-rw-pack { height: 11vh; }
@media (prefers-reduced-motion: reduce) {
  .tut-hole, .tut-bubble.pop > * { animation: none; }
}
