/* Desktop 召唤师典籍. Every selector starts at .pg-guide (after body.desktop-game / #guide-dialog).
   The dialog covers only the content area (JS sets --pg-guide-top/left from the real top bar and pillar); the stone tablet
   (kit panel) floats in it. Inside the tablet --pg-u is the tablet's own unit, so kit parts scale with the tablet. */
body.desktop-game #guide-dialog.pg-guide{position:fixed;inset:var(--pg-guide-top,68px) 0 0 var(--pg-guide-left,calc((100vh - 68px)*694/2536));width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:clip;color:var(--uk-text);font:400 14px/1.5 var(--uk-sans)}
body.desktop-game #guide-dialog.pg-guide::backdrop{background:transparent;backdrop-filter:none}
body.desktop-game #guide-dialog.pg-guide>[data-ui-skin]{position:absolute;inset:0;overflow:clip}
body.desktop-game #guide-dialog.pg-guide .pg-guide-stage{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 46%,#0a1420d4,#03070cf7 72%);animation:pg-guide-dim .28s ease-out both}

/* Tablet = kit stone panel, centred under the room reserved for the dragon crest. */
body.desktop-game #guide-dialog.pg-guide .pg-guide-tablet{--pg-u:var(--pg-guide-u,6.4px);--uk-pb:var(--pg-guide-bw,30px);position:absolute;left:var(--pg-guide-tx,50%);top:var(--pg-guide-ty,9%);box-sizing:border-box;width:var(--pg-guide-tw,1100px);height:var(--pg-guide-th,600px);border:var(--uk-pb) solid transparent;filter:drop-shadow(0 18px 36px #000c);animation:pg-guide-rise .42s cubic-bezier(.2,.75,.2,1) both}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tablet::before{content:"";position:absolute;inset:calc(var(--uk-pb)*-1);z-index:0;pointer-events:none;border:var(--uk-pb) solid transparent;border-image:url("./assets/pages/_kit/panel.webp") 200 fill / var(--uk-pb) stretch;filter:brightness(.78) saturate(.92)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tablet>*{z-index:1}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tablet::after{content:"";position:absolute;inset:-6%;pointer-events:none;z-index:6;background:radial-gradient(circle at 50% 50%,#ffe2a066,#ffd27a22 30%,transparent 62%);opacity:0;animation:pg-guide-runes 1s ease-out .12s both}
body.desktop-game #guide-dialog.pg-guide .pg-guide-crest{position:absolute;left:50%;top:calc(var(--uk-pb)*-.5 - var(--pg-u)*9.6);z-index:2;width:calc(var(--pg-u)*31);aspect-ratio:978/592;transform:translateX(-50%);background:url("./assets/pages/guide/crest.webp") center/contain no-repeat;filter:drop-shadow(0 6px 8px #000b);pointer-events:none}
body.desktop-game #guide-dialog.pg-guide .pg-guide-title{position:absolute;left:50%;top:calc(var(--uk-pb)*-.5 - var(--pg-u)*3.3);z-index:3;height:calc(var(--pg-u)*6.6);min-width:0;padding:0 calc(var(--pg-u)*5.6);border-width:calc(var(--pg-u)*6.6*120/635) calc(var(--pg-u)*6.6*620/635);border-image-width:calc(var(--pg-u)*6.6*120/635) calc(var(--pg-u)*6.6*620/635);transform:translateX(-50%)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-title .uk-plaque-text{font-size:max(18px,calc(var(--pg-u)*3.5))}
body.desktop-game #guide-dialog.pg-guide .pg-guide-close{position:absolute;top:calc(var(--pg-u)*.6);right:calc(var(--pg-u)*.6);z-index:4}
body.desktop-game #guide-dialog.pg-guide .pg-guide-inner{position:absolute;inset:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;row-gap:calc(var(--pg-u)*1.5);padding:calc(var(--pg-u)*6.2) calc(var(--pg-u)*2) calc(var(--pg-u)*.8)}

