/* ---------- the tutorial's spotlight (js/coach.js; build 186, Gage 11-24: "walk people through the controls better and more obviously") ----------
   The rest of the screen dims around a cut-out, a red ring pulses round the real control, an inked arrow points at it from the
   card. Only the card takes taps: the shade, the ring and the arrow let every tap through to the game. Red, black and white with
   the journal cards' gradient, double ring and hairline (docs/ui/theme.md); motion is off in calm and under reduced motion. */
.coach { position: fixed; inset: 0; z-index: 11000; pointer-events: none; }
.coach[hidden], .coach [hidden], .coach-arrow[hidden] { display: none !important; }
.coach-spot, .coach-ring { position: fixed; left: 0; top: 0; pointer-events: none; border-radius: 12px; }
.coach-spot { --dim: .52; box-shadow: 0 0 0 200vmax rgb(8 7 6 / var(--dim)); transition: transform .12s linear, width .12s linear, height .12s linear; }
.coach-ring { border: 3px solid #e0242d; box-shadow: 0 0 0 2px #0b0b0b, inset 0 0 0 2px #f2eee6, 0 0 18px #e0242daa; transition: transform .12s linear, width .12s linear, height .12s linear; animation: coach-pulse 1.1s ease-in-out infinite; }
.coach-spot.round, .coach-ring.round { border-radius: 50%; }
@keyframes coach-pulse { 50% { box-shadow: 0 0 0 2px #0b0b0b, inset 0 0 0 2px #f2eee6, 0 0 0 9px #e0242d44, 0 0 26px #e0242d; } }
.coach-arrow { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: visible; pointer-events: none; }
.coach-arrow path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.coach-arrow-under { stroke: #0b0b0b; stroke-width: 8; }
.coach-arrow-line { stroke: #f2eee6; stroke-width: 3.5; }
.coach-arrow-head { stroke: #e0242d; stroke-width: 4.5; }

.coach-card { position: fixed; left: 8px; top: 80px; width: min(340px, calc(100vw - 16px)); box-sizing: border-box; pointer-events: auto; isolation: isolate;
  padding: 8px 11px 9px; color: #f2eee6; border: 2px solid #c8202a; border-radius: 3px;
  background: linear-gradient(115deg, #3a2a2455, transparent 50%), #1b1a18f7; box-shadow: 0 4px 0 #0b0b0b, 0 0 0 2px #151410, 0 10px 26px #000a; }
.coach-card::before { content: ''; position: absolute; z-index: -1; inset: 4px; border: 1px solid #d9bd8b14; pointer-events: none; }
.coach-card.coach-in { animation: coach-in .18s ease-out; }
@keyframes coach-in { from { opacity: 0; transform: translateY(6px); } }
.coach-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.coach-step { font: 700 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: #f27661; white-space: nowrap; }
.coach-card h2 { margin: 2px 0 3px; font: 400 21px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; color: #fff; overflow-wrap: anywhere; }
.coach-card p { margin: 0; font-size: 15px; line-height: 1.32; color: #eadfcc; overflow-wrap: anywhere; }
.coach-acts { display: flex; gap: 8px; margin-top: 8px; }
.coach-acts button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 10px; font: 400 17px var(--display); letter-spacing: .04em; text-transform: uppercase; border-radius: 2px; cursor: pointer; }
.coach-skip { background: #262421; color: #e6dccb; border: 1px solid #5a534a; }
.coach-next { background: #c8202a; color: #fff; border: 1px solid #f2eee6; box-shadow: 0 3px 0 #5d0b10; }
.coach-end { min-height: 30px; padding: 0 9px; background: transparent; color: #cbbfae; border: 1px solid #4a443d; font: 400 13px var(--body); border-radius: 2px; cursor: pointer; white-space: nowrap; }
.coach-acts button:focus-visible, .coach-end:focus-visible { outline: 2px solid #f2eee6; outline-offset: 2px; }
@media (hover: hover) { .coach-skip:hover, .coach-end:hover { border-color: #e0242d; color: #fff; } .coach-next:hover { filter: brightness(1.1); } }
@media (max-width: 360px) { .coach-card h2 { font-size: 19px; } .coach-card p { font-size: 14px; } .coach-acts button { font-size: 15px; } }
@media (max-height: 520px) { .coach-card { width: min(320px, calc(100vw - 16px)); padding: 6px 9px 7px; } .coach-card h2 { font-size: 18px; } .coach-card p { font-size: 13px; } .coach-acts { margin-top: 5px; } .coach-acts button { min-height: 34px; } }
.coach.calm .coach-ring, .coach.calm .coach-card.coach-in { animation: none; }
.coach.calm .coach-spot, .coach.calm .coach-ring { transition: none; }
/* How to play's "Replay the guided battle" and "Replay the Normal guide" (js/ui.js UI.howTo, Home only) */
.how-replay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px; border: 1px dashed #8c6b3e; background: #14120fcc; }
.how-replay b { flex: 1 0 100%; font: 400 15px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #f27661; }
.how-replay .btn { flex: 1 1 140px; margin: 0; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .coach-ring, .coach-card.coach-in { animation: none; } .coach-spot, .coach-ring { transition: none; } }
