/* Обучение новичка (js/core/coach.js): затемнение с «окном» вокруг нужной кнопки, крупная подсказка
   с лицом наставника, «Шаг пройден», окна приветствия. Слой над шторкой, улов и окнами (55), под тостами (60).
   Вокруг кнопки — четыре прозрачных щита (.coach-block): касание мимо не проходит. Двигается только
   transform/opacity; тень-затемнение перерисуется лишь при переезде. */

.coach *, .coach-hello, .coach-hello * { box-sizing: border-box; }
.coach { position: absolute; inset: 0; z-index: 55; pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility 0s linear .22s; }
.coach.on { opacity: 1; visibility: visible; transition: opacity .22s ease; }
.coach.fast, .coach.fast.on { transition-duration: .1s; }
.coach.jump .coach-hole, .coach.jump .coach-tip { transition: none !important; }
.coach-block { position: absolute; left: 0; top: 0; width: 0; height: 0; touch-action: none; }
.coach.on .coach-block { pointer-events: auto; }
.coach.on.seal { pointer-events: auto; touch-action: none; }          /* ждём поклёвку — закрыто всё */
.coach.seal .coach-hole::before, .coach.seal .coach-hole::after { display: none; }
body.coaching .tap-hint { display: none; }                             /* «коснитесь воды» — мимо подсветки нельзя */

.coach-hole { position: absolute; left: 0; top: 0; width: 60px; height: 60px; border-radius: 18px;
  box-shadow: 0 0 0 200vmax rgba(2, 9, 11, .68);
  transition: transform .32s cubic-bezier(.2, .9, .25, 1), width .32s cubic-bezier(.2, .9, .25, 1),
              height .32s cubic-bezier(.2, .9, .25, 1), border-radius .32s ease, box-shadow .25s ease; }
.coach.soft .coach-hole { box-shadow: 0 0 0 200vmax rgba(2, 9, 11, .4); }
.coach.nodim .coach-hole { box-shadow: 0 0 0 200vmax rgba(2, 9, 11, 0); }
.coach-hole::before, .coach-hole::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; }
.coach-hole::before { border: 2.5px solid var(--accent);
  box-shadow: 0 0 22px rgba(243, 210, 139, .6), inset 0 0 16px rgba(243, 210, 139, .28); }
.coach-hole::after { border: 2px solid var(--accent); animation: coachPulse 1.5s ease-out infinite; }
.coach:not(.on) .coach-hole::after { animation: none; }
@keyframes coachPulse { 0% { transform: scale(1); opacity: .95; } 100% { transform: scale(var(--sx, 1.2), var(--sy, 1.2)); opacity: 0; } }

