/* =====================================================================================================
   TUTORIAL (js/tutorial.js) — step cards, the objective bar and the pointer arrows, laid over the game window.
   Everything sits inside .game-wrap, above the canvas and the pharmacy pop-up, so it is clipped to the game window.
   The cards are a warm-white version of the pharmacy pop-up's look (Inter text in the pixel-notched frame), with a
   yellow/orange frame so they're never mistaken for the prescription pop-up.
   ===================================================================================================== */
#tutDim,#tutCard,#tutObj,#tutArrow{position:absolute;z-index:9;line-height:normal;
  font-family:'Inter','Segoe UI',system-ui,-apple-system,Roboto,Arial,sans-serif;color:#1b1f3b;letter-spacing:0;}
#tutDim{inset:0;z-index:8;background:rgba(8,6,28,.6);}   /* dims the game behind the closing pop-up */
/* the card: top centre for the steps, dead centre for the closing pop-up (.tut-center) */
#tutCard{left:50%;top:14px;transform:translateX(-50%);width:min(92%,540px);pointer-events:none;}
#tutCard.tut-center{top:50%;transform:translate(-50%,-50%);width:min(92%,580px);}
.tut-win{position:relative;padding:18px 24px 14px;background:#fffdf6;clip-path:var(--arc-clip-outer);animation:tut-in .25s steps(5) both;}
@keyframes tut-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
#tutCard{filter:drop-shadow(0 8px 0 rgba(0,0,0,.35)) drop-shadow(0 0 10px rgba(0,0,0,.3));}
.tut-win::before,.tut-win::after{content:'';position:absolute;inset:0;pointer-events:none;}
.tut-win::before{background:linear-gradient(115deg,#ffd23f,#ff8e3c 50%,#ff3fa4);clip-path:var(--arc-clip-ring-neon);}
.tut-win::after{background:#000;clip-path:var(--arc-clip-ring-black);}
.tut-tag{display:flex;justify-content:space-between;gap:12px;margin:0 0 8px;font:700 11px/1 'Inter',system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#7a6f55;}
#tutTitle{margin:0 0 8px;font:800 22px/1.15 'Inter',system-ui,sans-serif;color:#1b1f3b;}
#tutBody{font:500 16px/1.45 'Inter',system-ui,sans-serif;color:#2a2f4d;}
#tutBody p{margin:0 0 8px;} #tutBody b{font-weight:800;color:#1b1f3b;}
#tutBody .tut-hl{padding:0 5px;background:#ffe9a6;font-weight:800;}
.tut-cont{margin-top:12px;text-align:right;font:800 13px/1 'Inter',system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#1b1f3b;}
.tut-cont kbd{animation:blink 1s steps(1) infinite;}
kbd{display:inline-block;min-width:24px;margin:0 2px;padding:3px 8px 2px;text-align:center;font:800 13px/1.2 'Inter',system-ui,sans-serif;color:#1b1f3b;background:#fff;border:2px solid #1b1f3b;border-bottom-width:4px;border-radius:4px;}
/* the closing pop-up */
.tut-center #tutTitle{font-size:28px;text-align:center;margin-bottom:10px;}
.tut-center .tut-win{padding:24px 28px 16px;}
.tut-lead{font:600 17px/1.4 'Inter',system-ui,sans-serif;text-align:center;margin:0 0 12px!important;}
.tut-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;}
.tut-list li{display:flex;align-items:flex-start;gap:12px;padding:9px 12px;background:#fff;border:2px solid #e6dfc8;}
.tut-list li>.tut-ic{flex:0 0 auto;width:34px;display:flex;justify-content:center;padding-top:2px;}
.tut-clock{display:block;width:26px;height:26px;border:3px solid #1b1f3b;border-radius:50%;position:relative;background:#fff;}
.tut-clock::before{content:'';position:absolute;left:50%;top:3px;width:3px;height:9px;margin-left:-1.5px;background:#1b1f3b;}
.tut-clock::after{content:'';position:absolute;left:50%;top:50%;width:8px;height:3px;margin-top:-1.5px;background:#e0314b;}
/* what to do right now, once a card has been dismissed */
#tutObj{left:50%;top:12px;transform:translateX(-50%);width:max-content;max-width:92%;display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;pointer-events:none;
  background:#fffdf6;border:3px solid #000;box-shadow:0 4px 0 rgba(0,0,0,.35);font:700 15px/1.25 'Inter',system-ui,sans-serif;}
.tut-obj-lab{flex:0 0 auto;padding:5px 8px;background:#ffd23f;border:2px solid #000;font:800 11px/1 'Inter',system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;}
/* the pointer arrow over the pharmacy pop-up's boxes (placed by js/tutorial.js each frame; it bobs toward its target) */
#tutArrow{width:36px;height:36px;pointer-events:none;}
#tutArrow.up{transform:scaleY(-1);}
#tutArrow i{display:block;width:36px;height:36px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M0 3h1v1h-1zM0 4h1v1h-1zM0 5h1v1h-1zM1 3h1v1h-1zM1 5h1v1h-1zM1 6h1v1h-1zM2 0h1v1h-1zM2 1h1v1h-1zM2 2h1v1h-1zM2 3h1v1h-1zM2 6h1v1h-1zM2 7h1v1h-1zM3 0h1v1h-1zM3 7h1v1h-1zM3 8h1v1h-1zM4 0h1v1h-1zM4 8h1v1h-1zM5 0h1v1h-1zM5 7h1v1h-1zM5 8h1v1h-1zM6 0h1v1h-1zM6 1h1v1h-1zM6 2h1v1h-1zM6 3h1v1h-1zM6 6h1v1h-1zM6 7h1v1h-1zM7 3h1v1h-1zM7 5h1v1h-1zM7 6h1v1h-1zM8 3h1v1h-1zM8 4h1v1h-1zM8 5h1v1h-1z'/%3E%3Cpath fill='%23ffd23f' d='M1 4h1v1h-1zM2 4h1v1h-1zM2 5h1v1h-1zM3 1h1v1h-1zM3 2h1v1h-1zM3 3h1v1h-1zM3 4h1v1h-1zM3 5h1v1h-1zM3 6h1v1h-1zM4 1h1v1h-1zM4 2h1v1h-1zM4 3h1v1h-1zM4 4h1v1h-1zM4 5h1v1h-1zM4 6h1v1h-1zM4 7h1v1h-1zM5 1h1v1h-1zM5 2h1v1h-1zM5 3h1v1h-1zM5 4h1v1h-1zM5 5h1v1h-1zM5 6h1v1h-1zM6 4h1v1h-1zM6 5h1v1h-1zM7 4h1v1h-1z'/%3E%3Cpath fill='%23fff3a0' d='M3 1h1v1h-1zM3 2h1v1h-1zM3 3h1v1h-1zM1 4h1v1h-1z'/%3E%3C/svg%3E") center/100% 100% no-repeat;image-rendering:pixelated;animation:tut-bob .5s steps(3) infinite alternate;}
@keyframes tut-bob{to{transform:translateY(8px);}}
/* the correct drug pulses with a golden glow; the box to click next pulses cyan (a drop-shadow, so the glow follows the pixel-rounded shape) */
#pharm .ph-choice.tut-glow{position:relative;z-index:2;color:var(--ph-ink);--bo:#b87800;--face:var(--gloss),linear-gradient(180deg,#fff0a0 calc(100% - 6px),#ffc400 calc(100% - 6px));animation:tut-pulse .9s ease-in-out infinite;}
@keyframes tut-pulse{0%,100%{transform:scale(1);filter:drop-shadow(0 0 4px rgba(255,196,0,.85));}
  50%{transform:scale(1.07);filter:drop-shadow(0 0 15px rgba(255,196,0,1));}}
#pharm .ph-slot.tut-pulse{animation:tut-pulse-blue .9s ease-in-out infinite;}
@keyframes tut-pulse-blue{0%,100%{filter:drop-shadow(0 0 3px rgba(53,232,255,.7));}50%{filter:drop-shadow(0 0 13px rgba(53,232,255,1));}}
/* while a card is up the game is paused, so the pop-up can't be clicked either */
html.tut-card-open #pharm{pointer-events:none!important;}
/* in the tutorial: game messages go to the bottom (the top is for the cards), the Results tally is hidden */
html.in-tutorial .toast{top:auto;bottom:92px;}
html.in-tutorial #rwItem{display:none!important;}
@media (prefers-reduced-motion:reduce){
  .tut-win,#tutArrow i,.tut-cont kbd{animation:none;}
  #pharm .ph-choice.tut-glow{animation:none;filter:drop-shadow(0 0 9px #ffc400);} #pharm .ph-slot.tut-pulse{animation:none;filter:drop-shadow(0 0 9px #35e8ff);}
}
