/* Transwordle, design "Marmalade": grape ground, candy-white keys, jelly tiles, the blob.
   Phone first (j-* artboards, 390x844), the desktop block from 1100px sits at the end
   (jd-* artboards, 1440x900) */

/* ---------- fonts (OFL, files and licences in ../fonts) ---------- */
@font-face{font-family:'Fredoka';font-style:normal;font-weight:600 700;font-display:swap;src:url(../fonts/fredoka-hebrew.woff2) format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:'Fredoka';font-style:normal;font-weight:600 700;font-display:swap;src:url(../fonts/fredoka-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Fredoka';font-style:normal;font-weight:600 700;font-display:swap;src:url(../fonts/fredoka-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800 900;font-display:swap;src:url(../fonts/nunito-cyrillic-ext.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800 900;font-display:swap;src:url(../fonts/nunito-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800 900;font-display:swap;src:url(../fonts/nunito-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800 900;font-display:swap;src:url(../fonts/nunito-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800 900;font-display:swap;src:url(../fonts/nunito-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- palette ---------- */
:root{
  --grape:#4b2bd0;--circle:#5a3ae0;--hole:#3d22b0;--ink:#2a1494;--deep:#1d0f63;
  --candy:#ffffff;--candy-e:#d9d0ff;--txt:#3a2a8a;--txt2:#5b4bb0;--lil:#efeaff;--lil2:#cfc6ff;
  --coral:#ff5a6e;--coral-e:#d23a52;--coral-s:#9e1f35;
  --go:#34d16b;--go-e:#1c9b4a;--go-s:#13753a;
  --rk:#ffcd2e;--rk-e:#d9a300;--rk-s:#9c6d00;
  /* status colours, swapped by high contrast */
  --c:#34d16b;--c-e:#1c9b4a;--c-s:#13753a;
  --p:#ffcd2e;--p-e:#d9a300;--p-s:#9c6d00;
  --a:#8e8ab0;--a-e:#65618a;--a-s:#4a4670;
  --blob:#c9b6ff;
  --fd:'Fredoka',ui-rounded,'Trebuchet MS',sans-serif;
  --nu:'Nunito',ui-rounded,'Segoe UI',system-ui,sans-serif;
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  --vh:100vh;
}
@supports (height:100dvh){:root{--vh:100dvh}}
/* high contrast: dark slate for "not in word", orange right spot, light blue wrong spot.
   The three are far apart in lightness, not only in hue */
.hc{--c:#ec6a12;--c-e:#b84d05;--c-s:#7a3000;--p:#9ad4ff;--p-e:#4f9be0;--p-s:#1c5d9c;--a:#4f4b73;--a-e:#36325a;--a-s:#24213f}
.bw0{--blob:#6fd6ff}.bw1{--blob:#ff8fd1}.bw2{--blob:#ff9d3d}.bw3{--blob:#c9b6ff}

/* ---------- base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--grape)}
body{margin:0;min-height:var(--vh);background:var(--grape);color:#fff;font-family:var(--nu);font-weight:800;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;overflow-x:hidden}
button{font:inherit;color:inherit;margin:0;-webkit-tap-highlight-color:transparent}
a{color:inherit}
h1,h2,h3,p{margin:0}
[hidden]{display:none!important}
a:focus-visible,button:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid #fff;outline-offset:3px}
/* headings and the app take focus from code so screen readers land there; no ring for that */
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus,main[tabindex="-1"]:focus{outline:none}
.card a:focus-visible,.card button:focus-visible,.pc a:focus-visible,.pc button:focus-visible,.sheet a:focus-visible,.sheet button:focus-visible{outline-color:var(--deep)}
.sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:12px;top:-60px;z-index:50;padding:10px 16px;border-radius:14px;background:#fff;color:var(--txt);text-decoration:none}
.skip-link:focus{top:12px}
.ico{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ltr{direction:ltr}

/* ---------- decoration ---------- */
.deco{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.cir{position:absolute;border-radius:50%;background:var(--circle)}
.ci1{width:300px;height:300px;left:-130px;top:-120px}
.ci2{width:120px;height:120px;left:304px;top:92px}
.ci3{width:230px;height:230px;left:262px;top:372px}
.ci4{width:84px;height:84px;left:-30px;top:452px}
.ci5{width:360px;height:360px;left:-170px;top:640px}
.ci6{width:160px;height:160px;left:296px;top:724px}
.sp{position:absolute;width:16px;height:16px;opacity:.5;animation:tw 3.4s ease-in-out infinite}
.sp polygon{fill:#fff}
.sp1{left:22px;top:104px}
.sp2{left:350px;top:58px;width:12px;height:12px;animation-delay:-1.2s}
.sp3{left:356px;top:322px;width:11px;height:11px;animation-delay:-2.1s}
.sp4{left:14px;top:590px;width:13px;height:13px;animation-delay:-.6s}
.sp5{left:362px;top:600px;width:15px;height:15px;animation-delay:-2.8s}
.sp6{left:26px;top:744px;width:12px;height:12px;animation-delay:-1.6s}
@keyframes tw{0%{transform:scale(.7);opacity:.25}50%{transform:scale(1.1);opacity:.8}100%{transform:scale(.7);opacity:.25}}

/* ---------- the blob ---------- */
.blob{width:40px;height:38px;flex:none;overflow:visible;transform-origin:50% 100%}
.bd{fill:var(--blob);stroke:var(--ink);stroke-width:2.6;stroke-linejoin:round;transition:fill .25s ease .2s}
.bsh{fill:rgba(42,20,148,.22)}
.bhl{fill:none;stroke:rgba(255,255,255,.8);stroke-width:2.6;stroke-linecap:round}
.ew{fill:#fff}
.ep{fill:var(--deep)}
.eyes{transform-box:fill-box;transform-origin:center;animation:blink 4.6s ease-in-out infinite}
.hap{fill:none;stroke:var(--deep);stroke-width:2.8;stroke-linecap:round}
.mo{fill:var(--deep);stroke:var(--deep);stroke-width:1.2;stroke-linejoin:round}
.chk{fill:#ff8fd1;opacity:.75}
.brw,.frw{fill:none;stroke:var(--deep);stroke-width:2.4;stroke-linecap:round}
.tear{fill:#6fd6ff;stroke:var(--ink);stroke-width:1.2;stroke-linejoin:round;transform-box:fill-box;transform-origin:50% 0;animation:tear 3.2s ease-in infinite}
.gb{fill:rgba(255,255,255,.06);stroke:rgba(255,255,255,.55);stroke-width:2.4;stroke-linejoin:round;stroke-dasharray:6 6}
.gq{fill:none;stroke:rgba(255,255,255,.7);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.idle{animation:idle 2.8s ease-in-out infinite}
.blob.jA{animation:jumpA .75s cubic-bezier(.3,.7,.4,1) both}
.blob.jB{animation:jumpB .75s cubic-bezier(.3,.7,.4,1) both}
.blob.cheer{animation:cheer .9s cubic-bezier(.3,.7,.4,1) infinite}
.blob.sag{animation:sag 3.2s ease-in-out infinite}
@keyframes idle{0%{transform:none}50%{transform:scale(1.05,.95)}100%{transform:none}}
@keyframes blink{0%{transform:none}92%{transform:none}95%{transform:scaleY(.12)}98%{transform:none}100%{transform:none}}
@keyframes jumpA{0%{transform:none}14%{transform:scale(1.24,.76)}38%{transform:translateY(-14px) scale(.86,1.16) rotate(-8deg)}60%{transform:translateY(0) scale(1.2,.82)}78%{transform:scale(.95,1.05)}100%{transform:none}}
@keyframes jumpB{0%{transform:none}14%{transform:scale(1.24,.76)}38%{transform:translateY(-14px) scale(.86,1.16) rotate(8deg)}60%{transform:translateY(0) scale(1.2,.82)}78%{transform:scale(.95,1.05)}100%{transform:none}}
@keyframes cheer{0%{transform:none}20%{transform:scale(1.16,.84)}45%{transform:translateY(-12px) scale(.92,1.1)}70%{transform:translateY(0) scale(1.1,.9)}100%{transform:none}}
@keyframes sag{0%{transform:none}50%{transform:translateY(1px) scale(1.05,.94)}100%{transform:none}}
@keyframes tear{0%{opacity:0;transform:scale(.3)}20%{opacity:1;transform:none}70%{opacity:1;transform:translateY(7px)}100%{opacity:0;transform:translateY(12px) scale(.8)}}

/* ---------- screens ---------- */
.app{position:relative;z-index:1}
.scr{position:relative;min-height:var(--vh);display:flex;flex-direction:column;padding:calc(18px + var(--safe-t)) 16px calc(20px + var(--safe-b));max-width:520px;margin:0 auto}
.scr.fixed{height:var(--vh);overflow:hidden}
.top{display:grid;grid-template-columns:62px 1fr 62px;align-items:center;min-height:48px;flex:none}
.top > :last-child{justify-self:end}
.top2{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.top3{display:flex;align-items:center;gap:14px;flex:none}
.rbtn{width:46px;height:46px;flex:none;border:0;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--txt);text-decoration:none;background:#fff;cursor:pointer;box-shadow:inset 0 -3px 0 rgba(58,42,138,.1),0 4px 0 var(--candy-e),0 8px 14px rgba(25,8,100,.3);transition:transform .15s ease}
.rbtn:hover{transform:translateY(-2px)}
.rbtn:active{transform:translateY(3px);box-shadow:inset 0 -3px 0 rgba(58,42,138,.1),0 1px 0 var(--candy-e),0 3px 6px rgba(25,8,100,.3)}
.rbtn .ico{stroke-width:2.6}
.rbtn.back .ico{stroke-width:3}
.brand{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;text-decoration:none;border-radius:16px}
.logo{font-family:var(--fd);font-weight:700;font-size:26px;line-height:1;letter-spacing:.01em;color:#fff;-webkit-text-stroke:7px var(--ink);paint-order:stroke fill;text-shadow:0 4px 0 var(--ink);white-space:nowrap}
.chip{height:34px;padding:0 14px;border-radius:999px;display:inline-flex;align-items:center;gap:6px;font-family:var(--nu);font-weight:800;font-size:14px;color:#fff;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.18),inset 0 -2px 0 rgba(255,255,255,.08);white-space:nowrap;font-variant-numeric:tabular-nums}
.chip .ico{width:19px;height:19px;stroke-width:2.4}
.ttl{font-family:var(--fd);font-weight:700;font-size:28px;line-height:1.05;letter-spacing:.01em;color:#fff;-webkit-text-stroke:7px var(--ink);paint-order:stroke fill;text-shadow:0 4px 0 var(--ink);text-align:center;overflow-wrap:anywhere}
.ttl.big{font-size:32px;-webkit-text-stroke-width:8px;text-shadow:0 5px 0 var(--ink);text-align:start}
.card{position:relative;padding:22px 20px 20px;border-radius:30px;background:#fff;color:var(--txt);box-shadow:inset 0 -6px 0 rgba(58,42,138,.07),0 8px 0 var(--candy-e),0 22px 40px rgba(25,8,100,.5)}
.lbl{font-family:var(--nu);font-weight:800;font-size:14px;line-height:1.2;color:var(--txt2);text-align:center}

/* chunky buttons */
.cbtn{height:56px;padding:0 18px;border:0;border-radius:20px;font-family:var(--fd);font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-decoration:none;white-space:nowrap;transition:transform .15s ease}
.cbtn:hover{transform:translateY(-2px)}
.cbtn:active{transform:translateY(3px)}
.cbtn[disabled]{opacity:.6;cursor:default;transform:none}
.cbtn.go{font-size:24px;color:#fff;-webkit-text-stroke:5px var(--go-s);paint-order:stroke fill;background:var(--go);box-shadow:inset 0 -5px 0 rgba(0,0,0,.14),inset 0 3px 0 rgba(255,255,255,.3),0 5px 0 var(--go-e)}
.cbtn.alt{font-size:20px;color:var(--txt);background:var(--lil);box-shadow:inset 0 -4px 0 rgba(58,42,138,.1),0 5px 0 var(--lil2)}
.cbtn .ico{width:20px;height:20px;stroke-width:2.6}
.cbtn.go .ico{stroke:#fff;filter:drop-shadow(0 0 1.5px var(--go-s))}
.on-grape .cbtn.go,.cbtn.go.lift{box-shadow:inset 0 -5px 0 rgba(0,0,0,.14),inset 0 3px 0 rgba(255,255,255,.3),0 5px 0 var(--go-e),0 12px 20px rgba(25,8,100,.35)}
.cbtn.alt.lift{box-shadow:inset 0 -4px 0 rgba(58,42,138,.1),0 5px 0 var(--lil2),0 12px 20px rgba(25,8,100,.3)}
.acts{display:flex;gap:10px}
.acts .go{flex:1;min-width:0}
.ulink{padding:12px 14px;font-family:var(--nu);font-weight:800;font-size:16px;color:#fff;text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:rgba(255,255,255,.5);text-underline-offset:5px;background:none;border:0;cursor:pointer;display:inline-flex;align-items:center;gap:7px}
.ulink:hover{text-decoration-color:#fff}
.ulink .ico{width:19px;height:19px;stroke-width:2.4}

/* path of the word: pills in blob colours */
.chain{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 3px;direction:ltr}
.pill{height:34px;padding:0 8px;border-radius:999px;display:flex;align-items:center;font-family:var(--fd);font-weight:600;font-size:14px;line-height:1;letter-spacing:.03em;color:var(--deep)}
.pl0{background:#6fd6ff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1),inset 0 2px 0 rgba(255,255,255,.45),0 3px 0 #3aa9d6}
.pl1{background:#ff8fd1;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1),inset 0 2px 0 rgba(255,255,255,.45),0 3px 0 #d65aa4}
.pl2{background:#ff9d3d;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1),inset 0 2px 0 rgba(255,255,255,.45),0 3px 0 #d67a1c}
.pl3{background:#c9b6ff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1),inset 0 2px 0 rgba(255,255,255,.45),0 3px 0 #9a84e0}
.pill.fin{height:40px;padding:0 11px;font-size:16px;font-weight:700;color:#fff;-webkit-text-stroke:4px var(--c-s);paint-order:stroke fill;background:var(--c);box-shadow:inset 0 -4px 0 rgba(0,0,0,.14),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 var(--c-e);animation:bob 1.4s ease-in-out infinite}
.pill.fin.lost{-webkit-text-stroke-color:var(--a-s);background:var(--a);box-shadow:inset 0 -4px 0 rgba(0,0,0,.16),inset 0 3px 0 rgba(255,255,255,.3),0 4px 0 var(--a-e);animation:none}
.arr{width:10px;height:10px;flex:none;color:#8e8ab0;stroke-width:3}
@keyframes bob{0%{transform:none}50%{transform:translateY(-3px) scale(1.04)}100%{transform:none}}

/* ---------- board ---------- */
.board{--t:56px;--g:7px;display:flex;flex-direction:column;gap:var(--g);direction:ltr;margin:0 auto}
.row{display:flex;gap:var(--g)}
.cell{position:relative;width:var(--t);height:var(--t);flex:none;border-radius:calc(var(--t) * .29);background:var(--hole);box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06)}
.row.active .cell{background:#4126ba;box-shadow:inset 0 4px 0 rgba(0,0,0,.2),0 0 0 2px rgba(255,255,255,.14)}
.cell.cur::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 0 2.5px rgba(255,255,255,.6);animation:breathe 1.6s ease-in-out infinite}
@keyframes breathe{0%{opacity:.25}50%{opacity:1}100%{opacity:.25}}
.tile{position:absolute;inset:0;border-radius:inherit;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:700;font-size:calc(var(--t) * .555);line-height:1;color:#fff;transform-origin:50% 100%;opacity:0;transform:scale(.4);-webkit-text-stroke:calc(var(--t) * .09) transparent;paint-order:stroke fill;transition:background-color .2s ease,color .2s ease,box-shadow .2s ease,-webkit-text-stroke-color .2s ease}
.tile::before{content:"";position:absolute;left:14%;top:11%;width:28%;height:12.5%;border-radius:50%;background:rgba(255,255,255,.55);transform:rotate(-20deg)}
.ch{position:relative}
.st-f .tile{opacity:1;transform:none;background:#fff;color:var(--txt);box-shadow:inset 0 -4px 0 rgba(58,42,138,.12),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 #b9adf5;animation:popT .28s cubic-bezier(.3,1.6,.5,1)}
.st-c .tile{opacity:1;transform:none;background:var(--c);-webkit-text-stroke-color:var(--c-s);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 var(--c-e)}
.st-p .tile{opacity:1;transform:none;background:var(--p);-webkit-text-stroke-color:var(--p-s);box-shadow:inset 0 -4px 0 rgba(0,0,0,.15),inset 0 3px 0 rgba(255,255,255,.4),0 4px 0 var(--p-e)}
.st-a .tile{opacity:1;transform:none;background:var(--a);-webkit-text-stroke-color:var(--a-s);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18),inset 0 3px 0 rgba(255,255,255,.3),0 4px 0 var(--a-e)}
@keyframes popT{0%{transform:scale(.5)}60%{transform:scale(1.12,.9)}100%{transform:none}}
/* reveal: tiles drop in with a bounce, one after another */
@keyframes dropIn{0%{opacity:0;transform:translateY(-52px) scale(.92,1.08)}38%{opacity:1;transform:translateY(0) scale(1.16,.84)}58%{transform:translateY(-9px) scale(.94,1.06)}78%{transform:translateY(0) scale(1.04,.96)}100%{opacity:1;transform:none}}
.rv .tile{transition:none;animation:dropIn .44s cubic-bezier(.33,.7,.5,1) both}
/* the word changes: the whole jelly wobbles in a diagonal wave, tiles whose colour
   changed hop and spark. sA and sB are the same motion, flipping between them
   restarts it */
@keyframes boA{0%{transform:none}20%{transform:scale(1.15,.85)}46%{transform:scale(.9,1.1)}70%{transform:scale(1.04,.96)}100%{transform:none}}
@keyframes boB{0%{transform:none}20%{transform:scale(1.15,.85)}46%{transform:scale(.9,1.1)}70%{transform:scale(1.04,.96)}100%{transform:none}}
@keyframes hopA{0%{transform:none}16%{transform:scale(1.18,.82)}38%{transform:translateY(-18px) scale(.88,1.14)}58%{transform:translateY(0) scale(1.14,.86)}76%{transform:scale(.96,1.04)}100%{transform:none}}
@keyframes hopB{0%{transform:none}16%{transform:scale(1.18,.82)}38%{transform:translateY(-18px) scale(.88,1.14)}58%{transform:translateY(0) scale(1.14,.86)}76%{transform:scale(.96,1.04)}100%{transform:none}}
.cell{--dg:0}
.sA .tile{animation:boA .62s ease both}
.sB .tile{animation:boB .62s ease both}
.sA.chg .tile{animation-name:hopA;animation-duration:.76s}
.sB.chg .tile{animation-name:hopB;animation-duration:.76s}
.sA .tile,.sB .tile{animation-delay:calc(200ms + var(--dg) * 34ms);transition-delay:calc(480ms + var(--dg) * 34ms)}
.bst{position:absolute;left:50%;top:45%;width:0;height:0;z-index:3;pointer-events:none}
.q{position:absolute;left:-6px;top:-6px;width:12px;height:12px;opacity:0;background:#fff;clip-path:polygon(50% 0,63% 37%,100% 50%,63% 63%,50% 100%,37% 63%,0 50%,37% 37%)}
.q2,.q4{background:var(--blob)}
.q2{width:9px;height:9px;left:-4.5px;top:-4.5px}
.q3{width:10px;height:10px;left:-5px;top:-5px}
@keyframes qf1{0%{opacity:0;transform:translate(0,0) scale(.2) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translate(-36px,-32px) scale(1.15) rotate(120deg)}}
@keyframes qf2{0%{opacity:0;transform:translate(0,0) scale(.2) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translate(34px,-38px) scale(1) rotate(-100deg)}}
@keyframes qf3{0%{opacity:0;transform:translate(0,0) scale(.2) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translate(-34px,22px) scale(.9) rotate(90deg)}}
@keyframes qf4{0%{opacity:0;transform:translate(0,0) scale(.2) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translate(38px,16px) scale(1.1) rotate(-120deg)}}
.chg.sA .q1,.chg.sB .q1,.won .q1{animation:qf1 .75s cubic-bezier(.2,.7,.3,1) both}
.chg.sA .q2,.chg.sB .q2,.won .q2{animation:qf2 .75s cubic-bezier(.2,.7,.3,1) both}
.chg.sA .q3,.chg.sB .q3,.won .q3{animation:qf3 .75s cubic-bezier(.2,.7,.3,1) both}
.chg.sA .q4,.chg.sB .q4,.won .q4{animation:qf4 .75s cubic-bezier(.2,.7,.3,1) both}
.sA .q,.sB .q{animation-delay:calc(450ms + var(--dg) * 34ms)!important}
/* warmer: a solid sparkle that twinkles, colder: a hollow one */
.mk{position:absolute;top:calc(var(--t) * -.13);right:calc(var(--t) * -.13);width:calc(var(--t) * .39);height:calc(var(--t) * .39);min-width:16px;min-height:16px;z-index:4;overflow:visible;opacity:0;transform:scale(0) rotate(-60deg);pointer-events:none}
.mb{fill:var(--ink);stroke:var(--ink);stroke-width:3;stroke-linejoin:round}
.mf{fill:#fff}
.mk-up .mk{opacity:1;transform:none;filter:drop-shadow(0 0 3px rgba(255,255,255,.85));animation:twk 2.4s ease-in-out infinite}
.mk-dn .mk{opacity:1;transform:none}
.mk-dn .mb{fill:none;stroke-width:6}
.mk-dn .mf{fill:none;stroke:#fff;stroke-width:2.6;stroke-linejoin:round}
.mkx.sA .mk,.mkx.sB .mk{animation:mkPop .45s cubic-bezier(.3,1.6,.5,1) calc(780ms + var(--dg) * 34ms) both}
@keyframes twk{0%{transform:scale(1) rotate(0)}50%{transform:scale(1.18) rotate(14deg)}100%{transform:scale(1) rotate(0)}}
@keyframes mkPop{0%{opacity:0;transform:scale(0) rotate(-60deg)}100%{opacity:1;transform:none}}
.no-marks .mk,.no-marks .bst{display:none}
/* solved row */
@keyframes winHop{0%{transform:none}15%{transform:scale(1.16,.84)}38%{transform:translateY(-20px) scale(.9,1.12)}60%{transform:translateY(0) scale(1.12,.88)}80%{transform:scale(.97,1.03)}100%{transform:none}}
.won .tile{animation:winHop .8s cubic-bezier(.3,.7,.4,1) both}
.won .c1 .tile{animation-delay:.08s}.won .c2 .tile{animation-delay:.16s}.won .c3 .tile{animation-delay:.24s}.won .c4 .tile{animation-delay:.32s}
.won .c0 .q{animation-delay:.25s}.won .c1 .q{animation-delay:.33s}.won .c2 .q{animation-delay:.41s}.won .c3 .q{animation-delay:.49s}.won .c4 .q{animation-delay:.57s}
.won.wavy .tile{animation:wave 3.2s cubic-bezier(.3,.7,.4,1) infinite}
@keyframes wave{0%{transform:none}6%{transform:scale(1.14,.86)}15%{transform:translateY(-12px) scale(.92,1.1)}24%{transform:translateY(0) scale(1.08,.92)}30%{transform:none}100%{transform:none}}
.board.fade .tile{opacity:0;transform:scale(0);transition:opacity .3s ease,transform .35s cubic-bezier(.6,-.5,.7,1)}
.row.mute{opacity:.42;transition:opacity .4s ease}
/* not in the list: the row shakes its head */
.nope{animation:nope .5s cubic-bezier(.36,.07,.19,.97) both}
@keyframes nope{0%{transform:none}15%{transform:translateX(-7px)}30%{transform:translateX(6px)}45%{transform:translateX(-5px)}60%{transform:translateX(4px)}75%{transform:translateX(-2px)}100%{transform:none}}
.row.last-lost{animation:nope .6s cubic-bezier(.36,.07,.19,.97) .5s both}

/* ---------- keyboard ---------- */
.kb{--kh:50px;display:flex;flex-direction:column;gap:9px;direction:ltr;flex:none;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.krow{display:flex;gap:6px}
.krow.mid{padding:0 18px}
.key{flex:1 1 0;min-width:0;height:var(--kh);padding:0;border:0;border-radius:10px;background:#fff;color:var(--txt);font-family:var(--nu);font-weight:800;font-size:19px;display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-text-stroke:3px transparent;paint-order:stroke fill;box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 4px 0 var(--candy-e),0 7px 10px rgba(25,8,100,.28);transition:background-color .25s ease,color .25s ease,box-shadow .25s ease,-webkit-text-stroke-color .25s ease;touch-action:manipulation}
.key:active,.key.press{transform:translateY(3px)}
.key.wide{flex:1.55 1 0;font-size:12px;letter-spacing:.03em}
.key.k-c{background:var(--c);color:#fff;-webkit-text-stroke-color:var(--c-s);box-shadow:inset 0 -3px 0 rgba(0,0,0,.12),inset 0 2px 0 rgba(255,255,255,.3),0 4px 0 var(--c-e),0 7px 10px rgba(25,8,100,.28)}
.key.k-p{background:var(--p);color:#fff;-webkit-text-stroke-color:var(--p-s);box-shadow:inset 0 -3px 0 rgba(0,0,0,.1),inset 0 2px 0 rgba(255,255,255,.35),0 4px 0 var(--p-e),0 7px 10px rgba(25,8,100,.28)}
.key.k-a{background:var(--a);color:#fff;-webkit-text-stroke-color:var(--a-s);box-shadow:inset 0 -3px 0 rgba(0,0,0,.12),inset 0 2px 0 rgba(255,255,255,.2),0 4px 0 var(--a-e),0 7px 10px rgba(25,8,100,.28)}
.key.kfA,.key.kfB{transition-delay:.62s}
.key.kfA{animation:kjA .7s cubic-bezier(.3,.7,.4,1) .55s}
.key.kfB{animation:kjB .7s cubic-bezier(.3,.7,.4,1) .55s}
@keyframes kjA{0%{transform:none;filter:brightness(1)}30%{transform:translateY(-8px) scale(1.14,.9);filter:brightness(1.2) drop-shadow(0 0 8px var(--blob))}60%{transform:translateY(0) scale(.94,1.06);filter:brightness(1.05)}100%{transform:none;filter:brightness(1)}}
@keyframes kjB{0%{transform:none;filter:brightness(1)}30%{transform:translateY(-8px) scale(1.14,.9);filter:brightness(1.2) drop-shadow(0 0 8px var(--blob))}60%{transform:translateY(0) scale(.94,1.06);filter:brightness(1.05)}100%{transform:none;filter:brightness(1)}}
/* off while the other side plays: still readable, the colours are the hints */
.kb.off .key{cursor:default}
.kb.off .key.k-n,.kb.off .key.wide{opacity:.55}

/* ---------- toast ---------- */
.toast-wrap{position:absolute;left:0;right:0;z-index:8;display:grid;justify-items:center;pointer-events:none}
.toast-wrap > *{grid-area:1/1}
.toast{display:flex;align-items:center;gap:12px;max-width:calc(100vw - 32px);padding:10px 24px 12px 12px;border-radius:999px;background:#fff;color:var(--txt);text-decoration:none;box-shadow:inset 0 -4px 0 rgba(58,42,138,.08),0 5px 0 var(--candy-e),0 14px 26px rgba(25,8,100,.4);opacity:0;transform:scale(.6);visibility:hidden;transition:opacity .2s ease,transform .25s ease,visibility 0s linear .25s}
.toast.show{opacity:1;transform:none;visibility:visible;transition:none;animation:toastPop .62s cubic-bezier(.3,1.5,.5,1) .12s both}
.toast.plain{padding:12px 22px 14px}
.toast.link{pointer-events:auto}
@keyframes toastPop{0%{opacity:0;transform:scale(.4) rotate(-6deg)}55%{opacity:1;transform:scale(1.1,.92) rotate(2deg)}78%{transform:scale(.97,1.03) rotate(0)}100%{opacity:1;transform:none}}
.tblob{width:38px;height:36px}
.ttx{display:flex;flex-direction:column;gap:3px;min-width:0}
.t1{font-family:var(--fd);font-weight:700;font-size:22px;line-height:1;color:var(--txt)}
.t2{font-family:var(--nu);font-weight:800;font-size:13px;line-height:1.2;color:var(--txt2)}
.toast .ico{width:20px;height:20px;margin-inline-start:4px;color:var(--txt);stroke-width:3}
.gtoast{position:fixed;left:0;right:0;bottom:calc(24px + var(--safe-b));z-index:40}
.netbar{position:fixed;left:50%;top:calc(10px + var(--safe-t));z-index:45;transform:translateX(-50%);max-width:calc(100vw - 24px);display:flex;align-items:center;gap:10px;padding:9px 16px 10px 12px;border-radius:999px;background:var(--coral);color:#fff;font-family:var(--nu);font-weight:900;font-size:14px;box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),0 4px 0 var(--coral-e),0 10px 20px rgba(25,8,100,.35)}
.netbar .ld span{background:#fff;box-shadow:none}

/* ---------- confirm dialog ---------- */
.dlg{padding:0;border:0;background:transparent;max-width:min(380px,calc(100vw - 32px));width:100%;overflow:visible}
.dlg::backdrop{background:rgba(29,15,99,.62)}
.dlg[open]{animation:popIn .35s cubic-bezier(.3,1.5,.5,1) both}
.dlg-card{display:flex;flex-direction:column;gap:18px;padding:24px 20px 20px}
.dlg-t{font-family:var(--fd);font-weight:600;font-size:21px;line-height:1.25;color:var(--txt);text-align:center}
.dlg .acts .cbtn{flex:1 1 0;min-width:0;font-size:20px}

/* Rating over a finished game's result, with native modal focus handling */
.rate-dialog{max-width:min(420px,calc(100vw - 32px));max-height:calc(var(--vh) - 40px);overflow-y:auto;border-radius:28px;box-shadow:0 7px 0 var(--candy-e),0 22px 60px rgba(29,15,99,.45);color-scheme:light}
.rate-card{display:flex;flex-direction:column;gap:16px;padding:28px 22px 25px;border:3px solid var(--candy-e);border-radius:28px;background:#fff;color:var(--txt);box-shadow:none}
.rate-card h2{font-family:var(--fd);font-size:30px;font-weight:700;line-height:1.1;text-align:center}
.rate-card p{font-size:16px;line-height:1.4;text-align:center;color:var(--txt2)}
.rate-stars{display:flex;justify-content:center;gap:6px;padding:3px 0 7px}
.rate-star{display:grid;place-items:center;width:52px;height:56px;padding:0;border:0;border-radius:14px;background:var(--lil);color:var(--candy-e);box-shadow:0 4px 0 var(--lil2);cursor:pointer;transition:transform .15s,color .15s,background .15s}
.rate-star span{font-family:'Segoe UI Symbol',sans-serif;font-size:42px;line-height:1;-webkit-text-stroke:1.5px #8e80b8;paint-order:stroke fill;filter:drop-shadow(0 2px 0 #8e80b8)}
.rate-star.is-lit{color:#ffcd2e;background:#fff7d9;transform:translateY(-2px)}
.rate-star.is-lit span{-webkit-text-stroke-color:#d9a300;filter:drop-shadow(0 3px 0 #d9a300);animation:ratePop .25s ease-out}
.rate-star:active{transform:translateY(2px)}
.rate-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:14px;color:var(--txt2)}
.rate-label [data-count]{white-space:nowrap;font-variant-numeric:tabular-nums}
.rate-text{width:100%;min-height:88px;max-height:180px;resize:vertical;border:2px solid var(--candy-e);border-radius:14px;background:var(--lil);color:var(--deep);padding:12px;font:800 16px/1.4 var(--nu);text-align:start}
.rate-text::placeholder{color:var(--txt2);opacity:1}
.rate-text:focus-visible{outline:3px solid var(--deep);outline-offset:2px}
.rate-dialog .acts{display:flex;flex-direction:column;gap:13px;padding-top:3px}
.rate-dialog .acts .cbtn{flex:auto;white-space:normal;height:auto;min-height:50px;padding:10px 16px;line-height:1.2}
@keyframes ratePop{0%{transform:scale(.8)}65%{transform:scale(1.15)}100%{transform:scale(1)}}
.minib{width:34px;height:32px}

/* ---------- home: the phone menu (j-menu) ---------- */
.scr-home{min-height:var(--vh);padding-bottom:calc(22px + var(--safe-b))}
.mtop{display:flex;align-items:center;gap:8px}
.pblob{width:34px;height:33px;margin-top:2px}
.chips{flex:1;min-width:0;display:flex;justify-content:center;gap:8px}
.chips .chip{font-size:15px;padding:0 14px 0 10px}
.i-cup{color:#ffcd2e}
.i-fire{color:#ff9d3d}
.hero{margin-top:30px;display:flex;flex-direction:column;align-items:center}
.stage{position:relative;width:140px;height:132px;display:flex;justify-content:center;align-items:flex-end}
.bigblob{position:relative;z-index:1;width:126px;height:120px;animation:hop4 2s cubic-bezier(.3,.7,.4,1) infinite;--blob:#6fd6ff}
.bigblob .bd{animation:cycf 8s linear infinite}
.bshadow{position:absolute;bottom:-6px;left:28px;width:84px;height:14px;border-radius:50%;background:rgba(29,15,99,.4);animation:shad 2s cubic-bezier(.3,.7,.4,1) infinite}
@keyframes hop4{0%{transform:none}6%{transform:scale(1.18,.82)}20%{transform:translateY(-26px) scale(.9,1.12)}33%{transform:translateY(0) scale(1.14,.86)}42%{transform:scale(.97,1.03)}50%{transform:none}100%{transform:none}}
@keyframes shad{0%{transform:scale(1.1)}6%{transform:scale(1.15)}20%{transform:scale(.7);opacity:.6}33%{transform:scale(1.12);opacity:1}50%{transform:none}100%{transform:none}}
@keyframes cycf{0%{fill:#c9b6ff}3%{fill:#6fd6ff}25%{fill:#6fd6ff}28%{fill:#ff8fd1}50%{fill:#ff8fd1}53%{fill:#ff9d3d}75%{fill:#ff9d3d}78%{fill:#c9b6ff}100%{fill:#c9b6ff}}
.logo-big{margin:20px 0 0;font-family:var(--fd);font-weight:700;font-size:52px;line-height:1;letter-spacing:.01em;color:#fff;-webkit-text-stroke:12px var(--ink);paint-order:stroke fill;text-shadow:0 7px 0 var(--ink)}
.slogan{margin:20px 0 0;max-width:290px;text-align:center;font-family:var(--nu);font-weight:800;font-size:17px;line-height:1.4;color:#fff;text-wrap:balance}
.modes{margin-top:38px;display:flex;flex-direction:column;gap:18px}
.cb{display:flex;align-items:center;gap:14px;min-height:86px;padding:10px 20px 10px 14px;border-radius:26px;text-decoration:none;transition:transform .15s ease}
.cb:hover{transform:translateY(-2px)}
.cb:active{transform:translateY(4px)}
.cb.solo{background:var(--go);box-shadow:inset 0 -6px 0 rgba(0,0,0,.14),inset 0 4px 0 rgba(255,255,255,.3),0 6px 0 var(--go-e),0 14px 22px rgba(25,8,100,.35)}
.cb.rank{background:var(--rk);box-shadow:inset 0 -6px 0 rgba(0,0,0,.12),inset 0 4px 0 rgba(255,255,255,.4),0 6px 0 var(--rk-e),0 14px 22px rgba(25,8,100,.35)}
.cb.friend{background:#fff;box-shadow:inset 0 -6px 0 rgba(58,42,138,.08),inset 0 4px 0 rgba(255,255,255,.4),0 6px 0 var(--candy-e),0 14px 22px rgba(25,8,100,.35)}
.cbi{width:56px;height:56px;border-radius:18px;display:flex;align-items:center;justify-content:center;flex:none;background:#fff;box-shadow:inset 0 -4px 0 rgba(58,42,138,.1),0 3px 0 rgba(0,0,0,.14)}
.friend .cbi{background:var(--lil);box-shadow:inset 0 -4px 0 rgba(58,42,138,.1),0 3px 0 var(--lil2)}
.cbi .ico{width:28px;height:28px;stroke-width:2.6}
.solo .cbi{color:var(--go-s)}
.rank .cbi{color:var(--rk-s)}
.friend .cbi{color:var(--txt)}
.cbt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.cbn{font-family:var(--fd);font-weight:700;font-size:27px;line-height:1.05;color:#fff;-webkit-text-stroke:6px transparent;paint-order:stroke fill}
.cbs{font-family:var(--nu);font-weight:800;font-size:15px;line-height:1.2}
.solo .cbn{-webkit-text-stroke-color:var(--go-s)}
.rank .cbn{-webkit-text-stroke-color:var(--rk-s)}
.friend .cbn{color:var(--txt);-webkit-text-stroke-width:0}
.solo .cbs,.solo .chev{color:#0b4a24}
.rank .cbs,.rank .chev{color:#5c3f00}
.friend .cbs{color:var(--txt2)}
.friend .chev{color:var(--txt)}
.cb .chev{width:24px;height:24px;stroke-width:3.2}
.hwrap,.lc{flex:1;display:flex;flex-direction:column}
.how{margin-top:auto;align-self:center;padding-top:22px}
.demo-col{display:none}

/* about the game and more games, under the first screen of the home page */
.about{position:relative;z-index:1;padding:8px 16px calc(40px + var(--safe-b))}
.about-in{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:22px}
.about .card{padding:22px 20px 22px}
.about h2{font-family:var(--fd);font-weight:700;font-size:24px;line-height:1.1;color:var(--txt)}
.about p{margin-top:10px;font-family:var(--nu);font-weight:800;font-size:16px;line-height:1.5;color:var(--txt2)}
.about .h2w{font-family:var(--fd);font-weight:700;font-size:24px;line-height:1.1;color:#fff;-webkit-text-stroke:6px var(--ink);paint-order:stroke fill;text-shadow:0 3px 0 var(--ink)}
.games{margin:14px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}
.games a{display:flex;flex-direction:column;gap:4px;padding:14px 18px 15px;border-radius:22px;background:#fff;text-decoration:none;box-shadow:inset 0 -4px 0 rgba(58,42,138,.07),0 5px 0 var(--candy-e),0 12px 22px rgba(25,8,100,.35);transition:transform .15s ease}
.games a:hover{transform:translateY(-2px)}
.gname{font-family:var(--fd);font-weight:700;font-size:21px;line-height:1.1;color:var(--txt);text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:var(--lil2);text-underline-offset:4px}
.gblurb{font-family:var(--nu);font-weight:800;font-size:14px;line-height:1.35;color:var(--txt2)}

/* ---------- how to play (j-rules) ---------- */
.steps{margin:18px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:14px}
.step{position:relative;padding:16px 16px 18px;border-radius:26px;background:#fff;box-shadow:inset 0 -5px 0 rgba(58,42,138,.07),0 5px 0 var(--candy-e),0 12px 22px rgba(25,8,100,.35);display:flex;flex-direction:column;gap:12px}
.sh{display:flex;align-items:flex-start;gap:12px}
.num{flex:none;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:700;font-size:17px;line-height:1;color:#fff;background:var(--grape);box-shadow:inset 0 -3px 0 rgba(0,0,0,.2),inset 0 2px 0 rgba(255,255,255,.18),0 3px 0 var(--ink)}
.stx{padding-top:4px;font-family:var(--nu);font-weight:800;font-size:16.5px;line-height:1.35;color:var(--txt)}
.ill{display:flex;justify-content:center;align-items:flex-start;gap:20px;direction:ltr}
.lg{display:flex;flex-direction:column;align-items:center;gap:9px}
.lgl{font-family:var(--nu);font-weight:800;font-size:13.5px;line-height:1.2;color:var(--txt2);text-align:center}
.mrow{display:flex;gap:6px}
.pair{display:flex;align-items:center;gap:6px}
.pair .arr{width:18px;height:18px;color:var(--txt2);stroke-width:2.6}
.mt{position:relative;width:42px;height:42px;flex:none;border-radius:13px;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:700;font-size:24px;line-height:1;color:#fff;-webkit-text-stroke:4px transparent;paint-order:stroke fill}
.mt::before{content:"";position:absolute;left:6px;top:5px;width:12px;height:5px;border-radius:50%;background:rgba(255,255,255,.55);transform:rotate(-20deg)}
.mt .ch{position:relative}
.t-c{background:var(--c);-webkit-text-stroke-color:var(--c-s);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 var(--c-e)}
.t-p{background:var(--p);-webkit-text-stroke-color:var(--p-s);box-shadow:inset 0 -4px 0 rgba(0,0,0,.15),inset 0 3px 0 rgba(255,255,255,.4),0 4px 0 var(--p-e)}
.t-a{background:var(--a);-webkit-text-stroke-color:var(--a-s);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18),inset 0 3px 0 rgba(255,255,255,.3),0 4px 0 var(--a-e)}
.mt .mk{top:-8px;right:-8px;width:22px;height:22px;min-width:0;min-height:0;opacity:1;transform:none}
.mt.mk-up .mk{animation:twk 2.4s ease-in-out infinite;filter:none}
.wblob{width:44px;height:42px;margin-inline-end:6px}
.shift .wblob{--blob:#6fd6ff;animation:cyHop 5.6s ease infinite}
.shift .wblob .bd{animation:wcol 5.6s linear infinite}
.cy{position:relative;width:42px;height:42px;transform-origin:50% 100%;animation:cyHop 5.6s ease infinite}
.cy .mt{position:absolute;inset:0}
.cy .was{animation:fadeTop 5.6s linear infinite}
.cy.c1,.cy.c1 .was{animation-delay:.07s}.cy.c2,.cy.c2 .was{animation-delay:.14s}.cy.c3,.cy.c3 .was{animation-delay:.21s}.cy.c4,.cy.c4 .was{animation-delay:.28s}
@keyframes fadeTop{0%{opacity:1}43%{opacity:1}45.5%{opacity:0}92%{opacity:0}94.5%{opacity:1}100%{opacity:1}}
@keyframes cyHop{0%{transform:none}41%{transform:none}44%{transform:scale(1.12,.86)}47.5%{transform:translateY(-8px) scale(.94,1.06)}51%{transform:none}91%{transform:none}94%{transform:scale(1.12,.86)}97.5%{transform:translateY(-8px) scale(.94,1.06)}100%{transform:none}}
@keyframes wcol{0%{fill:#6fd6ff}43%{fill:#6fd6ff}45%{fill:#ff8fd1}93%{fill:#ff8fd1}95%{fill:#6fd6ff}100%{fill:#6fd6ff}}
.solvedill .wblob{--blob:#c9b6ff;animation:wh 3.2s ease infinite}
.wn{transform-origin:50% 100%;animation:wh 3.2s ease infinite}
.wn.c1{animation-delay:.08s}.wn.c2{animation-delay:.16s}.wn.c3{animation-delay:.24s}.wn.c4{animation-delay:.32s}
@keyframes wh{0%{transform:none}55%{transform:none}60%{transform:scale(1.14,.86)}68%{transform:translateY(-10px) scale(.92,1.1)}76%{transform:translateY(0) scale(1.08,.92)}82%{transform:none}100%{transform:none}}
.duelill{display:flex;align-items:center;justify-content:center;gap:12px;direction:ltr}
.duelill .who2{position:relative;width:54px;height:54px;display:flex;align-items:center;justify-content:center}
.duelill .who2 .blob{width:34px;height:33px}
.duelill .tring{position:absolute;inset:0;width:54px;height:54px}
.duelill .vs{position:static;margin:0;width:38px;height:38px;font-size:14px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.12),inset 0 3px 0 rgba(255,255,255,.4),0 4px 0 var(--rk-e)}
.gotit{margin-top:22px;flex:none}
.scr-rules{padding-bottom:calc(24px + var(--safe-b))}

/* ---------- solo (j-solo) ---------- */
.scr-solo{height:var(--vh);min-height:0;overflow:hidden;padding-bottom:calc(14px + var(--safe-b))}
.scr-solo .cols{flex:1;min-height:0;display:flex;flex-direction:column}
.scr-solo .colm{flex:1;min-height:0;display:flex;flex-direction:column}
.side{display:none}
.tries{margin-top:12px;min-height:24px;display:flex;align-items:center;justify-content:center;gap:12px;flex:none}
.tries .dchip{display:none}
.dots{display:flex;gap:6px;direction:ltr}
.dot{width:13px;height:13px;border-radius:50%;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.22);transition:background-color .3s ease .2s}
.dot.used{background:var(--a);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),inset 0 2px 0 rgba(255,255,255,.4),0 2px 0 var(--a-e)}
.dot.cur{background:var(--blob);box-shadow:inset 0 0 0 1.5px var(--ink),inset 0 -3px 0 rgba(0,0,0,.16),inset 0 2px 0 rgba(255,255,255,.55),0 2px 0 var(--ink);animation:dotbob 1.4s ease-in-out infinite}
.dot.win{background:var(--c);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),inset 0 2px 0 rgba(255,255,255,.45),0 2px 0 var(--c-e);animation:dotbob 1.4s ease-in-out infinite}
@keyframes dotbob{0%{transform:none}50%{transform:translateY(-3px) scale(1.08)}100%{transform:none}}
.tt{font-family:var(--nu);font-weight:800;font-size:16px;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap}
.bwrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;padding:10px 0 12px}
/* ten rows plus the keyboard fit on a 390x844 phone: the tile follows the height */
.scr-solo .board{--g:5px;--t:clamp(26px,calc((var(--vh) - 318px - var(--safe-t) - var(--safe-b)) / 10 - var(--g)),46px);transform-origin:50% 0;transition:transform .45s cubic-bezier(.3,1.2,.5,1)}
.scr-solo .toast-wrap{bottom:2px}
.scr-solo .kb{margin-top:6px}
/* win and lose sheets */
.sheet{position:fixed;left:50%;bottom:calc(16px + var(--safe-b));z-index:20;width:min(492px,calc(100vw - 28px));transform:translateX(-50%);animation:cardPop .7s cubic-bezier(.3,1.4,.5,1) both}
.sheet.lose{animation-name:cardUp;animation-duration:.6s}
@keyframes cardPop{0%{opacity:0;transform:translate(-50%,80px) scale(.8)}55%{opacity:1;transform:translate(-50%,-8px) scale(1.03,.97)}78%{transform:translate(-50%,0) scale(.99,1.01)}100%{opacity:1;transform:translateX(-50%)}}
@keyframes cardUp{0%{opacity:0;transform:translate(-50%,70px) scale(.9)}60%{opacity:1;transform:translate(-50%,-5px)}100%{opacity:1;transform:translateX(-50%)}}
.sheet .card{padding:18px 18px 18px;display:flex;flex-direction:column;align-items:stretch;gap:10px}
.wsp{position:absolute;overflow:visible;animation:twc 2.6s ease-in-out infinite;pointer-events:none}
@keyframes twc{0%{transform:scale(.85) rotate(0);opacity:.85}50%{transform:scale(1.15) rotate(18deg);opacity:1}100%{transform:scale(.85) rotate(0);opacity:.85}}
.wsp polygon{stroke:var(--ink);stroke-width:1.6;stroke-linejoin:round}
.ws1{left:4px;top:-14px;width:28px;height:28px}.ws1 polygon{fill:#ff9d3d}
.ws2{right:24px;top:-12px;width:20px;height:20px;animation-delay:-.9s}.ws2 polygon{fill:#6fd6ff}
.ws3{right:4px;top:58px;width:22px;height:22px;animation-delay:-1.7s}.ws3 polygon{fill:#ff8fd1}
.ws4{left:6px;top:104px;width:16px;height:16px;animation-delay:-.4s}.ws4 polygon{fill:#ffcd2e}
.ws5{left:46%;top:-18px;width:13px;height:13px;animation-delay:-1.3s}.ws5 polygon{fill:#34d16b}
.shead{min-height:56px;display:flex;align-items:center;justify-content:center;gap:12px}
.hblob{width:58px;height:55px}
.solved{display:flex;align-items:center;gap:9px;font-family:var(--fd);font-weight:700;font-size:34px;line-height:1;color:var(--txt);flex-wrap:wrap;justify-content:center}
.solved .mtn{position:relative;width:44px;height:44px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;font-size:28px;color:#fff;-webkit-text-stroke:5px var(--c-s);paint-order:stroke fill;background:var(--c);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 var(--c-e)}
.solved .mtn::before{content:"";position:absolute;left:6px;top:5px;width:13px;height:6px;border-radius:50%;background:rgba(255,255,255,.55);transform:rotate(-20deg)}
.solved .mtn span{position:relative}
.htx{display:flex;flex-direction:column;gap:5px;min-width:0}
.close-t{font-family:var(--fd);font-weight:700;font-size:34px;line-height:1;color:var(--txt)}
.wasw{font-family:var(--nu);font-weight:800;font-size:15px;line-height:1.15;color:var(--txt2)}
.wasw b{font-family:var(--fd);font-weight:700;font-size:17px;letter-spacing:.03em;color:var(--txt)}
.stats4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.st{min-height:56px;padding:6px 2px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:var(--lil);box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 3px 0 var(--lil2)}
.sn{display:flex;align-items:center;gap:3px;font-family:var(--fd);font-weight:700;font-size:24px;line-height:1;color:var(--txt);font-variant-numeric:tabular-nums}
.sl{font-family:var(--nu);font-weight:800;font-size:12px;line-height:1.1;color:var(--txt2);text-align:center}
.fl{width:18px;height:18px;flex:none;fill:#ff9d3d;stroke:var(--ink);stroke-width:2;stroke-linejoin:round}
.gbox{display:flex;flex-direction:column;gap:8px}
.gbox .lbl{text-align:start}
/* the guess distribution: 1 to 5 and 6 to 10 side by side so the sheet stays short */
.dist{display:grid;grid-template-columns:1fr 1fr;grid-auto-flow:column;grid-template-rows:repeat(5,auto);gap:4px 14px;direction:ltr}
.drw{display:flex;align-items:center;gap:6px;min-width:0}
.dnum{width:18px;flex:none;font-family:var(--nu);font-weight:900;font-size:13px;line-height:1;color:var(--txt);text-align:center;font-variant-numeric:tabular-nums}
.trk{flex:1;min-width:0;height:14px;border-radius:999px;display:flex;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.2)}
.fil{min-width:24px;max-width:100%;height:14px;padding:0 6px;border-radius:999px;display:flex;align-items:center;justify-content:flex-end;font-family:var(--nu);font-weight:900;font-size:11px;line-height:1;color:var(--txt);background:#fff;box-shadow:inset 0 -2px 0 rgba(58,42,138,.14)}
.fil.cur{color:#fff;-webkit-text-stroke:3px var(--c-s);paint-order:stroke fill;background:var(--c);box-shadow:inset 0 -2px 0 rgba(0,0,0,.16),inset 0 2px 0 rgba(255,255,255,.3)}
.sheet .acts{margin-top:4px}
.reset{align-self:center;height:32px;padding:0 14px 0 10px;border-radius:999px;display:flex;align-items:center;gap:6px;font-family:var(--nu);font-weight:800;font-size:14px;color:var(--txt2);background:var(--lil);box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 3px 0 var(--lil2)}
.reset .ico{width:18px;height:18px;stroke-width:2.2}
.scr-solo.over .kb{visibility:hidden}
/* game over on a phone: only the played rows stay, the sheet takes the bottom */
.scr-solo.over .row.unused{display:none}
.scr-solo.over .bwrap{justify-content:flex-start}

/* ---------- profile (j-profile) ---------- */
.scr-profile .hero{margin-top:6px}
.scr-profile .stage{width:110px;height:92px}
.scr-profile .bigblob{width:96px;height:92px;animation:idle 2.8s ease-in-out infinite}
.scr-profile .bigblob .bd{animation:none}
.plate{position:absolute;left:19px;bottom:-5px;width:72px;height:14px;border-radius:50%;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.18)}
.pname-big{margin:12px 0 0;font-family:var(--fd);font-weight:700;font-size:32px;line-height:1;letter-spacing:.01em;color:#fff;-webkit-text-stroke:7px var(--ink);paint-order:stroke fill;text-shadow:0 4px 0 var(--ink);overflow-wrap:anywhere;text-align:center}
.rate{margin-top:12px;display:flex;align-items:center;gap:10px}
.rchip{height:38px;padding:0 16px 0 11px;border-radius:999px;display:flex;align-items:center;gap:7px;background:#fff;color:var(--txt);font-family:var(--fd);font-weight:700;font-size:22px;line-height:1;font-variant-numeric:tabular-nums;box-shadow:inset 0 -3px 0 rgba(58,42,138,.1),0 4px 0 var(--candy-e),0 8px 14px rgba(25,8,100,.3)}
.tro{width:22px;height:22px;fill:#ffcd2e;stroke:var(--rk-s);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.chip b{font-weight:900}
.pstats{margin-top:18px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.pstats .st{min-height:66px;border-radius:20px;background:#fff;box-shadow:inset 0 -4px 0 rgba(58,42,138,.07),0 5px 0 var(--candy-e),0 10px 18px rgba(25,8,100,.3)}
.pstats .sn{font-size:28px}
.sec{margin-top:20px}
.h2w{font-family:var(--fd);font-weight:600;font-size:20px;line-height:1;color:#fff}
.pdist{margin-top:10px;display:flex;flex-direction:column;gap:5px;direction:ltr}
.pdist .dnum{color:#fff;font-size:14px}
.pdist .trk{height:16px;box-shadow:inset 0 3px 0 rgba(0,0,0,.18),inset 0 -2px 0 rgba(255,255,255,.08)}
.pdist .fil{height:16px;min-width:28px;font-size:12px;box-shadow:inset 0 -3px 0 rgba(58,42,138,.14),inset 0 2px 0 rgba(255,255,255,.4)}
.pcard{margin-top:22px;padding:14px 16px 8px;border-radius:26px}
.h2c{font-family:var(--fd);font-weight:600;font-size:20px;line-height:1;color:var(--txt)}
.rlist{margin:4px 0 0;padding:0;list-style:none;display:flex;flex-direction:column}
.ritem{min-height:48px;display:flex;align-items:center;gap:12px;border-top:2px solid var(--lil);padding:4px 0}
.ritem:first-child{border-top:0}
.rav{width:36px;height:34px}
.rtx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.rt1{font-family:var(--fd);font-weight:600;font-size:17px;line-height:1.1;color:var(--txt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rt2{font-family:var(--nu);font-weight:800;font-size:13px;line-height:1.1;color:var(--txt2)}
.dl{height:30px;padding:0 12px;border-radius:999px;display:flex;align-items:center;font-family:var(--fd);font-weight:700;font-size:18px;line-height:1;color:#fff;-webkit-text-stroke:4px transparent;paint-order:stroke fill;font-variant-numeric:tabular-nums;direction:ltr}
.dl.up{background:var(--go);-webkit-text-stroke-color:var(--go-s);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),inset 0 2px 0 rgba(255,255,255,.3),0 3px 0 var(--go-e)}
.dl.dn{background:var(--coral);-webkit-text-stroke-color:var(--coral-s);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),inset 0 2px 0 rgba(255,255,255,.3),0 3px 0 var(--coral-e)}
.empty-note{padding:10px 0 12px;font-family:var(--nu);font-weight:800;font-size:15px;line-height:1.35;color:var(--txt2)}

/* ---------- settings (j-settings) ---------- */
.scr-settings .card{padding:4px 16px;border-radius:26px;margin-top:24px}
.srow{position:relative;display:flex;align-items:center;gap:14px;min-height:68px;padding:10px 0;color:var(--txt);cursor:pointer}
.srow + .srow{border-top:2px solid var(--lil)}
.ri{flex:none;width:40px;height:40px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:var(--deep);box-shadow:inset 0 -3px 0 rgba(0,0,0,.12),inset 0 2px 0 rgba(255,255,255,.45)}
.ri .ico{stroke-width:2.2}
.ri .fill{fill:currentColor}
.ri .mk{position:static;width:24px;height:24px;min-width:0;min-height:0;opacity:1;transform:none}
.b1{background:#6fd6ff}.b2{background:#ff8fd1}.b3{background:#ff9d3d}.b4{background:#c9b6ff}
.rl{flex:1;min-width:0;font-family:var(--nu);font-weight:800;font-size:17px;line-height:1.25;color:var(--txt)}
.sw{position:relative;flex:none;width:58px;height:34px}
.swi{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.trk2{position:absolute;inset:0;border-radius:999px;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.25),inset 0 -2px 0 rgba(255,255,255,.08);transition:background-color .2s ease,box-shadow .2s ease;direction:ltr}
.knob{position:absolute;left:4px;top:4px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:inset 0 -3px 0 rgba(58,42,138,.12),0 2px 0 rgba(29,15,99,.45);transition:transform .28s cubic-bezier(.3,1.5,.5,1),box-shadow .2s ease}
.knob::before{content:"";position:absolute;left:6px;top:5px;width:8px;height:4px;border-radius:50%;background:rgba(207,198,255,.7);transform:rotate(-20deg)}
.swi:checked + .trk2{background:var(--go);box-shadow:inset 0 3px 0 rgba(0,0,0,.14),inset 0 -2px 0 rgba(255,255,255,.2)}
.swi:checked + .trk2 .knob{transform:translateX(24px);box-shadow:inset 0 -3px 0 rgba(58,42,138,.12),0 2px 0 var(--go-s)}
[dir=rtl] .trk2 .knob{left:auto;right:4px}
[dir=rtl] .swi:checked + .trk2 .knob{transform:translateX(-24px)}
.swi:focus-visible + .trk2{outline:3px solid var(--grape);outline-offset:3px}
.rest{flex:1;min-height:150px;display:flex;align-items:center;justify-content:center}
.rest .stage{width:110px;height:96px}
.rest .blob{width:92px;height:88px;--blob:#6fd6ff;animation:idle 3.2s ease-in-out infinite}
.rest .bshadow{left:22px;width:66px;height:12px;bottom:-5px;animation:none}
.foot{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap}
.foot .ulink{font-size:15px;padding:12px 10px}

/* ---------- ranked search (j-match) ---------- */
.scr-match{padding-bottom:calc(28px + var(--safe-b))}
.face{position:relative;margin-top:30px;display:flex;gap:12px}
.pc{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 12px;border-radius:28px;transition:background-color .3s ease}
.pc.me{--blob:#6fd6ff;background:#fff;box-shadow:inset 0 -6px 0 rgba(58,42,138,.07),0 7px 0 var(--candy-e),0 18px 30px rgba(25,8,100,.4)}
.pc.empty{background:var(--hole);box-shadow:inset 0 5px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06),0 7px 0 rgba(42,20,148,.55)}
.pc.op{--blob:#ff8fd1;background:var(--lil);box-shadow:inset 0 -6px 0 rgba(58,42,138,.08),0 7px 0 var(--lil2),0 18px 30px rgba(25,8,100,.3);animation:popIn .5s cubic-bezier(.3,1.5,.5,1) both}
@keyframes popIn{0%{transform:scale(.7);opacity:0}100%{transform:none;opacity:1}}
.av{position:relative;width:84px;height:84px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.pc.me .av,.pc.op .av{background:var(--lil);box-shadow:inset 0 3px 0 rgba(58,42,138,.12)}
.pc.op .av{background:#fff}
.pc .av .blob{width:62px;height:59px}
.pc.me .av .blob{animation:idle 2.8s ease-in-out infinite}
.pc .pname{min-height:26px;max-width:100%;display:flex;align-items:center;font-family:var(--fd);font-weight:700;font-size:24px;line-height:1;color:var(--txt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp{height:30px;padding:0 13px 0 9px;border-radius:999px;display:flex;align-items:center;gap:5px;background:var(--lil);color:var(--txt);font-family:var(--nu);font-weight:900;font-size:16px;font-variant-numeric:tabular-nums;box-shadow:inset 0 2px 0 rgba(58,42,138,.12)}
.pc.op .rp{background:#fff}
.rp .ico{width:17px;height:17px;color:var(--rk-s);stroke-width:2.4}
.slot{background:var(--ink);box-shadow:inset 0 5px 0 rgba(0,0,0,.25)}
.qm{font-family:var(--fd);font-weight:700;font-size:48px;line-height:1;color:#fff;text-shadow:0 0 14px rgba(255,255,255,.35);animation:qpulse 1.5s ease-in-out infinite}
@keyframes qpulse{0%{transform:scale(.9);opacity:.55}50%{transform:scale(1.14);opacity:1}100%{transform:scale(.9);opacity:.55}}
.slot::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:3px solid rgba(255,255,255,.35);animation:spulse 1.5s ease-out infinite}
@keyframes spulse{0%{transform:scale(.88);opacity:.9}100%{transform:scale(1.12);opacity:0}}
.bar{border-radius:999px;background:rgba(255,255,255,.14);animation:shim 1.6s ease-in-out infinite}
.bar.bn{width:60px;height:16px;margin:5px 0}
.bar.br{width:84px;height:30px;animation-delay:-.4s}
@keyframes shim{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}
.vs{position:absolute;left:50%;top:37px;z-index:2;width:46px;height:46px;margin-left:-23px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--rk);font-family:var(--fd);font-weight:700;font-size:17px;line-height:1;color:#fff;-webkit-text-stroke:4px var(--rk-s);paint-order:stroke fill;box-shadow:inset 0 -4px 0 rgba(0,0,0,.12),inset 0 3px 0 rgba(255,255,255,.4),0 4px 0 var(--rk-e),0 0 0 4px var(--grape)}
.mstage{--blob:#ff9d3d;flex:1;min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px}
.radar{position:relative;width:220px;height:210px;display:flex;align-items:flex-end;justify-content:center;padding-bottom:28px}
.wave{position:absolute;left:50%;top:50%;width:210px;height:210px;margin:-105px 0 0 -105px;border-radius:50%;border:3px solid rgba(255,255,255,.55);opacity:0;animation:wave2 2.4s ease-out infinite}
.wave.w2{animation-delay:.8s}
.wave.w3{animation-delay:1.6s}
@keyframes wave2{0%{transform:scale(.3);opacity:.8}100%{transform:scale(1.2);opacity:0}}
.mshadow{position:absolute;left:50%;bottom:20px;width:96px;height:16px;margin-left:-48px;border-radius:50%;background:rgba(29,15,99,.45);animation:mshad 1.1s cubic-bezier(.3,.7,.4,1) infinite}
@keyframes mshad{0%{transform:none;opacity:1}12%{transform:scale(1.1,1);opacity:1}40%{transform:scale(.55,.7);opacity:.45}62%{transform:scale(1.12,1);opacity:1}100%{transform:none;opacity:1}}
.mbig{position:relative;width:124px;height:119px;animation:mhop 1.1s cubic-bezier(.3,.7,.4,1) infinite}
@keyframes mhop{0%{transform:none}12%{transform:scale(1.18,.82)}40%{transform:translateY(-46px) scale(.9,1.12)}62%{transform:translateY(0) scale(1.16,.84)}78%{transform:scale(.96,1.04)}100%{transform:none}}
.mbig .ep{animation:look 2.2s ease-in-out infinite}
@keyframes look{0%{transform:translateX(-2.2px)}45%{transform:translateX(-2.2px)}55%{transform:translateX(1.6px)}95%{transform:translateX(1.6px)}100%{transform:translateX(-2.2px)}}
.mstatus{display:flex;align-items:center;justify-content:center;gap:10px;text-align:center;min-height:34px}
.find{font-family:var(--fd);font-weight:700;font-size:27px;line-height:1.1;color:#fff;-webkit-text-stroke:6px var(--ink);paint-order:stroke fill;text-shadow:0 3px 0 var(--ink)}
.ld{display:inline-flex;align-items:center;gap:6px;padding-top:6px}
.ld span{width:9px;height:9px;border-radius:50%;background:#fff;box-shadow:0 0 0 2.5px var(--ink);animation:ldot 1.2s ease-in-out infinite}
.ld span:nth-child(2){animation-delay:.16s}
.ld span:nth-child(3){animation-delay:.32s}
@keyframes ldot{0%{transform:none;opacity:.45}30%{transform:translateY(-8px);opacity:1}60%{transform:none;opacity:.45}100%{transform:none;opacity:.45}}
.cancel{align-self:center;width:240px;max-width:100%}

/* ---------- duel (j-duel) ---------- */
.scr-duel{height:var(--vh);min-height:0;overflow:hidden;padding-top:calc(14px + var(--safe-t));padding-bottom:calc(14px + var(--safe-b))}
.top .logo{justify-self:center}
.dgrid{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-areas:"me op" "turn turn" "board board" "kb kb";column-gap:10px;margin-top:10px}
.pl{grid-area:me;min-width:0;min-height:104px;display:flex;align-items:center;gap:9px;padding:8px;border-radius:26px;color:var(--txt);transition:transform .3s ease}
.pl.me{--blob:#6fd6ff;background:#fff;box-shadow:inset 0 -5px 0 rgba(58,42,138,.07),0 6px 0 var(--candy-e),0 14px 24px rgba(25,8,100,.4)}
.pl.op{grid-area:op;--blob:#ff8fd1;background:var(--lil);box-shadow:inset 0 -5px 0 rgba(58,42,138,.08),0 6px 0 var(--lil2),0 14px 24px rgba(25,8,100,.3)}
.pav-w{position:relative;width:70px;height:70px;flex:none;display:flex;align-items:center;justify-content:center}
.tring{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;transform:rotate(-90deg)}
.tr-bg{fill:none;stroke:var(--hole);stroke-width:7}
.pl.op .tr-bg{stroke:var(--lil2)}
.tr-arc{fill:none;stroke:var(--go);stroke-width:7;stroke-linecap:round;stroke-dasharray:191.64;stroke-dashoffset:191.64;transition:stroke .3s ease;opacity:0}
.pl.is-turn .tr-arc{opacity:1}
.pl.low .tr-arc{stroke:var(--coral)}
.pav-w .blob{position:relative;width:44px;height:42px}
.pl.is-turn .pav-w .blob{animation:idle 1.6s ease-in-out infinite}
.tbadge{position:absolute;left:50%;bottom:-8px;z-index:1;height:22px;padding:0 8px;transform:translateX(-50%);border-radius:999px;display:flex;align-items:center;background:var(--hole);color:#fff;font-family:var(--nu);font-weight:900;font-size:13px;line-height:1;font-variant-numeric:tabular-nums;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2),0 2px 0 var(--ink);direction:ltr}
.pl:not(.is-turn) .tbadge{visibility:hidden}
.pl.low .tbadge{background:var(--coral);box-shadow:inset 0 -2px 0 rgba(0,0,0,.2),0 2px 0 var(--coral-e)}
.pinfo{min-width:0;display:flex;flex-direction:column;gap:5px}
.pl .pname{font-family:var(--fd);font-weight:700;font-size:20px;line-height:1.05;color:var(--txt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prate{display:flex;align-items:center;gap:3px;font-family:var(--nu);font-weight:900;font-size:15px;line-height:1;color:var(--txt);font-variant-numeric:tabular-nums}
.prate .ico{width:15px;height:15px;color:var(--rk-s);stroke-width:2.4}
.prate.hide{visibility:hidden}
.skips{display:flex;align-items:center;gap:3px;margin-top:1px}
.skd{display:flex;gap:3px;direction:ltr}
.sk{width:10px;height:10px;flex:none;border-radius:50%}
.sk.on{background:var(--blob);box-shadow:inset 0 0 0 1.6px var(--ink),inset 0 -3px 0 rgba(0,0,0,.12)}
.sk.off{background:var(--lil2);box-shadow:inset 0 2px 0 rgba(58,42,138,.18)}
.pl.op .sk.off{background:#fff}
.skl{margin-inline-start:3px;font-family:var(--nu);font-weight:800;font-size:12px;line-height:1;color:var(--txt2)}
.pstat,.leave{display:none}
.turnrow{grid-area:turn;display:flex;align-items:center;justify-content:center;margin-top:14px;min-width:0}
.turnrow .chip,.turnrow .tt{display:none}
.turn{height:34px;max-width:100%;padding:0 16px 0 8px;display:flex;align-items:center;gap:7px;border-radius:999px;background:#fff;box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 4px 0 var(--candy-e),0 10px 18px rgba(25,8,100,.35);font-family:var(--fd);font-weight:700;font-size:18px;line-height:1;color:var(--txt);animation:tbob 1.8s ease-in-out infinite;white-space:nowrap;overflow:hidden}
.turn span{overflow:hidden;text-overflow:ellipsis}
.turn .blob{width:24px;height:23px}
.turn.them{background:var(--lil);animation:none;box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 4px 0 var(--lil2),0 10px 18px rgba(25,8,100,.3)}
.turn.done{animation:none}
@keyframes tbob{0%{transform:none}50%{transform:translateY(-3px)}100%{transform:none}}
.dwrap{grid-area:board;position:relative;min-height:0;display:flex;flex-direction:column;margin-top:8px}
.dboard{--t:48px;--g:6px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--circle) transparent;padding:10px 4px 12px;display:flex;flex-direction:column;gap:var(--g);direction:ltr;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 14px,#000 calc(100% - 6px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 14px,#000 calc(100% - 6px),transparent 100%)}
.w-no::before{content:"";width:14px;height:14px;border-radius:50%;background:var(--hole);box-shadow:inset 0 2px 0 rgba(0,0,0,.22)}
.drow{display:flex;align-items:center;justify-content:center;gap:8px;flex:none}
.who{position:relative;width:28px;height:28px;flex:none;display:flex;align-items:center;justify-content:center}
.who .blob{width:28px;height:27px}
.who .eyes{animation:none}
.w-me{--blob:#6fd6ff}
.w-op{--blob:#ff8fd1}
.drow.act .who .blob{animation:mbob 1.2s ease-in-out infinite}
@keyframes mbob{0%{transform:none}30%{transform:translateY(-4px) scale(.94,1.06)}60%{transform:scale(1.08,.92)}100%{transform:none}}
.wgap{width:28px;flex:none}
.drow .row{gap:var(--g)}
.drow.act .cell{box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 0 0 2px rgba(255,255,255,.2)}
.drow.act .cell.cur{box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 0 0 3px rgba(255,255,255,.75)}
.drow.act .cell.cur::after{inset:auto;left:50%;top:26%;width:3px;height:48%;margin-left:-1.5px;border-radius:2px;background:#fff;box-shadow:none;animation:caret 1.05s steps(1) infinite}
@keyframes caret{0%{opacity:1}50%{opacity:0}100%{opacity:0}}
.drow.wait .cell{opacity:.6}
.drow.wait .cell:nth-child(2)::after,.drow.wait .cell:nth-child(3)::after,.drow.wait .cell:nth-child(4)::after{content:"";position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:rgba(255,255,255,.7);animation:ldot 1.2s ease-in-out infinite}
.drow.wait .cell:nth-child(3)::after{animation-delay:.16s}
.drow.wait .cell:nth-child(4)::after{animation-delay:.32s}
.drow.skip .who .blob{opacity:.7}
.skipnote{width:calc(var(--t) * 5 + var(--g) * 4);height:30px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:6px;font-family:var(--nu);font-weight:800;font-size:13px;color:var(--lil2);background:rgba(29,15,99,.35);box-shadow:inset 0 3px 0 rgba(0,0,0,.18)}
.skipnote .ico{width:16px;height:16px;stroke-width:2.4}
.dwrap .toast-wrap{bottom:8px}
.scr-duel .kb{grid-area:kb;margin-top:8px}

/* ---------- duel result (j-duel-result) ---------- */
.scr-dres{padding-bottom:calc(22px + var(--safe-b))}
.dmain{flex:1;display:flex;flex-direction:column;justify-content:center;gap:14px;padding:12px 0}
.dhero{--blob:#6fd6ff;position:relative;display:flex;flex-direction:column;align-items:center;gap:6px}
.dhero .blob{width:120px;height:115px}
.dhero.lost{--blob:#ff8fd1}
.won-t{font-family:var(--fd);font-weight:700;font-size:50px;line-height:1.05;color:#fff;-webkit-text-stroke:9px var(--ink);paint-order:stroke fill;text-shadow:0 5px 0 var(--ink);text-align:center;overflow-wrap:anywhere}
.why{font-family:var(--nu);font-weight:800;font-size:16px;color:#fff;text-align:center}
.dhero .ws1{left:62px;top:14px}.dhero .ws2{right:74px;top:0;left:auto}.dhero .ws3{right:48px;top:70px}.dhero .ws4{left:40px;top:88px}.dhero .ws5{left:calc(50% - 60px);top:-6px}
.rc{display:flex;align-items:center;gap:12px;border-radius:28px;color:var(--txt)}
.rc.me{--blob:#6fd6ff;min-height:108px;padding:10px 14px 10px 12px;background:#fff;box-shadow:inset 0 -6px 0 rgba(58,42,138,.07),0 8px 0 var(--candy-e),0 22px 40px rgba(25,8,100,.5)}
.rc.op{--blob:#ff8fd1;min-height:78px;padding:10px 14px 10px 12px;background:var(--lil);box-shadow:inset 0 -5px 0 rgba(58,42,138,.08),0 6px 0 var(--lil2),0 14px 24px rgba(25,8,100,.3)}
.ra{flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--lil);box-shadow:inset 0 3px 0 rgba(58,42,138,.12)}
.rc.me .ra{width:76px;height:76px}
.rc.me .ra .blob{width:56px;height:54px;animation:idle 2.8s ease-in-out infinite}
.rc.op .ra{width:54px;height:54px;background:#fff}
.rc.op .ra .blob{width:40px;height:38px}
.rinfo{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px}
.rname{font-family:var(--fd);font-weight:700;font-size:24px;line-height:1;color:var(--txt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rc.op .rname{font-size:20px}
.rline{display:flex;align-items:center;gap:5px;font-family:var(--nu);font-weight:900;font-size:19px;line-height:1;color:var(--txt);font-variant-numeric:tabular-nums;direction:ltr;justify-content:flex-start}
[dir=rtl] .rline{justify-content:flex-end}
.rc.op .rline{font-size:15px}
.rline .old{color:var(--txt2)}
.rline .ico{width:15px;height:15px;color:var(--txt2);stroke-width:3}
.delta{flex:none;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:700;line-height:1;color:#fff;paint-order:stroke fill;font-variant-numeric:tabular-nums;direction:ltr}
.delta.big{height:64px;padding:0 16px;border-radius:22px;font-size:40px;-webkit-text-stroke-width:7px}
.delta.sm{height:44px;padding:0 12px;border-radius:16px;font-size:26px;-webkit-text-stroke-width:5px}
.delta.up{-webkit-text-stroke-color:var(--go-s);background:var(--go);box-shadow:inset 0 -5px 0 rgba(0,0,0,.14),inset 0 3px 0 rgba(255,255,255,.3),0 5px 0 var(--go-e)}
.delta.up.big{animation:bob 1.4s ease-in-out infinite}
.delta.dn{-webkit-text-stroke-color:#a3192f;background:var(--coral);box-shadow:inset 0 -4px 0 rgba(0,0,0,.14),inset 0 3px 0 rgba(255,255,255,.3),0 4px 0 #d93a50}
.score{font-family:var(--fd);font-weight:700;font-size:34px;line-height:1;color:var(--txt);font-variant-numeric:tabular-nums}
.path{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 14px 18px;border-radius:28px}
.solvedby{--blob:#6fd6ff;display:flex;align-items:center;gap:8px;margin-top:2px;font-family:var(--fd);font-weight:600;font-size:20px;line-height:1.1;color:var(--txt);text-align:center}
.solvedby.them{--blob:#ff8fd1}
.solvedby .blob{width:26px;height:25px}
.scr-dres .acts{margin-top:10px}
.scr-dres .acts .alt{width:118px;flex:none}
.scr-dres .ulink{align-self:center;margin-top:6px}
.rwait{align-self:center;margin-top:8px;font-family:var(--nu);font-weight:800;font-size:15px;color:#fff;display:flex;align-items:center;gap:8px}

/* ---------- play a friend: the room (j-room) ---------- */
.scr-room .ttl,.scr-join .ttl{font-size:26px;-webkit-text-stroke-width:6px;white-space:nowrap}
.code{margin-top:18px;display:flex;flex-direction:column;align-items:center;gap:10px}
.cap{font-family:var(--nu);font-weight:800;font-size:15px;line-height:18px;letter-spacing:.06em;text-transform:uppercase;color:var(--candy-e)}
.codes{display:flex;justify-content:center;gap:10px;direction:ltr}
.codes .cell{--t:68px}
.codes .tile{opacity:1;transform:none;color:var(--txt);background:#fff;box-shadow:inset 0 -4px 0 rgba(58,42,138,.12),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 #b9adf5;animation:wave 3s ease-in-out infinite}
.codes .c1 .tile{animation-delay:.14s}.codes .c2 .tile{animation-delay:.28s}.codes .c3 .tile{animation-delay:.42s}
.codes.pending .tile{opacity:.25}
.share{margin-top:24px;display:flex;flex-direction:column;gap:14px;padding:20px 16px}
.lead{text-align:center;font-family:var(--fd);font-weight:600;font-size:21px;line-height:24px;color:var(--txt)}
.field{min-height:54px;padding:0 16px;border-radius:18px;display:flex;align-items:center;gap:10px;background:var(--hole);box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06);direction:ltr}
.field .ico{color:var(--lil2);stroke-width:2.4}
.url{min-width:0;font-family:var(--nu);font-weight:800;font-size:17px;line-height:1.2;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:all;-webkit-user-select:all}
.url b{font-weight:900;letter-spacing:.04em}
.share .acts .cbtn{flex:1 1 0;min-width:0;padding:0 10px}
.share .acts .go{flex:1.15 1 0;font-size:20px}
.share .acts .alt{font-size:18px}
.lobby{margin-top:auto;padding-top:18px;display:flex;gap:14px}
.lslot{flex:1 1 0;min-width:0;min-height:190px;border-radius:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:16px 12px}
.lslot.me{background:#fff;box-shadow:inset 0 -6px 0 rgba(58,42,138,.07),0 7px 0 var(--candy-e),0 18px 30px rgba(25,8,100,.42)}
.lslot.wait{background:var(--hole);box-shadow:inset 0 5px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06)}
.lslot.here{background:var(--lil);box-shadow:inset 0 -6px 0 rgba(58,42,138,.08),0 7px 0 var(--lil2),0 18px 30px rgba(25,8,100,.3);animation:popIn .5s cubic-bezier(.3,1.5,.5,1) both}
.lslot .blob{width:92px;height:88px;animation:idle 2.8s ease-in-out infinite}
.lslot .who-n{font-family:var(--fd);font-weight:700;font-size:22px;line-height:1.05;color:var(--txt);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ghost{width:92px;height:88px;flex:none;overflow:visible;animation:ghostP 2.2s ease-in-out infinite}
@keyframes ghostP{0%{transform:scale(.94);opacity:.55}50%{transform:scale(1.03);opacity:1}100%{transform:scale(.94);opacity:.55}}
.wt{max-width:150px;text-align:center;font-family:var(--nu);font-weight:800;font-size:15px;line-height:20px;color:#fff}
.dots3{display:inline-flex;gap:4px;margin-inline-start:5px;vertical-align:middle}
.dots3 span{width:6px;height:6px;border-radius:50%;background:currentColor;animation:run 1.2s ease-in-out infinite}
.dots3 span:nth-child(2){animation-delay:.15s}
.dots3 span:nth-child(3){animation-delay:.3s}
@keyframes run{0%{transform:none;opacity:.35}30%{transform:translateY(-5px);opacity:1}60%{transform:none;opacity:.35}100%{transform:none;opacity:.35}}
.joinl{margin-top:18px;align-self:center;min-height:54px;padding:0 18px 0 24px;border-radius:999px;display:flex;align-items:center;gap:8px;text-decoration:none;background:var(--hole);box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06)}
.joinl:active{transform:translateY(2px)}
.jq{font-family:var(--nu);font-weight:800;font-size:16px;color:var(--lil2)}
.ja{font-family:var(--nu);font-weight:900;font-size:17px;color:#fff;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.joinl .ico{width:18px;height:18px;color:#fff;stroke-width:3}
.msgwrap{flex:1;display:flex;flex-direction:column;justify-content:center;gap:28px;padding-bottom:40px}
.msg{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center}
.msg .blob{width:96px;height:92px}
.msg p{font-family:var(--fd);font-weight:600;font-size:22px;line-height:1.25;color:#fff;max-width:320px}

/* ---------- join a friend (j-join) ---------- */
.jstage{margin:auto 0;padding:16px 0;display:flex;flex-direction:column;align-items:center}
.jstage > .blob{position:relative;z-index:2;width:112px;height:107px;margin-bottom:-28px;--blob:#6fd6ff;animation:idle 2.8s ease-in-out infinite}
.jstage > .blob .ep{transform:translate(-.6px,1.8px)}
.jcard{position:relative;z-index:1;width:100%;padding:40px 20px 22px;display:flex;flex-direction:column;align-items:center;gap:16px}
.jlbl{font-family:var(--fd);font-weight:600;font-size:22px;line-height:26px;color:var(--txt);text-align:center;cursor:pointer}
.jcodes{display:flex;justify-content:center;gap:12px;margin-bottom:6px;direction:ltr}
.jcell{position:relative;width:64px;height:64px;border-radius:18px;background:var(--hole);box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06)}
.jcell.cur{box-shadow:inset 0 4px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.06),0 0 0 3px var(--lil2)}
.jcell .jt{position:absolute;inset:0;border-radius:18px;background:#fff;box-shadow:inset 0 -4px 0 rgba(58,42,138,.12),inset 0 3px 0 rgba(255,255,255,.35),0 4px 0 #b9adf5;opacity:0;transform:scale(.5);transform-origin:50% 100%;pointer-events:none}
.jcell .jt::before{content:"";position:absolute;left:8px;top:6px;width:16px;height:7px;border-radius:50%;background:rgba(255,255,255,.55);transform:rotate(-20deg)}
.jcell.on .jt{opacity:1;transform:none;animation:popT .28s cubic-bezier(.3,1.6,.5,1)}
.jinp{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:18px;background:transparent;text-align:center;font-family:var(--fd);font-weight:700;font-size:34px;line-height:1;color:var(--txt);caret-color:transparent;text-transform:uppercase;outline:0;cursor:pointer}
.jinp:focus-visible{outline:3px solid var(--deep);outline-offset:4px}
.jcell.cur:not(.on)::after{content:"";position:absolute;z-index:2;left:50%;top:15px;bottom:15px;width:3px;margin-left:-1.5px;border-radius:2px;background:#fff;pointer-events:none;animation:caret 1.05s steps(1) infinite}
.jcard .go{align-self:stretch;height:58px;font-size:26px}
.jerr{min-height:20px;font-family:var(--nu);font-weight:900;font-size:15px;color:#c0203a;text-align:center}
.scr-join .kb{margin-top:8px}

/* ---------- tablets: same column, bigger jelly ---------- */
@media (min-width:600px) and (max-width:1099px) and (min-height:800px){
  .scr-solo .board{--g:6px;--t:clamp(26px,calc((var(--vh) - 330px - var(--safe-t) - var(--safe-b)) / 10 - var(--g)),58px)}
  .dboard{--t:56px;--g:7px}
}

/* ---------- small heights: squeeze the keyboard and the gaps ---------- */
@media (max-height:740px){
  .kb{--kh:44px;gap:7px}
  .scr-solo{padding-top:calc(10px + var(--safe-t))}
  .scr-solo .board{--t:clamp(24px,calc((var(--vh) - 280px - var(--safe-t) - var(--safe-b)) / 10 - var(--g)),46px)}
  .tries{margin-top:6px}
  .pl{min-height:88px}
  .pav-w{width:60px;height:60px}
  .pav-w .blob{width:38px;height:36px}
  .turnrow{margin-top:10px}
  .hero{margin-top:14px}
  .modes{margin-top:24px;gap:14px}
  .cb{min-height:76px}
}
@media (max-width:360px){
  .krow{gap:4px}
  .krow.mid{padding:0 12px}
  .key{font-size:17px}
  .pl{gap:6px;padding:6px}
  .pav-w{width:58px;height:58px}
  .pl .pname{font-size:17px}
  .logo{font-size:23px}
}

/* ---------- motion off ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0ms!important;transition-duration:.01ms!important;transition-delay:0ms!important;scroll-behavior:auto!important}
  .bst{display:none}
  .mk-up .mk{filter:none}
}

/* ---------- right to left ---------- */
[dir=rtl] .back .ico,[dir=rtl] .chev,[dir=rtl] .joinl .ico,[dir=rtl] .toast .ico{transform:scaleX(-1)}

/* ---------- the site header, desktop only ---------- */
.site-hd{display:none}

/* =====================================================================================
   Desktop, from 1100px (jd-home, jd-solo, jd-duel, jd-result). The other screens keep
   their phone layout in a centred column under the site header
   ===================================================================================== */
@media (min-width:1100px){
  .ci1{width:440px;height:440px;left:-170px;top:-190px}
  .ci2{width:150px;height:150px;left:31%;top:5%}
  .ci3{width:360px;height:360px;left:auto;right:-130px;top:90px}
  .ci4{width:120px;height:120px;left:3%;top:62%}
  .ci5{width:540px;height:540px;left:22%;top:80%}
  .ci6{width:240px;height:240px;left:auto;right:7%;top:72%}
  .sp1{left:3%;top:17%}.sp2{left:37%;top:4%}.sp3{left:auto;right:3%;top:44%}
  .sp4{left:21%;top:86%}.sp5{left:auto;right:27%;top:11%}.sp6{left:71%;top:92%}

  .site-hd{position:relative;z-index:2;display:flex;align-items:center;gap:18px;max-width:1440px;height:88px;margin:0 auto;padding:0 40px}
  .site-hd .brand{gap:8px;justify-content:flex-start}
  .site-hd .blob{width:46px;height:44px;animation:idle 2.8s ease-in-out infinite}
  .site-hd .logo{font-size:30px}
  .site-hd .nav{margin-inline-start:auto;display:flex;align-items:center;gap:14px}
  .nlink{height:46px;padding:0 10px;display:flex;align-items:center;font-family:var(--nu);font-weight:800;font-size:16px;color:#fff;text-decoration:none;border-radius:12px}
  .nlink:hover,.nlink[aria-current=page]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
  .site-hd .rbtn .pblob{width:32px;height:31px}

  .scr{min-height:calc(var(--vh) - 88px);padding:8px 0 40px;max-width:560px}
  .scr .top .logo,.scr .top .brand{visibility:hidden}

  /* home */
  .scr-home{max-width:1440px;padding:0 40px}
  .mtop,.scr-home .how{display:none}
  .hwrap{flex:1 1 auto;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:48px 64px;padding:16px 0 48px}
  .lc{flex:1 1 460px;min-width:0;max-width:640px;display:flex;flex-direction:column;justify-content:center;gap:38px}
  .scr-home .hero{margin:0;align-items:flex-start}
  .scr-home .stage{display:none}
  .scr-home .logo-big{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}
  .scr-home .slogan{margin:0;max-width:none;text-align:start;font-family:var(--fd);font-weight:700;font-size:56px;line-height:1.1;letter-spacing:.005em;color:#fff;-webkit-text-stroke:10px var(--ink);paint-order:stroke fill;text-shadow:0 6px 0 var(--ink)}
  .scr-home .modes{margin:0;max-width:520px}
  .cb{min-height:92px;padding:10px 22px 10px 16px;border-radius:28px}
  .cbi{width:60px;height:60px;border-radius:50%}
  .cbi .ico{width:30px;height:30px;stroke-width:2.4}
  .cbn{font-size:30px}
  .cbs{font-size:16px}
  .demo-col{flex:1 1 460px;min-width:0;display:flex;justify-content:center}
  .demo{position:relative;display:flex;flex-direction:column;align-items:center;gap:18px;padding-bottom:96px}
  .demo .board{--g:7px;--t:clamp(34px,calc((var(--vh) - 88px - 220px) / 10 - var(--g)),58px)}
  .demo .tries{margin:0}
  .demo .dot{width:15px;height:15px}
  .demo .toast-wrap{bottom:14px;left:-120px;right:-120px}
  .winp{display:flex;align-items:center;gap:12px;padding:12px 22px 14px 14px;border-radius:30px}
  .winp .tblob{width:48px;height:46px}
  .wtx{display:flex;flex-direction:column;gap:8px}
  .winp .chain{flex-wrap:nowrap;justify-content:flex-start}
  .winp .pill{height:30px;padding:0 9px;font-size:14px}
  .winp .pill.fin{height:30px;font-size:15px;animation:none}
  .about{padding:24px 40px 64px}
  .about-in{max-width:1100px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);align-items:start;gap:32px}
  .about-in > :first-child{grid-row:span 2}

  /* solo */
  .scr-solo{max-width:1440px;height:calc(var(--vh) - 88px);padding:0 40px 18px}
  .scr-solo .top{display:none}
  .scr-solo .cols{flex-direction:row;align-items:flex-start;gap:32px}
  .scr-solo .colm{flex:999 1 560px;align-items:center;height:100%}
  .side{flex:1 1 280px;min-width:250px;max-width:380px;display:flex;flex-direction:column;gap:28px;padding-top:52px}
  .chead{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px}
  .ctitle{font-family:var(--fd);font-weight:700;font-size:22px;line-height:1.1;color:var(--txt)}
  .hsteps{margin:14px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:18px}
  .hstep{display:grid;grid-template-columns:28px 1fr;gap:12px;align-items:start}
  .hnum{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:700;font-size:15px;line-height:1;color:#fff;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.08)}
  .hstx{display:flex;flex-direction:column;gap:10px;padding-top:3px}
  .hstp{font-family:var(--nu);font-weight:800;font-size:15px;line-height:1.3;color:var(--txt)}
  .legend{display:flex;flex-direction:column;gap:8px}
  .lgr{display:flex;align-items:center;gap:10px;font-family:var(--nu);font-weight:800;font-size:14px;line-height:1.2;color:var(--txt2)}
  .lg2{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font-family:var(--nu);font-weight:800;font-size:14px;line-height:1.2;color:var(--txt2)}
  .lgi{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
  .mini{position:relative;width:30px;height:30px;flex:none;border-radius:9px;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:700;font-size:17px;line-height:1;color:#fff;-webkit-text-stroke:3px transparent;paint-order:stroke fill}
  .mini::before{content:"";position:absolute;left:4px;top:3px;width:9px;height:4px;border-radius:50%;background:rgba(255,255,255,.55);transform:rotate(-20deg)}
  .mini .ch{position:relative}
  .mini .mk{top:-6px;right:-6px;width:16px;height:16px;min-width:0;min-height:0;opacity:1;transform:none;filter:none;animation:none}
  .mini.mx{animation:mAA 4.4s ease-in-out infinite both}
  .mini.mx.d1{animation-delay:.07s}.mini.mx.d2{animation-delay:.14s}.mini.mx.d3{animation-delay:.21s}.mini.mx.d4{animation-delay:.28s}
  @keyframes mAA{0%{transform:none}40%{transform:none}46%{transform:translateY(-4px) scale(1.1,.9)}50%{transform:none}90%{transform:none}96%{transform:translateY(-4px) scale(1.1,.9)}100%{transform:none}}
  .stats3{margin-top:14px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .stats3 .st{padding:12px 4px 10px;min-height:0}
  .stats3 .sn{font-size:28px}
  .stats3 .sl{font-size:13px}
  .gl{margin:14px 0 0;display:flex;flex-direction:column;gap:8px}
  .gr{min-height:50px;padding:0 16px;border-radius:16px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--lil);box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 3px 0 var(--lil2)}
  .gr dt{font-family:var(--nu);font-weight:800;font-size:15px;color:var(--txt2)}
  .gr dd{white-space:nowrap;margin:0;font-family:var(--fd);font-weight:700;font-size:22px;line-height:1;color:var(--txt);font-variant-numeric:tabular-nums}
  .tries{margin-top:0;min-height:34px;gap:16px}
  .tries .dchip{display:inline-flex}
  .dots{gap:7px}
  .dot{width:15px;height:15px}
  .scr-solo .bwrap{flex:1;width:100%;padding:14px 0 10px;justify-content:flex-start;align-items:center}
  .scr-solo .board{--g:7px;--t:clamp(34px,calc((var(--vh) - 88px - 18px - 34px - 24px - 196px) / 10 - var(--g)),64px)}
  .scr-solo .toast-wrap{bottom:auto;top:45%}
  .scr-solo .kb,.scr-duel .kb{--kh:52px;width:100%;max-width:560px;margin:8px auto 0;gap:10px}
  .scr-solo .krow,.scr-duel .krow{gap:7px}
  .scr-solo .krow.mid,.scr-duel .krow.mid{padding:0 26px}
  .scr-solo .key,.scr-duel .key{border-radius:12px;font-size:21px}
  .scr-solo .key.wide,.scr-duel .key.wide{font-size:13px;letter-spacing:.04em}
  /* game over: the board keeps the middle, the result card takes the right column */
  .scr-solo.over .side,.scr-solo.over .kb,.scr-solo.over .tries .dchip{display:none}
  .scr-solo.over .cols{justify-content:center;gap:56px}
  .scr-solo.over .colm{flex:0 1 auto}
  .scr-solo .sheet{position:relative;left:auto;bottom:auto;transform:none;width:auto;flex:0 1 520px;min-width:420px;margin-top:64px;animation-name:cardPopD}
  .scr-solo .sheet.lose{animation-name:cardUpD}
  @keyframes cardPopD{0%{opacity:0;transform:translateY(60px) scale(.85)}55%{opacity:1;transform:translateY(-8px) scale(1.03,.97)}78%{transform:translateY(0) scale(.99,1.01)}100%{opacity:1;transform:none}}
  @keyframes cardUpD{0%{opacity:0;transform:translateY(50px) scale(.92)}60%{opacity:1;transform:translateY(-5px)}100%{opacity:1;transform:none}}
  .scr-solo .sheet .card{padding:56px 28px 26px;align-items:center;gap:12px}
  .scr-solo .sheet .hblob{position:absolute;left:50%;top:-46px;width:96px;height:92px;margin-left:-48px}
  .scr-solo .sheet .shead{min-height:0}
  .scr-solo .sheet .solved,.scr-solo .sheet .close-t{font-size:44px}
  .scr-solo .sheet .htx{align-items:center;text-align:center}
  .scr-solo .sheet .stats4,.scr-solo .sheet .gbox,.scr-solo .sheet .acts{align-self:stretch}
  .scr-solo .sheet .pill{height:38px;padding:0 11px;font-size:16px}
  .scr-solo .sheet .pill.fin{height:46px;padding:0 14px;font-size:20px;-webkit-text-stroke-width:5px}
  .scr-solo .sheet .arr{width:14px;height:14px}
  .scr-solo .sheet .st{min-height:0;padding:13px 4px 11px}
  .scr-solo .sheet .sn{font-size:30px}
  .scr-solo .sheet .sl{font-size:13px}
  .scr-solo .sheet .dist{grid-template-columns:1fr;grid-auto-flow:row;grid-template-rows:none;gap:6px}
  .scr-solo .sheet .trk{height:22px;padding:3px}
  .scr-solo .sheet .fil{height:16px;font-size:12px}
  .scr-solo .sheet .dnum{font-family:var(--fd);font-weight:700;font-size:16px}
  .scr-solo.over .board{transform:none!important}
  .scr-solo.over .row.unused{display:flex}
  .scr-solo.over .bwrap{justify-content:center}

  /* duel */
  .scr-duel{max-width:1440px;height:calc(var(--vh) - 88px);padding:0 40px 18px}
  .scr-duel .top{display:none}
  .dgrid{grid-template-columns:minmax(240px,1fr) minmax(0,600px) minmax(240px,1fr);grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"me turn op" "me board op" "me kb op";column-gap:32px;margin-top:0}
  .pl{align-self:start;margin-top:52px;flex-direction:column;align-items:center;gap:0;padding:26px 22px 24px;border-radius:30px;min-height:0}
  .pl.me{box-shadow:inset 0 -6px 0 rgba(58,42,138,.07),0 8px 0 var(--candy-e),0 22px 40px rgba(25,8,100,.5)}
  .pl.op{background:#fff;box-shadow:inset 0 -6px 0 rgba(58,42,138,.07),0 8px 0 var(--candy-e),0 22px 40px rgba(25,8,100,.5)}
  .pl.op .tr-bg{stroke:var(--lil)}
  .pl.is-turn .tr-bg{stroke:var(--hole)}
  .pav-w{width:148px;height:148px}
  .pav-w .blob{width:88px;height:84px}
  .tbadge{display:none}
  .pinfo{align-items:center;gap:0}
  .pl .pname{margin-top:14px;font-size:30px;max-width:100%}
  .prate{margin-top:8px;gap:6px;font-family:var(--fd);font-weight:700;font-size:22px}
  .prate .ico{width:22px;height:22px}
  .pstat{margin-top:16px;height:44px;padding:0 18px;border-radius:999px;display:flex;align-items:center;gap:8px;font-family:var(--fd);font-weight:700;font-size:26px;line-height:1;color:#fff;background:var(--hole);box-shadow:inset 0 3px 0 rgba(0,0,0,.2),inset 0 -2px 0 rgba(255,255,255,.08);font-variant-numeric:tabular-nums}
  .pstat .ico{width:20px;height:20px;stroke-width:2.4}
  .pl.low .pstat{background:var(--coral);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),0 3px 0 var(--coral-e)}
  .pstat.wait{font-family:var(--nu);font-weight:800;font-size:16px;color:var(--txt);background:var(--lil);box-shadow:inset 0 -3px 0 rgba(58,42,138,.08),0 3px 0 var(--lil2)}
  .skips{margin-top:18px;gap:10px}
  .skd{gap:6px}
  .sk{width:16px;height:16px}
  .sk.on{background:var(--rk);box-shadow:inset 0 -3px 0 rgba(0,0,0,.12),inset 0 2px 0 rgba(255,255,255,.45),0 2px 0 var(--rk-e)}
  .sk.off,.pl.op .sk.off{background:var(--lil);box-shadow:inset 0 2px 0 rgba(58,42,138,.14),inset 0 0 0 2px var(--lil2)}
  .skl{order:-1;margin:0;font-size:14px}
  .leave{display:flex;margin-top:22px;align-self:stretch;height:48px;border-radius:18px;font-size:18px}
  .turnrow{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-top:0;min-height:46px;width:100%;max-width:520px;justify-self:center}
  .turnrow .chip{display:inline-flex;justify-self:start}
  .turnrow .tt{display:block;justify-self:end}
  .turn{height:46px;padding:0 20px 0 10px;font-size:20px;gap:8px}
  .turn .blob{width:32px;height:30px}
  .dwrap{margin-top:10px}
  .dboard{--t:58px;--g:8px}
  .who{width:34px;height:34px}
  .who .blob{width:34px;height:32px}
  .wgap{width:34px}
  .drow{gap:12px}
  .scr-duel .kb{margin-top:10px}

  /* duel result and the other single column screens */
  .scr-dres{max-width:620px}
  .won-t{font-size:56px}
}

@media (min-width:1100px) and (max-height:820px){
  .scr-solo .kb,.scr-duel .kb{--kh:46px;gap:8px}
  .side{padding-top:24px}
  .pl{margin-top:24px}
}