/* Nine gem chapter medallions (data-chapter), the active one lifted and glowing. */
body.desktop-game #guide-dialog.pg-guide .pg-guide-tabs{justify-self:center;display:flex;align-items:flex-start;gap:calc(var(--pg-u)*.9);width:max-content;max-width:100%;position:relative;z-index:3}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab{display:flex;flex-direction:column;align-items:center;gap:0;margin:0;padding:0;border:0;background:none;cursor:pointer;color:inherit;filter:brightness(.78) saturate(.85);transition:filter .18s,transform .18s}
body.desktop-game #guide-dialog.pg-guide .pg-guide-badge{display:block;width:calc(var(--pg-u)*9.2);aspect-ratio:1;background:var(--badge) center/contain no-repeat;filter:drop-shadow(0 4px 5px #000b);transition:transform .2s,filter .2s}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab-label{margin-top:calc(var(--pg-u)*-.7);position:relative;font-size:max(13px,calc(var(--pg-u)*1.9))}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab:hover{filter:brightness(.98)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab.is-active{filter:none}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab.is-active .pg-guide-badge{transform:scale(1.1);filter:drop-shadow(0 0 10px #ffd27acc) drop-shadow(0 4px 5px #000b)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab.is-active .pg-guide-tab-label{color:#fff1c9}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab:focus-visible{outline:none}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tab:focus-visible .pg-guide-badge{outline:2px solid var(--uk-gold-hi);outline-offset:2px;border-radius:50%}

/* Body: niches (default), detailed codex, or key caps. */
body.desktop-game #guide-dialog.pg-guide .pg-guide-body{position:relative;min-height:0}
body.desktop-game #guide-dialog.pg-guide .pg-guide-panel{display:grid;grid-template-rows:minmax(0,1fr);height:100%;min-height:0}
body.desktop-game #guide-dialog.pg-guide .pg-guide-panel.has-pages{grid-template-rows:auto minmax(0,1fr);row-gap:calc(var(--pg-u)*1)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pages{justify-self:center}
body.desktop-game #guide-dialog.pg-guide .pg-guide-niches{--gap:calc(var(--pg-u)*2.6);display:flex;justify-content:center;align-items:stretch;gap:var(--gap);height:100%;min-height:0}
body.desktop-game #guide-dialog.pg-guide .pg-guide-niche{position:relative;box-sizing:border-box;flex:0 1 auto;height:100%;aspect-ratio:.6;max-width:calc((100% - var(--gap) * (var(--count) - 1)) / var(--count));min-width:0;margin:0;padding:0;container-type:size;animation:pg-guide-flip .42s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0)*50ms)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-niche-in{position:absolute;inset:0;z-index:1;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24cqh 17cqw 8cqh}
body.desktop-game #guide-dialog.pg-guide .pg-guide-niche-art{position:absolute;inset:0;z-index:0;box-sizing:border-box;border-style:solid;border-color:transparent;border-width:calc(100cqw*430/803) calc(100cqw*100/803) calc(100cqw*100/803);border-image:url("./assets/pages/guide/niche.webp") 430 100 100 fill / calc(100cqw*430/803) calc(100cqw*100/803) calc(100cqw*100/803) stretch;filter:drop-shadow(0 6px 10px #0009)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-niche-title{margin:3.2cqh 0 1.6cqh;font:700 min(calc(var(--pg-u)*4.2),15cqw)/1.1 var(--uk-serif);letter-spacing:.12em;text-indent:.12em;white-space:nowrap;background:linear-gradient(180deg,var(--uk-title-a),var(--uk-title-b));-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 1px 0 #1b0f04) drop-shadow(0 2px 2px #000c)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-niche-line{margin:0;max-width:100%;min-height:3em;font:400 clamp(13px,calc(var(--pg-u)*2),22px)/1.5 var(--uk-sans);color:#ece4d1;text-shadow:0 1px 2px #000;overflow-wrap:anywhere;text-wrap:balance}