.coach-tip { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 40px 13px 12px; border-radius: 22px; color: var(--ink);
  background: linear-gradient(180deg, #1C3134 0%, #112123 100%); border: 1.5px solid rgba(243, 210, 139, .8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 4px rgba(243, 210, 139, .12);
  transition: transform .32s cubic-bezier(.2, .9, .25, 1); }
.coach-tip.at-top { top: calc(var(--safe-top) + 64px); }
.coach-tip.pop .coach-tx, .coach-tip.pop .coach-face { animation: coachPop .45s var(--spring); }
.coach-tip.nudge .coach-tx, .coach-tip.nudge .coach-face { animation: coachNudge .42s ease; }
@keyframes coachNudge { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes coachPop { 0% { transform: scale(.86); opacity: .3; } 100% { transform: none; opacity: 1; } }

.coach-face { flex: none; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: #0B1719;
  border: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(243, 210, 139, .18); }
.coach-face img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.coach-tx { min-width: 0; flex: 1; }
.coach-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: var(--accent); }
.coach-dots { display: inline-flex; gap: 4px; }
.coach-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.coach-dots i.done { background: var(--aqua); }
.coach-dots i.now { background: var(--accent); box-shadow: 0 0 7px var(--accent); }
.coach-t { display: block; margin-top: 3px; font-size: 25px; line-height: 1.02; color: #fff; }
.coach-s { display: block; margin-top: 4px; font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.coach-s:empty { display: none; }
.coach-x { pointer-events: auto; z-index: 1; position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); background: rgba(255, 255, 255, .07); border: 0; padding: 0; }
.coach-x svg { width: 14px; height: 14px; }
.coach-arrow { position: absolute; left: var(--ax, 50%); width: 16px; height: 16px; margin-left: -8px; transform: rotate(45deg);
  border: 1.5px solid rgba(243, 210, 139, .8); }
.coach-tip[data-arrow="down"] .coach-arrow { bottom: -9px; background: #112123; border-left-color: transparent; border-top-color: transparent; }
.coach-tip[data-arrow="up"] .coach-arrow { top: -9px; background: #1C3134; border-right-color: transparent; border-bottom-color: transparent; }
.coach-tip[data-arrow="none"] .coach-arrow { display: none; }

/* «Отлично! Шаг 1 из 5 пройден» */
.coach-praise { position: absolute; left: 50%; top: 32%; z-index: 58; pointer-events: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 10px; border-radius: 999px; color: #fff; font-size: 21px; white-space: nowrap;
  background: linear-gradient(180deg, #24493A, #15301F); border: 1.5px solid rgba(159, 227, 182, .75);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5); animation: coachPraise 1.6s var(--spring) forwards; }
.coach-praise .cp-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #0B1719; }
.coach-praise .cp-ico svg { width: 20px; height: 20px; }
@keyframes coachPraise {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(.8); }
  14% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  24% { transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(.96); }
}

/* Окно наставника: приветствие обучения и «Вам открылось море» */
.coach-hello { position: relative; width: min(370px, calc(100vw - 32px));
  padding: 58px 18px 16px; margin-top: 44px; border-radius: 28px; text-align: center;
  background: rgba(14, 26, 28, .98); border: 1.5px solid rgba(243, 210, 139, .55); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.modal-wrap.open .coach-hello { animation: cardPop .55s var(--spring) forwards; }
.ch-face { position: absolute; left: 50%; top: -44px; width: 92px; height: 92px; margin-left: -46px; border-radius: 50%; overflow: hidden;
  background: #0B1719; border: 3px solid var(--accent); box-shadow: 0 0 0 6px rgba(243, 210, 139, .16), 0 12px 26px rgba(0, 0, 0, .5); }
.ch-face img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.ch-who { font-size: 12.5px; font-weight: 800; color: var(--accent); }
.coach-hello h3 { margin: 4px 0 8px; font-size: 32px; line-height: 1; color: #fff; }
.coach-hello p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.coach-hello .ch-note { margin: 12px 0 14px; color: var(--ink); font-weight: 700; }
.coach-hello .ch-legal { margin: 8px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }   /* принятие документов */
/* шаги — простым списком, не рамками-кнопками: золото только у «Начать обучение» (разбор экранов 06.10) */
.ch-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.ch-steps li { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 14px; font-size: 15px; font-weight: 700; }
.ch-steps li span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
  color: var(--aqua); box-shadow: inset 0 0 0 1.5px var(--aqua); }
@media (max-height: 700px) {                  /* невысокий телефон: окно целиком без прокрутки */
  .coach-hello { padding-top: 52px; }
  .coach-hello h3 { font-size: 28px; }
  .coach-hello p { font-size: 14px; margin-bottom: 8px; }
  .ch-steps { gap: 4px; }
  .ch-steps li { padding: 3px 10px; font-size: 14px; }
}
.ch-steps.done li span { background: var(--green); color: #0B1719; box-shadow: none; }
.ch-steps.done li span svg { width: 16px; height: 16px; }
.coach-hello .ch-note:empty { display: none; }
.ch-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.ch-acts .tp-btn { width: 100%; }

/* Карточка шага на вкладке «Рыбалка» — заметнее: золото, точки шагов, кнопка «Показать», мягкое свечение.
   Пока говорит наставник (подсветка), карточки нет: две подсказки сразу спорили (разбор экранов 06.10) */
body.coaching .guide.coachy { display: none; }
.guide.coachy { padding: 14px 14px 14px 12px; border-width: 1.5px; border-color: rgba(243, 210, 139, .85);
  background: linear-gradient(180deg, rgba(243, 210, 139, .16), rgba(243, 210, 139, .06)); position: relative; }
.guide.coachy::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  border: 2px solid rgba(243, 210, 139, .7); animation: guideGlow 2.4s ease-out infinite; }
@keyframes guideGlow { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.05, 1.18); } }
.guide.coachy .gi { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; padding: 0; border: 2px solid var(--accent); }
.guide.coachy .gi img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.guide.coachy .gt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.guide.coachy .gd { font-size: 17px; line-height: 1.2; margin-top: 2px; }
.guide.coachy .go { width: auto; height: 34px; padding: 0 12px; border-radius: 12px; gap: 4px; font-size: 15px;
  background: var(--accent); color: var(--accent-ink); }

/* Подсказка без щитов (07.10, пять рыб и верша): касания мимо проходят, затемнение лёгкое */
.coach.on.free .coach-block { pointer-events: none; }
.coach.free:not(.nodim) .coach-hole { box-shadow: 0 0 0 200vmax rgba(2, 9, 11, .3); }

/* Подарок Анатолия за пять рыб: удочка и верша двумя карточками */
.cg-items { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.cg-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 8px 10px; border-radius: 18px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(243, 210, 139, .35); opacity: 0;
  animation: cgIn .5s var(--spring) forwards; }
.cg-item:nth-child(2) { animation-delay: .18s; }
.cg-item b { font-size: 15px; line-height: 1.15; color: #fff; }
.cg-item small { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.cg-img { display: grid; place-items: center; width: 100%; height: 78px; border-radius: 14px; overflow: hidden; }
.cg-img > img { width: 100%; height: 100%; object-fit: contain; transform: rotate(-6deg); }
.cg-img .tp-rod { width: 100%; height: 100%; min-height: 78px; border-radius: 14px; }
@keyframes cgIn { from { opacity: 0; transform: translateY(12px) scale(.92); } to { opacity: 1; transform: none; } }
