/* Arcalink play.html - the guided first run (spec ch.12, play-tutorial.js): the coach line and the finger above the card pick.
   The line sits under the top HUD rows, left of the build strip (right 64 px); in battle and while a panel sits at the top it is at the bottom.
   Animation: opacity / transform only (Pixel 3). */
#coach { top: calc(env(safe-area-inset-top) + 92px); left: 8px; right: 66px; z-index: 5; display: none; pointer-events: none; }
#coach.on { display: block; animation: coachIn .22s ease-out both; }
body.boss #coach { top: calc(env(safe-area-inset-top) + 132px); }
#coach.low { top: auto; bottom: calc(env(safe-area-inset-bottom) + 112px); right: 8px; }
/* in battle the top of the field is where the enemies come in: the line sits at the bottom, left of the release button (like the hint) */
body.incombat #coach { top: auto; bottom: calc(env(safe-area-inset-bottom) + 10px); right: 104px; }
/* card pick: the cards fill the screen, so the line takes the place of the pick's header (title, gold, marks) in one compact row */
#coach.oncards { z-index: 9; top: calc(env(safe-area-inset-top) + 6px); left: 8px; right: 8px; }
#coach.oncards .cbx { grid-template-columns: 30px 1fr auto; padding: 6px 8px; }
#coach.oncards .ctx { font-size: 12px; line-height: 1.4; }
#coach.oncards .cbt { grid-column: auto; }
#coach .cbx { --fill: rgba(16,20,38,.94); --ring: linear-gradient(180deg, var(--ar-mana-x), var(--ar-brass-lo)); display: grid; grid-template-columns: 34px 1fr; gap: 4px 8px; align-items: center; padding: 8px 10px; pointer-events: auto; }
#coach .cic { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
#coach .cic svg { width: 30px; height: 30px; display: block; }
#coach .cic .gem { width: 32px; height: 32px; }
#coach .cic .m { fill: var(--ar-mana-x); }
#coach .ctx { font-size: 13px; line-height: 1.45; font-weight: 700; color: var(--ar-text); }
#coach .cbt { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
#coach .cbt .btn { min-width: 88px; font-size: 13px; }
#coach .cbt .btn.primary { min-height: 44px; font-size: 14px; }
#coach .cbt .hide { display: none; }
#finger.top { z-index: 9; }
body.insheet #coach.oncards { display: none; }
@keyframes coachIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* round 5: phrase-wise line breaks (play-tutorial.js phrases()): no single character alone on a line */
#coach .ctx .ph { display: inline-block; max-width: 100%; }
#coach .ctx { text-wrap: pretty; }
#coach .cbt .btn { white-space: nowrap; }
/* round 6: the line sits above the card screen (its header and gold row are pushed below it, never covered) */
body.tutcards #cards { padding-top: calc(env(safe-area-inset-top) + 72px); }
@media (max-width: 359px) { body.tutcards #cards { padding-top: calc(env(safe-area-inset-top) + 84px); } }
@media (max-height: 640px) { body.tutcards #cards { gap: 6px; } body.tutcards #cards .cth h2, body.tutcards #cards .cth .rule { display: none; } body.tutcards #cards .cth { justify-content: center; } }   /* short screens: the heading gives way to the line so the three cards keep their full text */