/* Pictures: the game's own orbs / hazard rings / kit icons / real boss and hero art. Never above source pixels. */
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic{--pic:min(calc(var(--pg-u)*19),calc(256px / var(--pg-guide-dpr,1)),62cqw,34cqh);position:relative;display:grid;place-items:center;flex:none;width:var(--pic);height:var(--pic)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic img{display:block;max-width:none;pointer-events:none}
body.desktop-game #guide-dialog.pg-guide .pg-guide-orb{width:56%;height:56%;object-fit:contain;filter:drop-shadow(0 4px 5px #000a)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-orb.is-glow{width:66%;height:66%;animation:pg-guide-glow 2.6s ease-in-out infinite}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic .uk-icon{--uk-is:calc(var(--pic)*.56)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--icons{display:flex;justify-content:center;gap:calc(var(--pic)*.06)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--icons .uk-icon{--uk-is:calc(var(--pic)*.42)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-tag{position:absolute;right:0;bottom:4%;padding:.1em .45em;border-radius:999px;background:linear-gradient(180deg,#3b2a12,#1b130a);box-shadow:0 0 0 1px #d4b47799,0 2px 4px #000a;font:700 max(13px,calc(var(--pic)*.15))/1.2 var(--uk-serif);color:var(--uk-gold-hi);white-space:nowrap}
body.desktop-game #guide-dialog.pg-guide .pg-guide-seal{position:absolute;right:2%;top:2%;display:grid;place-items:center;width:calc(var(--pic)*.3);height:calc(var(--pic)*.3);border-radius:50%;background:url("./assets/pages/_kit/icon-wax.webp") center/contain no-repeat;font:700 calc(var(--pic)*.15)/1 var(--uk-serif);color:#ffe9c2;text-shadow:0 1px 2px #3a0703}
/* drag: one orb pulled along a gold trail */
body.desktop-game #guide-dialog.pg-guide .pg-guide-trail{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
body.desktop-game #guide-dialog.pg-guide .pg-guide-trail path{fill:none;stroke:#f1d896;stroke-width:3;stroke-linecap:round;stroke-dasharray:4 6;filter:drop-shadow(0 0 3px #ffd27a)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-orb.is-drag{position:absolute;left:0;top:0;width:36%;height:36%;transform:translate(calc(var(--pic)*.14 - 50%),calc(var(--pic)*.74 - 50%));animation:pg-guide-drag 3.2s ease-in-out infinite}
/* rows / grids / pairs / triangle */
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--row{display:flex;align-items:center;justify-content:center;gap:2%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--row .pg-guide-orb{width:31%;height:31%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--row.is-small .pg-guide-orb{width:19%;height:19%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--row.is-pop .pg-guide-orb{animation:pg-guide-pop 2.8s ease-in-out infinite}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--row.is-pop .n1{animation-delay:.08s}body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--row.is-pop .n2{animation-delay:.16s}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .pg-guide-orb{position:absolute;width:38%;height:38%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .n0{left:4%;top:44%}body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .n1{left:31%;top:24%}body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .n2{left:58%;top:4%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .pg-guide-orb{animation:pg-guide-pulse 2.4s ease-in-out infinite}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .n1{animation-delay:.3s}body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--combo .n2{animation-delay:.6s}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--tri .pg-guide-orb{position:absolute;width:34%;height:34%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--tri .a{left:33%;top:2%}body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--tri .b{left:64%;top:58%}body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--tri .c{left:2%;top:58%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-arrows{position:absolute;inset:0;width:100%;height:100%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-arrows path{fill:none;stroke:#f1d896;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #000)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--pair{display:flex;align-items:center;justify-content:center;gap:1%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--pair .pg-guide-orb{width:40%;height:40%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-link{font:700 calc(var(--pic)*.2)/1 var(--uk-serif);color:var(--uk-gold-hi);text-shadow:0 1px 3px #000}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--grid{display:grid;grid-template-columns:repeat(3,26%);justify-content:center;align-content:center;gap:4%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--grid .pg-guide-orb{width:100%;height:auto;aspect-ratio:1}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--defense .uk-icon{--uk-is:calc(var(--pic)*.62)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--rates{display:grid;align-content:center;gap:6%;width:min(calc(var(--pic)*1.3),66cqw)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-rate{display:flex;align-items:center;justify-content:space-between;gap:4%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-rate>i{display:flex;gap:2%;width:62%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-rate .pg-guide-orb{width:calc(var(--pic)*.135);height:calc(var(--pic)*.135);flex:none}
body.desktop-game #guide-dialog.pg-guide .pg-guide-rate>b{font:700 max(13px,calc(var(--pic)*.14))/1 var(--uk-serif);color:var(--uk-gold-hi);font-variant-numeric:tabular-nums}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--target{border-radius:50%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-minion{width:86%;height:86%;object-fit:cover;object-position:50% 24%;border-radius:50%;box-shadow:0 0 0 3px #d4b477,0 0 0 6px #3a2a12,0 0 16px #e2552f88}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--count{background:url("./assets/pages/_kit/icon-medal.webp") center/86% no-repeat}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--count b{font:700 calc(var(--pic)*.32)/1 var(--uk-serif);color:var(--uk-gold-hi);text-shadow:0 2px 3px #000;font-variant-numeric:tabular-nums}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--stars b{font:700 calc(var(--pic)*.26)/1 var(--uk-serif);letter-spacing:-.04em;color:#f6d27a;text-shadow:0 0 10px #ffd27a99,0 2px 2px #000}
/* hazards: the battle's own overlay rings on an orb */
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--hazard>*{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--hazard .pg-guide-orb{width:54%;height:54%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-overlay{width:84%;height:84%;object-fit:contain}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--hazard.is-electric .pg-guide-overlay{animation:pg-guide-zap 1.6s steps(1) infinite}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--hazard.is-burn .pg-guide-overlay{animation:pg-guide-flame 1.4s ease-in-out infinite}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--hazard.is-frozen .pg-guide-overlay{animation:pg-guide-frost 3.4s ease-in-out infinite}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--mark .pg-guide-orb{width:60%;height:60%;filter:drop-shadow(0 0 10px #6fd36f) drop-shadow(0 4px 5px #000a)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-check{position:absolute;right:6%;bottom:6%;display:grid;place-items:center;width:30%;height:30%;border-radius:50%;background:radial-gradient(circle at 35% 30%,#9cf09c,#2f8f3f 70%);box-shadow:0 0 0 2px #d4b477,0 2px 4px #000a;font:700 calc(var(--pic)*.17)/1 var(--uk-serif);color:#fff}
/* boss: real boss portrait inside the crowned ring (ring hole: 66.9% of the width, centre 50.9% / 57.8%) */
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--boss{--fw:calc(var(--pic)*.86)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-boss{position:absolute;left:calc(50% - var(--fw)*.5 + var(--fw)*.509);top:calc(50% - var(--fw)*.575 + var(--fw)*.664);width:calc(var(--fw)*.7);height:calc(var(--fw)*.7);transform:translate(-50%,-50%);border-radius:50%;object-fit:cover;object-position:50% 30%}
body.desktop-game #guide-dialog.pg-guide .pg-guide-boss-frame{position:absolute;left:50%;top:50%;width:var(--fw);aspect-ratio:635/730;transform:translate(-50%,-50%);background:url("./assets/pages/region/boss-frame.webp") center/contain no-repeat;filter:drop-shadow(0 4px 6px #000b)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--hero .uk-card{--uk-cw:min(calc(var(--pic)*.72),calc(var(--pg-u)*12))}
body.desktop-game #guide-dialog.pg-guide .pg-guide-pic--form{border-radius:46% 46% 8% 8%/30% 30% 6% 6%;overflow:hidden;box-shadow:0 0 0 2px #d4b47799,0 0 18px #e2552f55}
body.desktop-game #guide-dialog.pg-guide .pg-guide-formart{width:100%;height:100%;object-fit:cover;object-position:50% 18%}

/* Detailed codex: the full original text on a carved stone leaf, two columns per page, ‹ › instead of a scrollbar. */
body.desktop-game #guide-dialog.pg-guide .pg-guide-codex{--uk-pb:clamp(22px,calc(var(--pg-u)*3.4),40px);position:relative;box-sizing:border-box;height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto;row-gap:calc(var(--pg-u)*.6);border-style:solid;border-color:transparent;border-width:var(--uk-pb);border-image:url("./assets/pages/_kit/panel.webp") 200 fill / var(--uk-pb) stretch;padding:0 calc(var(--pg-u)*1.2);animation:pg-guide-unfold .38s cubic-bezier(.2,.7,.2,1) both;filter:brightness(.86)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-codex-view{position:relative;overflow:hidden;min-height:0}
body.desktop-game #guide-dialog.pg-guide .pg-guide-codex-flow{box-sizing:border-box;height:100%;columns:2;column-gap:calc(var(--pg-u)*5);column-fill:auto;transform:translateX(calc(var(--page,0) * var(--step,0px) * -1));transition:transform .42s cubic-bezier(.3,.7,.2,1)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-entry{margin:0 0 calc(var(--pg-u)*1.4)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-entry h3{display:flex;align-items:center;gap:calc(var(--pg-u)*.8);margin:0 0 calc(var(--pg-u)*.5);break-after:avoid;font:700 max(15px,calc(var(--pg-u)*2.3))/1.3 var(--uk-serif);letter-spacing:.06em;color:#f1d896;text-shadow:0 1px 2px #000}
body.desktop-game #guide-dialog.pg-guide .pg-guide-entry h3 b{display:inline-grid;place-items:center;min-width:1.7em;height:1.7em;border-radius:50%;background:url("./assets/pages/_kit/icon-medal.webp") center/contain no-repeat;font-size:.62em;color:var(--uk-gold-hi)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-entry p{margin:0;font:400 clamp(13px,calc(var(--pg-u)*1.75),21px)/1.75 var(--uk-sans);color:#ebe3cf;text-shadow:0 1px 1px #000a;orphans:2;widows:2}
body.desktop-game #guide-dialog.pg-guide .pg-guide-codex-foot{display:flex;justify-content:center}

/* Keyboard sheet: carved key caps. */
body.desktop-game #guide-dialog.pg-guide .pg-guide-keys{display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:calc(var(--pg-u)*2);height:100%;animation:pg-guide-unfold .32s ease-out both}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keyrow{display:flex;flex-wrap:wrap;justify-content:center;align-content:center;align-items:stretch;gap:calc(var(--pg-u)*1.6) calc(var(--pg-u)*1.2);margin:0;padding:0;list-style:none;counter-reset:step}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keystep{counter-increment:step;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--pg-u)*2.2);min-width:0;padding:calc(var(--pg-u)*4) calc(var(--pg-u)*1.2);border-style:solid;border-color:transparent;border-width:calc(var(--pg-u)*3);border-image:url("./assets/pages/_kit/panel.webp") 200 fill / calc(var(--pg-u)*3) stretch}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keystep>b{font:700 max(15px,calc(var(--pg-u)*2.6))/1.2 var(--uk-serif);color:#f1d896;white-space:nowrap}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keystep>b::before{content:counter(step) " · ";color:#c9a25a}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keycaps{display:flex;align-items:center;gap:calc(var(--pg-u)*.5);flex-wrap:nowrap}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keycaps>i{font:400 max(12px,calc(var(--pg-u)*1.5))/1 var(--uk-sans);font-style:normal;color:var(--uk-muted)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-key{display:grid;place-items:center;width:calc(var(--pg-u)*6.8);aspect-ratio:557/541;padding-bottom:calc(var(--pg-u)*.5);box-sizing:border-box;background:url("./assets/pages/guide/key.webp") center/contain no-repeat;font:700 max(15px,calc(var(--pg-u)*2.8))/1 var(--uk-serif);color:#2c2218;text-shadow:0 1px 0 #f5ead0aa;filter:drop-shadow(0 3px 4px #000a)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-key.is-wide{width:calc(var(--pg-u)*11.4);aspect-ratio:1182/578;background-image:url("./assets/pages/guide/key-wide.webp")}
body.desktop-game #guide-dialog.pg-guide .pg-guide-key.is-word{font-size:max(14px,calc(var(--pg-u)*2.3))}
body.desktop-game #guide-dialog.pg-guide .pg-guide-keys-text{margin:0;justify-self:center;max-width:90%;text-align:center;font:400 clamp(13px,calc(var(--pg-u)*1.9),22px)/1.6 var(--uk-sans);color:#d9d2c0}

/* Footer: codex toggle · gold return button (original .primary-button[data-close]) · keyboard toggle */
body.desktop-game #guide-dialog.pg-guide .pg-guide-foot{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;column-gap:calc(var(--pg-u)*2)}
body.desktop-game #guide-dialog.pg-guide .pg-guide-foot>:first-child{justify-self:start}
body.desktop-game #guide-dialog.pg-guide .pg-guide-foot>:last-child{justify-self:end}
body.desktop-game #guide-dialog.pg-guide .pg-guide-return{width:auto;gap:0;border-radius:0}
body.desktop-game #guide-dialog.pg-guide .pg-guide-side[aria-pressed="true"]{--uk-bimg:url("./assets/pages/_kit/btn-moon.webp");color:#fff1c9!important}

@keyframes pg-guide-dim{from{opacity:0}to{opacity:1}}
@keyframes pg-guide-rise{from{opacity:0;transform:translateY(6%)}to{opacity:1;transform:none}}
@keyframes pg-guide-runes{0%{opacity:0;transform:scale(.3)}40%{opacity:1}100%{opacity:0;transform:scale(1.25)}}
@keyframes pg-guide-flip{from{opacity:0;transform:perspective(900px) rotateY(70deg) scale(.86)}to{opacity:1;transform:none}}
@keyframes pg-guide-unfold{from{opacity:0;transform:scaleY(.92)}to{opacity:1;transform:none}}
@keyframes pg-guide-glow{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes pg-guide-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}
@keyframes pg-guide-drag{0%,8%{transform:translate(calc(var(--pic)*.14 - 50%),calc(var(--pic)*.74 - 50%))}36%{transform:translate(calc(var(--pic)*.4 - 50%),calc(var(--pic)*.6 - 50%))}64%{transform:translate(calc(var(--pic)*.66 - 50%),calc(var(--pic)*.5 - 50%))}92%,100%{transform:translate(calc(var(--pic)*.88 - 50%),calc(var(--pic)*.22 - 50%))}}
@keyframes pg-guide-pop{0%,55%{transform:scale(1);opacity:1}66%{transform:scale(1.22);opacity:1}76%{transform:scale(0);opacity:0}86%{transform:translateY(-40%) scale(1);opacity:0}100%{transform:none;opacity:1}}
@keyframes pg-guide-zap{0%,100%{opacity:1}12%{opacity:.35}18%{opacity:1}52%{opacity:.55}58%{opacity:1}}
@keyframes pg-guide-flame{0%,100%{transform:translate(-50%,-50%) scale(1)}50%{transform:translate(-50%,-50%) scale(1.06)}}
@keyframes pg-guide-frost{0%,100%{opacity:1}50%{opacity:.72}}
@media (prefers-reduced-motion:reduce){
  body.desktop-game #guide-dialog.pg-guide :is(.pg-guide-stage,.pg-guide-tablet,.pg-guide-niche,.pg-guide-orb,.pg-guide-overlay,.pg-guide-codex,.pg-guide-keys){animation:none!important}
  body.desktop-game #guide-dialog.pg-guide .pg-guide-tablet::after{display:none}
  body.desktop-game #guide-dialog.pg-guide :is(.pg-guide-codex-flow,.pg-guide-tab,.pg-guide-badge){transition:none!important}
}
