/* Pippin, the robin who guides you along the Daily path (dist/pippin.js). */
/* The still Pippin on the wall (and on the stone at the sun): the master drawing every move starts and ends on. */
.pippin-perch{position:absolute;left:calc(var(--px) * var(--m));top:calc(var(--py) * var(--m));width:calc(var(--pw) * var(--m));height:auto;pointer-events:none;z-index:2}
.pippin-perch.away{visibility:hidden}
.pippin-stone{position:absolute;left:calc(var(--px) * var(--m));top:calc(var(--py) * var(--m));width:calc(var(--pw) * var(--m));height:auto;pointer-events:none;z-index:2}
.pippin-wall-tap{position:absolute;left:calc(var(--px) * var(--m));top:calc(var(--py) * var(--m));width:var(--sa-tap);height:var(--sa-tap);min-height:0;margin:calc(var(--sa-tap) / -2) 0 0 calc(var(--sa-tap) / -2);padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;z-index:3}
.pippin-wall-tap:focus-visible{outline:3px solid var(--sa-focus);outline-offset:2px}
/* While he flies he's drawn over the window, under the bottom bar and any banner. */
.pippin-sky{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:30}
.pippin-tap{position:absolute;z-index:32;min-height:0;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}
.pippin-tap:focus-visible{outline:3px solid var(--sa-focus);outline-offset:2px}
/* His note pops up right before he lands on it, and fades only once he has left it. */
.pippin-note{position:absolute;z-index:29;opacity:0;transform:translateY(10px) scale(.97);transform-origin:50% 0;pointer-events:none}
/* Taps go through it until it has popped up. */
.pippin-note.in{pointer-events:auto}
.pippin-note.in{animation:pippin-in .42s cubic-bezier(.2,.8,.3,1.2) forwards}
.pippin-note.out{opacity:1;transform:none;animation:pippin-out .3s ease-in forwards;pointer-events:none}
@keyframes pippin-in{0%{opacity:0;transform:translateY(10px) scale(.97)}75%{opacity:1;transform:translateY(-1.5px) scale(1.005)}100%{opacity:1;transform:none}}
@keyframes pippin-out{to{opacity:0;transform:translateY(6px) scale(.98)}}
.pippin-bubble{position:relative;background:var(--sa-surface);border:1px solid #e4dccb;border-radius:16px;padding:14px 40px 12px 14px;box-shadow:0 4px 14px rgba(0,0,0,.13);font:500 16px/1.4 var(--serif,Fraunces,Georgia,serif);color:var(--sa-ink)}
.pippin-who{display:block;margin-bottom:2px;font:700 11px/1.4 var(--font,system-ui,sans-serif);letter-spacing:.08em;text-transform:uppercase;color:var(--sa-clay)}
/* Typewriter: every letter is already in place, so the note never changes size, and fades in in turn. */
.pippin-txt{display:block;cursor:default}
.pippin-txt span{opacity:0;transition:opacity .14s ease-out}
.pippin-txt span.on{opacity:1}
.pippin-x{position:absolute;right:2px;top:2px;width:var(--sa-tap);height:var(--sa-tap);min-height:0;padding:0;border:0;background:transparent;color:#58685e;font-size:20px;line-height:1;cursor:pointer}
.pippin-btns{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:10px;opacity:0;visibility:hidden;transition:opacity .35s}
.pippin-btns.on{opacity:1;visibility:visible}
.pippin-btn{min-height:var(--sa-tap);padding:9px 16px;border:1px solid var(--sa-clay);border-radius:12px;background:var(--sa-clay);color:var(--sa-surface);font:600 15px var(--font,system-ui,sans-serif);cursor:pointer}
.pippin-btn.ghost{background:transparent;border-color:#c9d3c0;color:var(--sa-green)}
/* At the sun his note sits above him, pointing down at the stone. */
.pippin-note.beside .pippin-bubble::after{content:"";position:absolute;bottom:-11px;left:var(--tail,40px);margin-left:-10px;border:11px solid transparent;border-bottom:0;border-top-color:var(--sa-surface);filter:drop-shadow(0 1px 0 #e4dccb)}
@media (prefers-reduced-motion:reduce){
 .pippin-note,.pippin-note.in{animation:none;opacity:1;transform:none}
 .pippin-note.out{display:none}
 .pippin-txt span{opacity:1;transition:none}
 .pippin-btns{opacity:1;visibility:visible;transition:none}
}
/* Help: his switch. */
.pippin-help .pippin-switch{margin-top:4px}
/* His portrait as the game's coach (Michael, Nov 11, 2026; job mdwilkins/jobs#646): at the left end of the game's
   green band, facing the puzzle (his drawing mirrored); the band's own content moves over to make room. Nov 12
   (Michael): larger, with the band at its normal height and his circle spilling over its edges; the difficulty ring
   moved into the game's menu to give him the room (difficulty.js). 72 px on a phone, centred on the band; 124 px on
   a computer, where the band is two rows deep. It pops in (a touch big, then settles). A canvas over his resting face
   plays his moves; a held pose (watching the board) stays on it. */
html body.in-puzzle-journey:not(.puzzle-finished) #main .game-heading.has-pip{--pd:72px;position:relative;padding-left:calc(var(--pd) + 10px)!important}
#main .game-heading>.top-pippin{position:absolute;left:0;top:calc(50% - var(--pd) / 2);z-index:3}
/* Narrow phones: a little smaller, so game names keep their words whole (two lines at most). */
@media (max-width:374px){html body.in-puzzle-journey:not(.puzzle-finished) #main .game-heading.has-pip{--pd:64px;padding-left:calc(var(--pd) + 8px)!important}}
@media (max-width:349px){html body.in-puzzle-journey:not(.puzzle-finished) #main .game-heading.has-pip{--pd:56px;padding-left:calc(var(--pd) + 6px)!important}}
.top-pippin{display:block;flex:none;width:var(--pd,56px);height:var(--pd,56px);min-height:0;margin:0;padding:0;border:0;background:none;color:inherit;cursor:pointer;visibility:hidden;-webkit-tap-highlight-color:transparent}
.top-pippin.is-in{visibility:visible}
.top-pippin .top-pippin-face{display:block;margin:0;width:var(--pd,56px);height:var(--pd,56px);border-width:2px;box-shadow:0 2px 8px rgba(8,26,18,.35);transition:none}
.top-pippin .top-pippin-face>img,.top-pippin .top-pippin-face>canvas{transform:scaleX(-1)}
.top-pippin.is-held .top-pippin-face canvas{visibility:visible}
/* Leaning in for the end: a little closer to the puzzle, and he stays watching. */
.top-pippin.is-in:not(.is-out) .top-pippin-face{transition:transform .45s cubic-bezier(.34,1.56,.64,1) .12s,translate .5s ease,scale .5s ease}
.top-pippin.lean .top-pippin-face{translate:3px 3px;scale:1.07}
/* Hmm: his head on one side as he turns to look at you. */
.top-pippin.hmm .top-pippin-face canvas{transform-origin:50% 85%;animation:pip-hmm 1.6s ease-in-out}
@keyframes pip-hmm{0%,22%{transform:scaleX(-1) rotate(0)}42%,72%{transform:scaleX(-1) rotate(9deg)}92%,100%{transform:scaleX(-1) rotate(0)}}
@media (min-width:760px){
 html body.in-puzzle-journey:not(.puzzle-finished) #main .game-heading.has-pip{--pd:124px;padding-left:calc(var(--pd) + 22px)!important}
 /* On a computer the band starts with the row above it ("Daily Five", Next puzzle): he spans both rows, spilling a
    little over the band's top and bottom edges (the band is about 112 px deep). */
 html body.in-puzzle-journey:not(.puzzle-finished) #main .game-top:has(+ .game-heading.has-pip){padding-left:calc(124px + 22px)}
 #main .game-top+.game-heading>.top-pippin{top:auto;bottom:-6px}
}
/* On narrow phones the stones step closer, so the row with his portrait stays clear of the S and the menu. */
@media (max-width:374px){html body.in-puzzle-journey #top-path .top-stop{flex:0 0 36px;width:36px}}
@media (max-width:349px){html body.in-puzzle-journey #top-path .top-stop{flex-basis:31px;width:31px}html body.in-puzzle-journey #top-path .top-stop>span{width:26px;height:26px;font-size:14px}}
/* Six-puzzle packs (most one-game packs): six stones share the same room, so on phones they step closer as the
   screen narrows and the row keeps clear of the S and the menu down to 320 px. */
@media (max-width:430px){html body.in-puzzle-journey #top-path .top-path-stops:has(>.top-stop:nth-child(6)){--p6:min(40px,calc((100vw - 176px) / 6))}
 html body.in-puzzle-journey #top-path .top-path-stops:has(>.top-stop:nth-child(6))>.top-stop{flex:0 0 var(--p6);width:var(--p6)}
 html body.in-puzzle-journey #top-path .top-path-stops:has(>.top-stop:nth-child(6))>.top-stop>span{width:min(29px,calc(var(--p6) - 4px));height:min(29px,calc(var(--p6) - 4px));font-size:min(17px,calc(var(--p6) / 2))}}
/* On the results, beside the finished game's badge. */
#main .pip-trophy{display:flex;align-items:center;justify-content:center;gap:22px}
#main .pip-trophy>.completion-emblem{margin-left:0;margin-right:0}
/* Results with no badge (All puzzles, a painted pack's finish): he sits beside their first line (Nov 13 review). */
#main .pip-by-line{gap:14px}
#main .pip-by-line>p{margin:0;text-align:left}
#main .pip-by-line>.top-pippin{margin:2px 0 6px}
#main .pip-by-line:has(>.top-pippin:not(.is-in))>p{text-align:center}
#main .pip-trophy>.top-pippin{--pd:64px;position:relative;margin:2px 0 16px}
@media (min-width:760px){#main .pip-trophy>.top-pippin{--pd:84px}}
/* While he's out on the results' button (Nov 13) his circle folds away and the badge slides into the middle. */
#main .pip-trophy{transition:gap .4s ease}
#main .pip-trophy>.top-pippin{transition:width .4s ease}
#main .pip-trophy:has(>.top-pippin:not(.is-in)){gap:0}
#main .pip-trophy>.top-pippin:not(.is-in){width:0;overflow:hidden}
@media (prefers-reduced-motion:reduce){#main .pip-trophy,#main .pip-trophy>.top-pippin{transition:none}}
.top-pippin-face{position:relative;flex:none;width:var(--pd,44px);height:var(--pd,44px);box-sizing:border-box;border:2px solid #e3b04b;border-radius:50%;background:#e7efe0;box-shadow:0 2px 6px rgba(27,51,38,.18);overflow:hidden;transform:scale(0)}
.top-pippin .top-pippin-face{box-shadow:0 2px 8px rgba(8,26,18,.35)}
.top-pippin.is-in .top-pippin-face{transform:scale(1)}
.top-pippin-face img,.top-pippin-face canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
.top-pippin-face canvas{visibility:hidden}
.top-pippin.is-moving .top-pippin-face canvas{visibility:visible}
.top-pippin:focus-visible{outline:none}
.top-pippin:focus-visible .top-pippin-face{outline:3px solid var(--sa-focus,#1f6feb);outline-offset:2px}
.top-pippin.cheer .top-pippin-face{animation:pip-cheer .55s ease}
.top-pippin.cheer-big .top-pippin-face{animation:pip-cheer-big 1s ease}
@keyframes pip-cheer{0%,100%{transform:scale(1)}40%{transform:translateY(-3px) scale(1.14)}70%{transform:translateY(0) scale(.97)}}
@keyframes pip-cheer-big{0%,100%{transform:scale(1) rotate(0)}18%{transform:translateY(-4px) scale(1.28) rotate(-7deg)}40%{transform:scale(1.04) rotate(6deg)}62%{transform:translateY(-2px) scale(1.16) rotate(-4deg)}82%{transform:scale(.98) rotate(2deg)}}
@media (prefers-reduced-motion:reduce){.top-pippin,.top-pippin .top-pippin-face,.top-pippin .top-pippin-face canvas{transition:none!important;animation:none!important}}
/* Tap him: "Need a hand?" (the swap card's look). */
dialog.pip-card .swap-actions .sa-btn{flex-direction:column;gap:2px;line-height:1.2}
dialog.pip-card .swap-actions .sa-btn small{display:block;font-size:14px;font-weight:400;opacity:.85}
/* He talks as the card opens (his own card and the swap card, Nov 13): his talking frames over the still picture, inside its gold border, with the same thin ring. */
dialog .swap-who .pip-talk{position:absolute;top:4px;left:50%;width:76px;height:76px;margin-left:-38px;border-radius:50%;overflow:hidden;opacity:0;pointer-events:none}
dialog .swap-who .pip-talk.is-on{opacity:1}
dialog .swap-who .pip-talk canvas{display:block;width:100%;height:100%}
dialog .swap-who .pip-talk::after{content:'';position:absolute;inset:0;border-radius:50%;box-shadow:inset 0 0 0 1.5px #27493e}
/* His playbook (Michael, Nov 10, 2026). A note set into the page with him standing on it: it pushes things down and
   never covers them. Room above it for him (--pad); his still drawing shows once he has landed. */
.pip-inline{position:relative;box-sizing:border-box;padding-top:var(--pad);margin:4px 12px 10px;z-index:3}
.pip-inline.on-page{margin:-8px 16px 18px}
@media (min-width:700px){.pip-inline.on-page{max-width:620px;margin-inline:auto}}
/* Over a painting's foot in a card's place (pippin.js sets its margins): the card waits under it. */
#main .pip-inline.over-scene+.sa-card-over-scene{margin-top:0}
.pip-inline.waiting .pippin-bubble{visibility:hidden}
.pip-inline:not(.waiting) .pippin-bubble{animation:pippin-in .42s cubic-bezier(.2,.8,.3,1.2) both}
.pip-inline.out .pippin-bubble{animation:pippin-out .3s ease-in forwards}
.pip-inline .pippin-btns[hidden]{display:none}
.pip-bird{position:absolute;left:var(--l);max-width:none;visibility:hidden;pointer-events:none;z-index:1}
.pip-bird.flip{left:var(--lf);transform:scaleX(-1)}
.pip-inline.landed .pip-bird{visibility:visible}
/* What he's talking about glows softly until it's done. */
.pip-glow{position:relative;z-index:2;box-shadow:0 0 0 3px #f2bd4b,0 0 0 8px rgba(242,189,75,.32)!important;animation:pip-glow 1.6s ease-in-out infinite}
@keyframes pip-glow{50%{box-shadow:0 0 0 3px #f2bd4b,0 0 0 12px rgba(242,189,75,.14)!important}}
.search-cell.pip-glow{background:#f8d77c!important;color:#1b3326!important;border-radius:50%}
/* In a game's heading (Hint, the level ring) the game's own shadow is stronger: his glow wins there, cream on the dark band. */
html body .game-heading #use-boost.pip-glow.pip-glow.pip-glow,html body .game-heading .pip-glow.pip-glow{box-shadow:0 0 0 3px #fff3c4,0 0 0 9px rgba(242,189,75,.5)!important}
/* His home in the top bar of Packs, All puzzles and Passport: on a phone opposite the menu, on a computer in the menu
   row just before Play (pippin.js puts him there). */
.bar-pippin{display:none}
body.pip-home .bar-pippin{position:relative;display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;order:99}
body.pip-home:not(.in-puzzle-journey) .masthead .bar-pippin{grid-column:1;grid-row:1}
/* On a computer the bar's gaps narrow a little where room is tight (on every page, so nothing jumps between pages)
   and the menu never shrinks, so its labels and "Saved on this device" stay on one line with him in it. */
body.pip-home .masthead .site-nav>.bar-pippin{order:0;align-self:center}
@media (min-width:760px) and (max-width:819px){body .masthead .site-nav{gap:14px}}
@media (min-width:1091px){body .masthead{gap:16px}body.pip-home .masthead .site-nav{flex-shrink:0}}
@media (min-width:1091px) and (max-width:1119px){body .masthead .site-nav{gap:12px}}
.bar-pippin.is-moving .top-pippin-face canvas{visibility:visible}
.bar-pippin .top-pippin-face{width:44px;height:44px;margin:0;transform:scale(1);transition:transform .45s cubic-bezier(.34,1.56,.64,1)}
.bar-pippin:focus-visible{outline:none}
.bar-pippin:focus-visible .top-pippin-face{outline:3px solid var(--sa-focus,#1f6feb);outline-offset:2px}
/* While he's out on a note, his home shows an empty ring. */
.bar-pippin.is-out .top-pippin-face,.top-pippin.is-out .top-pippin-face{transform:scale(0);transition:none}
.bar-pippin.is-out::after,.top-pippin.is-in.is-out::after{content:"";position:absolute;width:var(--pd,44px);height:var(--pd,44px);box-sizing:border-box;border:2px dashed #e0b44a;border-radius:50%;background:rgba(242,189,75,.1);pointer-events:none}
.bar-pippin.is-out::after{left:0;top:0}
.top-pippin.is-in.is-out::after{left:0;top:0}
@media (prefers-reduced-motion:reduce){
 .pip-inline:not(.waiting) .pippin-bubble,.pip-inline.out .pippin-bubble{animation:none}
 .pip-glow{animation:none}
}
/* On a results page his empty home isn't drawn while he's out on a note: a newcomer read the dashed ring as a missing picture (launch rehearsal, Nov 16). */
.puzzle-finished .top-pippin.is-in.is-out::after{display:none}
/* A glowing stepping stone keeps its place on the path (the glow's own rule would make it relative). */
#stones-path .glue-stone.pip-glow{position:absolute}
