/* 🧑‍🏫 The tutorial guide (guide.js, window.BoyGuide): a Marmot kit file, the same bytes in every Boy app. The
   character beside the tour's bubble (.boy-guide: fixed, placed by transform from its measured spot, never taking
   a tap), small in the bubble's top corner when there's no room (.boy-guide-slot), and on the setup cards
   (.boy-guide-setup: beside the card on a computer, in its top corner on a phone). Decorative, so nothing here is
   needed to use the tour or setup. Motion: a short fade and slide when the pose changes, never under
   prefers-reduced-motion or at <html data-fx="off">. */

.boy-guide { position: fixed; top: 0; left: 0; z-index: 1; display: block; max-width: none; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22)); will-change: transform; }
.boy-guide[hidden], .boy-guide-inline[hidden], .boy-guide-setup[hidden] { display: none; }

/* 💬 The speaker (show({ speaker: true })): behind the bubble (put just before it, so the bubble's drawn over his legs),
   and the bubble's tail reaching out to him: a triangle in the bubble's own fill with its line (guide.js measures both). */
.boy-guide.boy-guide-behind { z-index: 0; }
.boy-guide-tail { position: fixed; z-index: 2; top: 0; left: 0; width: 0; height: 0; pointer-events: none; will-change: transform; }
.boy-guide-tail::before, .boy-guide-tail::after { content: ''; position: absolute; width: 22px; height: 13px; left: -11px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.boy-guide-tail::before { top: -13px; background: var(--boy-tail-line, rgba(0, 0, 0, .18)); }
.boy-guide-tail::after { top: -11px; left: -9px; width: 18px; height: 12px; background: var(--boy-tail-fill, #fff); }
.boy-guide-tail[data-edge="left"] { rotate: -90deg; }
.boy-guide-tail[data-edge="right"] { rotate: 90deg; }

/* No room beside the bubble: a small talking guide in its top corner (the words flow round it). */
.boy-guide-slot { float: right; display: block; margin: -.35rem -.35rem .2rem .5rem; pointer-events: none; }
.boy-guide-inline { display: block; height: 64px; width: auto; max-width: 72px; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
@media (max-width: 600px) { .boy-guide-inline { height: 56px; max-width: 60px; } }

/* A setup card: small in its top corner, the heading beside it… */
.boy-guide-card { position: relative; }
.boy-guide-setup { float: right; display: block; height: 104px; width: auto; max-width: 40%; margin: -.6rem -.5rem .4rem .75rem; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
@media (max-width: 600px) { .boy-guide-setup { height: 84px; margin: -.5rem -.4rem .3rem .5rem; } }
/* …or, with room to its left (guide.js: a computer), standing beside it. */
.boy-guide-side > .boy-guide-setup { position: absolute; top: .25rem; right: calc(100% + 16px); float: none; height: 200px; max-width: none; margin: 0; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .16)); }

/* The pose changed: it fades and slides in (from below, as if stepping up; translate, so the placing transform stays). */
.boy-guide-in { animation: boy-guide-in .26s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes boy-guide-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
html[data-fx="off"] .boy-guide-in { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .boy-guide-in { animation: none; }
}
@media print { .boy-guide, .boy-guide-slot, .boy-guide-setup, .boy-guide-tail { display: none !important; } }
