/* Board previews (peek.js). The card in the page's own look (pheme.css tokens), the board inside in its game's. */
.pk{position:relative;aspect-ratio:16/9;overflow:hidden;background:var(--pk-bg,#000);clip-path:var(--cut-m,inset(0));isolation:isolate}
.pkf,.pkf iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.pkf iframe{opacity:0;transition:opacity .5s}
.pk.on .pkf iframe{opacity:1}
.pkc{position:absolute;inset:0;z-index:1;cursor:default} /* nothing on the board can be pressed */
.pkt{position:absolute;z-index:2;left:50%;top:10px;transform:translateX(-50%);padding:4px 8px;font:600 10px/1 var(--body);letter-spacing:.14em;text-transform:uppercase;color:var(--bone);background:rgba(0,0,0,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.pk.done .pkt{opacity:0}
/* still loading: a soft shimmer over the game's own background */
.pk:not(.on):not(.done)::after{content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.06) 50%,transparent 70%) 0 0/250% 100%;animation:pkWait 1.4s linear infinite}
@keyframes pkWait{to{background-position:-250% 0}}
.pke{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px;text-align:center;background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 70%),rgba(0,0,0,.6);animation:pkIn .45s var(--ease-out,ease) both}
.pke[hidden]{display:none}
.pke b{font:var(--display-weight,600) clamp(18px,3vw,28px)/1.1 var(--display);letter-spacing:var(--display-track,0);color:var(--bone)}
.pke p{margin:0;font-size:14px;color:var(--soft)}
.pkb{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:8px}
@keyframes pkIn{from{opacity:0;transform:scale(.97)}}

/* the sheet: frameless, the X just above its top right corner, no window, just the board floating over a tinted grey backdrop, centred on the screen, its bottom casting a soft glow of the game's accent
   (the same glow as a board shown big on the home page) */
.pkm{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:clamp(16px,4vw,64px);background:rgba(34,38,42,.94);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);animation:pkFade .25s ease-out}
.pkm.out{opacity:0;transition:opacity .2s}
.pkd{position:relative;width:min(1600px,100%,calc((100vh - clamp(32px,8vw,128px) - 2 * 60px) * 16 / 9));animation:pkIn .45s var(--ease-out,ease) both}
.pkd .pk{box-shadow:0 60px 110px -50px color-mix(in srgb,var(--pk-glow,var(--accent)) 75%,transparent),0 24px 50px -24px rgba(0,0,0,.85)}
.pkd .pk{clip-path:none}
.pkx{position:absolute;z-index:1;bottom:100%;right:-12px;margin-bottom:6px;width:44px;height:44px;display:grid;place-items:center;border:0;background:none;color:var(--dim);cursor:pointer}
.pkx:focus{outline:none}
.pkx:hover,.pkx:focus-visible{color:var(--bone)}
.pkx svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
@keyframes pkFade{from{opacity:0}}
@media (prefers-reduced-motion:reduce){.pkm,.pkd,.pke{animation:none}.pk:not(.on):not(.done)::after{animation:none}}
