/* ---------- the tutorial (tutorial.js): Nova's speech bubble, the spotlight, the pointing hand ---------- */
.tu { position: fixed; inset: 0; z-index: 150; pointer-events: none; animation: tuFade .25s ease-out both; }
.tu.out { animation: tuOut .2s ease-in forwards; }
.tu.away, body:has(.modal-wrap:not(.leaving)) .tu { display: none; } /* a game window is open: step aside */
.tu-blk { position: fixed; display: block; background: rgb(8 12 24 / .64); pointer-events: auto; } /* no slide: a tap must never land on a dimmer that is still moving */
.tu-cover { position: fixed; display: block; pointer-events: auto; cursor: pointer; border-radius: 14px; }
.tu-ring { position: fixed; display: block; border-radius: 14px; pointer-events: none; border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgb(255 255 255 / .18), 0 0 26px 4px var(--accent);
  transition: all .3s cubic-bezier(.3, .9, .3, 1); animation: tuRing 1.4s ease-in-out infinite; }
.tu-hand { position: fixed; display: block; font-size: 34px; font-style: normal; line-height: 1; pointer-events: none; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .45)); transition: left .3s, top .3s; }
.tu-hand.up { animation: tuBobUp .9s ease-in-out infinite; }
.tu-hand.down { animation: tuBobDown .9s ease-in-out infinite; }
.tu [hidden] { display: none !important; }

.tu-panel { position: fixed; left: 50%; transform: translateX(-50%); width: min(94vw, 440px); display: flex; align-items: flex-end; gap: 8px; pointer-events: auto; transition: top .3s, bottom .3s; }
.tu-panel.mid { top: 50%; transform: translate(-50%, -50%); }
.tu-av { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #ffe2b8, #ffc2d1); box-shadow: 0 0 0 3px var(--surface), 0 8px 20px rgb(0 0 0 / .35); }
.tu-av > span, .tu-av svg { display: block; width: 100%; height: 100%; }
.tu-av.talk { animation: tuTalk .32s ease-in-out infinite alternate; }
.tu-emoji { font-size: 48px; display: grid !important; place-items: center; }
.tu-bub { position: relative; flex: 1; min-width: 0; background: var(--surface); color: var(--ink); border-radius: 20px 20px 20px 6px; padding: 12px 14px 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.tu-bub::before { content: ''; position: absolute; left: -9px; bottom: 14px; width: 16px; height: 16px; background: var(--surface); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.tu-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tu-top b { font: 700 15px var(--f-display); color: var(--accent); }
.tu-top small { color: var(--muted); font-weight: 700; font-size: 12px; }
.tu-x { margin-left: auto; border: 0; background: var(--sunk); color: var(--muted); width: 28px; height: 28px; border-radius: 50%; font-size: 13px; cursor: pointer; }
.tu-say { font-size: 15px; line-height: 1.45; white-space: pre-line; min-height: 44px; cursor: pointer; }
.tu-list:empty, .tu-hint:empty { display: none; }
.tu-list { display: grid; gap: 6px; margin-top: 8px; }
.tu-li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.35; background: var(--sunk); border-radius: 12px; padding: 7px 9px; animation: tuIn .3s ease-out both; }
.tu-li:nth-child(2) { animation-delay: .08s; } .tu-li:nth-child(3) { animation-delay: .16s; } .tu-li:nth-child(4) { animation-delay: .24s; }
.tu-li i { font-style: normal; font-size: 18px; line-height: 1.1; }
.tu-hint { margin: 8px 0 0; font-weight: 800; font-size: 13px; color: var(--accent); }
.tu-dots { display: flex; gap: 4px; justify-content: center; margin: 10px 0 8px; }
.tu-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .25s, background .25s; }
.tu-dots i.past { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tu-dots i.on { width: 18px; background: var(--accent); }
.tu-btns { display: flex; align-items: center; gap: 6px; }
.tu-btns span { flex: 1; }
.tu-btns .btn { white-space: nowrap; }
@media (max-width: 400px) { .tu-av { flex-basis: 58px; width: 58px; height: 58px; } .tu-say { font-size: 14px; } .tu-btns [data-tu="skip"] { padding-inline: 8px; } }

@keyframes tuIn { from { opacity: 0; transform: translateY(6px); } }
.tu-panel.mid { animation: none; }
@keyframes tuOut { to { opacity: 0; } }
@keyframes tuFade { from { opacity: 0; } }
@keyframes tuRing { 50% { box-shadow: 0 0 0 7px rgb(255 255 255 / .1), 0 0 36px 8px var(--accent); } }
@keyframes tuBobUp { 50% { transform: translateY(-8px); } }
@keyframes tuBobDown { 50% { transform: translateY(8px); } }
@keyframes tuTalk { to { transform: translateY(-3px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .tu-ring, .tu-hand, .tu-av.talk { animation: none !important; } }
