:root{--bg:#12141C;--card:#1D2130;--cell:#2A3046;--mute:#A9B0C3;--line:#5A6278;--accent:#FFB627;--appvh:100vh}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{overflow:hidden;overscroll-behavior:none;touch-action:manipulation;-webkit-text-size-adjust:100%}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#fff;-webkit-user-select:none;user-select:none}
[hidden]{display:none!important}
button{font:inherit;color:inherit;border:0;margin:0;padding:0;cursor:pointer;touch-action:manipulation}
button:focus-visible{outline:2px solid #fff;outline-offset:2px}
#app{position:relative;width:100%;max-width:480px;height:100vh;height:var(--appvh);margin:0 auto;background:var(--bg);overflow:hidden}
.scr{position:absolute;inset:0;display:flex;flex-direction:column;gap:14px;padding:max(18px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow:hidden}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;min-width:0}
.brand{display:flex;flex-direction:column;gap:2px;min-width:0}
/* the plan line in the hub header: "You are on:" over Free and Pro, a green tick under the one in use */
.plan{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:calc(2px * var(--hk,1));overflow:hidden}
.plan-on{font-size:max(11px, calc(12px * var(--hk,1) * var(--pk,1)));line-height:1.2;font-weight:700;color:#F3DFA2;white-space:nowrap}
.plan-row{display:flex;align-items:baseline;gap:calc(20px * var(--hk,1) * var(--pk,1))}
.plan-x{position:relative;font-size:max(11px, calc(22px * var(--hk,1) * var(--pk,1)));line-height:1.1;font-weight:800;color:#4E5468;white-space:nowrap}
/* the plan in use is bright, the other plan dimmed */
.plan-x.on{color:#fff}
.plan-tick{position:absolute;left:50%;bottom:calc(-9px * var(--hk,1) * var(--pk,1));width:95%;height:calc(10px * var(--hk,1) * var(--pk,1));transform:translateX(-50%);fill:none;stroke:#22C55E;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;overflow:visible;visibility:hidden}
.plan-x.on .plan-tick{visibility:visible}
.set-plan{--hk:1;--pk:0.9;padding-top:2px}
button.plan{background:none;min-height:44px;-webkit-tap-highlight-color:transparent}
/* the Plans card in the Menu */
.plans{display:flex;flex-direction:column;gap:calc(10px * var(--sk,1));transition:box-shadow .3s}
#scr-settings .plans{padding-top:calc(14px * var(--sk,1));padding-bottom:calc(14px * var(--sk,1))}
#scr-settings{row-gap:calc(14px * var(--sk,1))}
.plans.flash{box-shadow:0 0 0 2px var(--accent)}
.pl-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(10px * var(--sk,1)) 12px;border-radius:12px;background:#171A24;min-width:0}
.pl-tx{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.pl-head{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:10px;row-gap:2px;min-width:0}
.pl-sub{font-size:calc(13px * var(--sk,1));line-height:1.3}
.pl-row .set-plan{--pk:calc(0.9 * var(--sk,1))}
.pl-price{font-size:14px;font-weight:700;white-space:nowrap}
.pl-flow{display:flex;flex-direction:column;gap:8px}
.pl-flow[hidden],.pl-flow [hidden]{display:none}
.pl-line{display:flex;gap:8px;min-width:0}
.pl-flow > .pill{align-self:flex-start;padding:0 18px}
.pl-in{flex:1;min-width:0;height:44px;border-radius:12px;border:1px solid #2A3046;background:#171A24;color:#fff;padding:0 12px;font:inherit;font-size:16px}
.pl-in:focus{outline:2px solid var(--accent);outline-offset:0}
.pl-note{font-size:calc(13px * var(--sk,1));line-height:1.35}
/* the one promo band on a game screen */
.pplay-box{flex:none;display:flex;height:44px;min-width:0}
.pplay-box .pmini{flex:1;height:44px;padding:0 10px;gap:8px}
.pplay-box .pmini .pbody{flex-direction:row;align-items:baseline;gap:8px;min-width:0}
.pplay-box .pmini .pname{flex:none;font-size:13px}
.pplay-box .pmini .purl{flex:1;font-size:12px}
/* the smallest text anywhere is 11 px */
.plan-on{font-size:max(11px, calc(12px * var(--hk,1) * var(--pk,1)))!important}
.pplay-box .ptag{top:3px;inset-inline-end:8px}
.bar.plan-below{flex-wrap:wrap;row-gap:6px}
/* the language and menu buttons sit together; the language list opens under them, inside the screen */
/* the plan line under the title: one quiet row, You are on: Free Pro; its tap area is 44 px tall */
#scr-hub .brand .plan{flex:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;row-gap:2px;gap:0.55em;min-height:30px;margin:0;padding:0;overflow:visible;max-width:100%;font-size:15px}
#scr-hub .brand .plan > span{white-space:nowrap}
#scr-hub .brand .plan-on{font-size:0.87em!important;color:#F3DFA2;font-weight:700}
#scr-hub .brand .plan-row{gap:0.65em;padding:0}
#scr-hub .brand .plan-x{font-size:1em;font-weight:800}
.bar-btns{position:relative;flex:none;display:flex;gap:calc(8px * var(--hk,1))}
/* the footer: Terms & Conditions and, when the device can install, Install - play offline */
.foot{flex:none;display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;min-width:0}
/* both footer items wear the same pill: same colour, size, font and corners */
.foot > .foot-link,.foot > .install{flex:0 1 auto;display:inline-flex;align-items:center;justify-content:center;align-self:center;min-height:44px;min-width:0;max-width:100%;padding:6px 16px;border-radius:22px;background:var(--cell);color:#fff;font-size:13px;font-weight:600;line-height:1.2;text-decoration:none;text-align:center}
.lang-pop{position:absolute;top:calc(100% + 8px);right:0;z-index:30;min-width:180px;max-width:calc(100vw - 32px);max-height:min(60vh,360px);overflow-y:auto;scrollbar-width:none;padding:6px;border-radius:14px;background:var(--card);border:1px solid #2A3046;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.lang-pop[hidden]{display:none}
.lang-opt{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:0 12px;border-radius:10px;background:transparent;color:#fff;font-size:15px;font-weight:600;text-align:start}
.lang-opt[aria-selected="true"]{background:var(--cell)}
.lang-opt .lang-code{color:var(--mute);font-size:13px;font-weight:600}
.bar.plan-below .brand{flex:1 1 0}
.bar.plan-below .plan{order:3;flex:1 0 100%;flex-direction:row;justify-content:center;gap:12px}
.kick{font-size:13px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:var(--accent)}
h1{margin:0;font-size:28px;font-weight:700;line-height:1.1}
.sq{width:44px;height:44px;flex:none;border-radius:12px;background:var(--card);display:flex;align-items:center;justify-content:center}
.home{min-height:48px;flex:none;padding:0 14px;border-radius:12px;background:var(--card);display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600}
.card{background:var(--card);border-radius:16px;padding:14px 16px}
.col{display:flex;flex-direction:column;gap:2px;min-width:0}
/* a glyph can paint a hair past its own box: the row keeps two pixels of room at its end */
.bar .col{max-width:100%;padding-inline-end:2px}
.col.end{align-items:flex-end;text-align:end}
.row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;row-gap:8px;gap:12px}
.mute{font-size:13px;line-height:1.25;color:var(--mute)}
.accent{font-size:13px;line-height:1.25;font-weight:600;color:var(--accent)}
.strong{font-size:17px;font-weight:700;line-height:1.2;min-width:0;overflow-wrap:break-word}
.title{font-size:21px;font-weight:700;line-height:1.15;min-width:0;max-width:100%;overflow-wrap:break-word}
.pill{height:44px;flex:none;padding:0 22px;border-radius:22px;background:var(--accent);color:var(--bg);font-size:16px;font-weight:700}
.pill[aria-pressed="false"]{background:var(--cell);color:#fff}
/* the Menu: every button the same quiet pattern as "Reset all to level 01", zero yellow buttons */
#scr-settings .pill,#scr-settings .pill[aria-pressed]{height:44px;padding:0 14px;border-radius:12px;background:var(--cell);color:#fff;font-size:14px;font-weight:600}
.cont{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.tabs{display:flex;flex-wrap:wrap;gap:6px;padding:3px;border-radius:14px;background:var(--card);flex:none;min-width:0}
.tabs > .tab{min-width:0;flex:1 1 auto}
.tab{flex:1;min-width:0;height:44px;border-radius:12px;background:transparent;color:var(--mute);font-size:16px;font-weight:700}
.tab[aria-pressed="true"]{background:var(--accent);color:var(--bg)}
.tiles{flex:1;min-height:0;display:flex;flex-direction:column;gap:var(--gap,10px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.tiles::-webkit-scrollbar{display:none}
/* rows of two squares; a band is a whole row between them */
.trow{flex:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--gap,10px);width:100%}
.tile{height:var(--rowh,104px);min-width:0;padding:calc(12px * var(--k,1));border-radius:16px;background:var(--card);display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:calc(6px * var(--k,1));text-align:start;overflow:hidden}
.tile svg{flex:none;width:calc(26px * var(--k,1));height:calc(26px * var(--k,1))}
.tile .tx{display:block;min-width:0;max-width:100%}
/* a label that fits itself: one line, shrinking to its room; a second line only past its smallest size */
.fit{white-space:nowrap;min-width:0;max-width:100%}
.fit.fit-wrap{white-space:normal}
.ghost.fit{flex:0 1 auto}
.tile .nm{display:block;font-size:max(11px, calc(16px * var(--k,1)));font-weight:700;line-height:1.15}
.tile .sb{display:block;font-size:max(11px, calc(13px * var(--k,1)));line-height:1.25;color:var(--mute);margin-top:2px;white-space:nowrap}
/* site cards from The Reach 02: one full card and two bands in each menu */
.pcard{position:relative;height:var(--rowh,104px);display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:calc(4px * var(--k,1));padding:calc(10px * var(--k,1)) calc(12px * var(--k,1));border-radius:16px;background:#1A2440;border:1px solid #2E3A63;color:#fff;text-decoration:none;min-width:0;overflow:hidden}
.pcard .pbody{flex:1;min-height:0;justify-content:flex-start;gap:2px;width:100%}
.pcard .pname{font-size:max(11px, calc(14px * var(--pf,1) * var(--k,1)));line-height:1.15}
.pcard .pdesc{font-size:max(11px, calc(11.5px * var(--pf,1) * var(--k,1)));line-height:1.25;-webkit-line-clamp:2}
.pcard:focus-visible,.pband:focus-visible{outline:2px solid #fff;outline-offset:2px}
.plogo{flex:none;display:flex;align-items:center;justify-content:center;border-radius:12px;color:#12141C;font-weight:800;letter-spacing:.5px}
.pbody{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}
.pname{font-size:16px;font-weight:700;line-height:1.2;overflow-wrap:normal;word-break:normal}
/* on short rows the Promo mark keeps a strip of its own at the top; logo, name and link are centred in the space under it */
.tiles.tight .ptag{top:3px}
.tiles.tight .pcard,.tiles.tight .pmini{padding-top:16px!important;padding-bottom:3px!important}
.tiles.tighter .ptag{top:2px}
.tiles.tighter .pcard,.tiles.tighter .pmini{padding-top:13px!important;padding-bottom:2px!important}
.tiles.tighter .pcard .pbody,.tiles.tighter .pmini .pbody{gap:0}
.tiles.tighter .pname,.tiles.tighter .purl{line-height:1.12}
.tiles.tighter .purl{font-size:max(10px, calc(11px * var(--pf,1)))!important}
.tiles.tighter .pcard,.tiles.tighter .pmini{gap:6px!important}
.nologo .plogo{display:none!important}
.pdesc{flex:none;font-size:13px;line-height:1.3;color:var(--mute);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.purl{font-size:max(11px, calc(13px * var(--pf,1)));line-height:1.25;font-weight:600;color:var(--accent);overflow-wrap:anywhere}
.pband{position:relative;flex:none;width:100%;display:flex;align-items:center;gap:12px;height:var(--bandh,56px);padding:8px 14px;border-radius:14px;background:#171A24;border:1px solid #252B40;color:#fff;text-decoration:none;min-width:0}
.pband .plogo{border-radius:8px;font-size:12px}
.pband{padding-inline-end:58px}
.pband .pname{font-size:max(11px, calc(14px * var(--pf,1)))}
.pband .purl{font-size:max(11px, calc(12px * var(--pf,1)))}
/* the hub header grows with the same scale as the tiles (--hk), so the screen reads as one piece from the title down */
#scr-hub{gap:calc(14px * var(--hk,1))}
#scr-hub .kick{font-size:max(10px, calc(12px * var(--hk,1)));letter-spacing:1.6px}
#scr-hub h1{font-size:max(11px, calc(24px * var(--hk,1)));line-height:1.18}
#scr-hub .sq{width:max(44px, calc(44px * var(--hk,1)));height:max(44px, calc(44px * var(--hk,1)))}
#scr-hub .sq svg{width:calc(22px * var(--hk,1));height:calc(22px * var(--hk,1))}
#scr-hub .tab{height:max(40px, calc(40px * var(--hk,1)));font-size:max(11px, calc(15px * var(--hk,1)))}
#scr-hub .cont .strong{font-size:max(11px, calc(17px * var(--hk,1)))}
#scr-hub .cont .pill{height:max(44px, calc(44px * var(--hk,1)));font-size:max(11px, calc(16px * var(--hk,1)))}
/* the whole list sizes itself to the screen: rows share the height, up to 120 px each */
.tiles.tight .tile{flex-direction:row;align-items:center;justify-content:flex-start;gap:calc(12px * var(--k,1));padding:calc(8px * var(--k,1)) calc(12px * var(--k,1))}
.tiles.tight .tile svg{width:calc(26px * var(--k,1));height:calc(26px * var(--k,1))}
.tiles.tight .tile .nm{font-size:max(11px, calc(16px * var(--k,1)))}
.tiles.tight .tile .sb{font-size:max(11px, calc(13px * var(--k,1)))}
.tiles.tighter .tile .sb{display:none}
.tiles.tight .pcard{flex-direction:row;align-items:center;justify-content:flex-start;gap:calc(10px * var(--k,1));padding:calc(8px * var(--k,1)) calc(10px * var(--k,1))}
.tiles.tight .pcard .plogo{width:calc(28px * var(--k,1))!important;height:calc(28px * var(--k,1))!important;font-size:max(11px, calc(11px * var(--k,1)))!important}
.pcard .purl{font-size:max(11px, calc(12px * var(--pf,1) * var(--k,1)))}
.pcard .plogo{width:calc(30px * var(--k,1))!important;height:calc(30px * var(--k,1))!important;font-size:max(11px, calc(11px * var(--k,1)))!important}
.tiles.tight .pcard .pdesc{display:none}
.tiles.tight .pcard .pbody{justify-content:center}
.tiles:not(.pairs) .pstack .pmini + .pmini{display:none}
.tiles.tighter .pband{padding-top:4px;padding-bottom:4px;gap:10px}
.tiles.tighter .pband .plogo{width:26px!important;height:26px!important}
.tiles.tiniest .tile{gap:10px;padding:4px 10px}
.tiles.tiniest .tile svg{width:20px!important;height:20px!important}
.tiles.tiniest .tile .nm{font-size:13px}
.tiles.tighter .tile .nm{overflow-wrap:normal;word-break:normal;hyphens:none}
.tiles.tiniest .pcard{padding:4px 8px;gap:8px}
.tiles.tiniest .pcard .plogo{width:24px!important;height:24px!important;font-size:11px!important}
.tiles.tiniest .pmini{padding-top:3px;padding-bottom:3px}
/* two narrow bands sharing one square */
.pstack{height:var(--rowh,104px);min-width:0;display:flex;flex-direction:column;gap:6px}
.pmini{position:relative;flex:1;min-height:0;display:flex;align-items:center;gap:6px;padding:5px 8px;border-radius:12px;background:#171A24;border:1px solid #252B40;color:#fff;text-decoration:none;min-width:0;overflow:hidden}
.pmini .plogo{border-radius:6px}
.pmini .pname{font-size:max(11px, calc(12px * var(--pf,1) * var(--km,1)));line-height:1.15}
.pmini .purl{font-size:max(11px, calc(11px * var(--pf,1) * var(--km,1)));line-height:1.15}
.pmini .pbody{gap:1px}
/* the Promo word in the corner of every site card, no dot */
.ptag{position:absolute;top:6px;inset-inline-end:8px;display:flex;align-items:center;gap:3px;font-size:11px;line-height:1;font-weight:600;letter-spacing:.3px;color:#8A93AE;pointer-events:none}
.pband .ptag,.pmini .ptag{top:5px;inset-inline-end:7px}
.install{flex:none;align-self:center;max-width:100%;min-height:44px;padding:6px 18px;border-radius:22px;background:var(--cell);color:#fff;font-size:14px;font-weight:600;line-height:1.2;text-align:center}
.world{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;gap:12px}
.levels{flex:0 1 auto;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,96px));gap:10px}
.lv{min-height:0;min-width:0;padding:0 2px;border-radius:14px;background:var(--cell);font-size:18px;font-weight:700;line-height:1.1}
.lv.now{background:var(--accent);color:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.lv .pl{font-size:13px}
.lv.lock{background:transparent;border:2px dashed var(--line);color:var(--mute)}
.worlds{flex:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.wd{height:44px;min-width:0;border-radius:12px;background:var(--card);color:var(--mute);font-size:15px;font-weight:700}
.wd.open{color:#fff}
.wd[aria-pressed="true"]{outline:2px solid var(--accent);outline-offset:-2px;color:#fff}
.goal{flex:none;min-height:44px;padding:10px 14px;border-radius:12px;background:var(--card);display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:15px;font-weight:600;line-height:1.25}
.goal .accent{flex:none;font-size:14px;text-align:end}
.stage{flex:1;min-height:0;min-width:0;position:relative;border-radius:18px;background:var(--card);overflow:hidden;touch-action:none}
.helpers{flex:none;display:flex;gap:10px;min-height:0}
.helper{flex:1;min-width:0;height:48px;border-radius:12px;background:var(--card);font-size:15px;font-weight:600}
.wide{width:100%;flex:none}
.build{text-align:center;margin-top:auto}
.rowr{display:flex;align-items:center;flex-wrap:wrap;row-gap:8px;gap:10px;min-width:0}
.ghost{flex:none;height:44px;padding:0 14px;border-radius:12px;background:var(--cell);color:#fff;font-size:15px;font-weight:600;white-space:nowrap}
.veil{position:absolute;inset:0;z-index:5;background:rgba(8,9,13,.78);display:flex;align-items:center;justify-content:center;padding:12px;animation:tpfade .22s ease-out}
@keyframes tpfade{from{opacity:0}to{opacity:1}}
/* the install card: the whole window blurs behind it and takes no tap; the card stays inside every edge */
.inst{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:rgba(8,9,13,.55);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:tpfade .3s ease-out;touch-action:none;overscroll-behavior:none}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.inst{background:rgba(8,9,13,.9)}}
.inst-card{width:100%;max-width:340px;max-height:100%;overflow:hidden;display:flex;flex-direction:column;align-items:center;gap:12px;padding:20px 18px;border-radius:18px;background:var(--card);border:1px solid #3A3220;text-align:center;color:#fff}
.inst-card > *{flex:none;max-width:100%}
.inst-ic{width:56px;height:56px;border-radius:14px}
.inst-t{margin:0;font-size:18px;font-weight:700;line-height:1.3}
.inst-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;align-self:stretch;text-align:start}
.inst-list li{display:flex;align-items:center;gap:10px;min-width:0;font-size:15px;line-height:1.3;color:#E6E8EF}
.inst-list li > svg{flex:none}
.inst-list li > span{flex:1 1 auto;min-width:0}
.inst-go{align-self:stretch;height:48px;border-radius:12px;background:var(--cell);color:#fff;font-size:16px;font-weight:600}
.inst-how{margin:0;align-self:stretch;padding:12px 14px;border-radius:12px;background:#171A24;color:#fff;font-size:15px;line-height:1.4}
@media (max-height:460px){.inst-card{gap:8px;padding:14px 16px}.inst-ic{display:none}.inst-t{font-size:16px}.inst-list{gap:3px}.inst-list li{font-size:14px}.inst-go{height:44px}}
.panel{width:auto;max-width:320px;max-height:100%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:20px 24px;text-align:center;overflow:auto}
.panel > *{flex:none;max-width:100%}
.panel .pill{height:auto;min-height:44px;border-radius:14px;padding:16px;line-height:1.1;font-size:16px}
.link{height:auto;min-height:44px;flex:none;padding:16px;background:transparent;color:var(--mute);font-size:15px;font-weight:600;line-height:1.1}
/* the link's tap area stays 44 px, its invisible padding no longer adds to the gap above it: equal spacing between title, button and link */
.panel{gap:14px}
.panel .link{padding:0 16px;margin-top:calc((1.1em - 44px) / 2 + 2px);margin-bottom:calc((1.1em - 44px) / 2)}
.note{position:absolute;z-index:6;inset-inline:16px;bottom:max(18px,env(safe-area-inset-bottom));padding:12px 16px;border-radius:14px;background:#fff;color:var(--bg);font-size:15px;font-weight:600;line-height:1.25;text-align:center}
.dev{position:absolute;inset:0;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;padding:20px}
@media (max-width:340px){.worlds{gap:4px}}
/* a phone held sideways: controls on the left, the board on the right */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){
#app{max-width:960px}
.scr{display:grid;grid-template-columns:minmax(190px,clamp(190px,32%,300px)) minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr);gap:8px 12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}
h1{font-size:22px}
.card{padding:10px 12px}
#scr-hub .bar{grid-column:1;grid-row:1;flex-direction:column;align-items:stretch;gap:8px;min-width:0}
#scr-hub .bar > *{max-width:100%;min-width:0}
#scr-hub .bar-btns{justify-content:flex-start}
#scr-hub .tabs{grid-column:1;grid-row:2}
#scr-hub .cont{grid-column:1;grid-row:3}
#scr-hub .cont{padding:8px 12px}
#scr-hub .cont .pill{padding:0 14px}
#scr-hub.scr{grid-template-rows:auto auto auto minmax(44px,1fr)}
#scr-hub .foot{grid-column:1;grid-row:4;align-self:end}
#scr-hub .bar-btns .sq{width:44px;height:44px}
#scr-hub .bar-btns{gap:8px}
#scr-hub .tiles{grid-column:2;grid-row:1 / span 4}
#scr-map .bar,#scr-play .bar{grid-column:1;grid-row:1;flex-direction:column;align-items:stretch;gap:4px;min-width:0}
#scr-map .home,#scr-play .home{min-height:44px;font-size:14px}
#scr-map .bar > *,#scr-play .bar > *{max-width:100%;min-width:0}
#scr-map .bar .col.end,#scr-play .bar .col.end{align-items:flex-start;text-align:start}
#scr-map > .bar,#scr-play > .bar{min-height:48px;align-items:center}
#scr-map.scr{grid-template-rows:auto auto minmax(0,1fr) auto}
#scr-map .worlds{grid-column:1;grid-row:2 / span 3;align-self:end;grid-template-columns:repeat(4,minmax(0,1fr))}
#scr-map .pplay-box{grid-column:2;grid-row:4;align-self:end}
#scr-map .world{grid-column:2;grid-row:1 / span 3;align-self:stretch;gap:8px}
#scr-map .levels{flex:1 1 auto;grid-template-rows:repeat(3,minmax(0,1fr))}
#scr-play .goal{grid-column:1;grid-row:2;flex-direction:column;align-items:flex-start;gap:4px}
#scr-play .goal > span{max-width:100%;text-align:start}
#scr-play.scr{grid-template-rows:auto auto minmax(0,1fr) auto auto}
#scr-play .helpers{grid-column:1;grid-row:4;align-self:end;flex-wrap:wrap}
#scr-play .helper{flex:1 1 auto;min-width:0;white-space:nowrap}
#scr-play .pplay-box{grid-column:1;grid-row:5}
#scr-play .stage{grid-column:2;grid-row:1 / span 5}
#scr-settings.scr{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);row-gap:calc(8px * var(--sk,1))}
#scr-settings > *{grid-column:1}
#scr-settings .bar{grid-column:1;grid-row:1}
#scr-settings .plans{grid-column:2;grid-row:1 / span 4;align-self:start}
#scr-settings .build{grid-row:4;align-self:end}
}
@media (prefers-reduced-motion:reduce){#opening .ring,.veil{animation:none}}

/* right-to-left pages: the layout mirrors itself; the game boards keep their own left-to-right
   placing, which the games work out in pixels */
[dir="rtl"] .stage,[dir="rtl"] .levels,[dir="rtl"] .worlds{direction:ltr}
[dir="rtl"] .lv,[dir="rtl"] .wd{direction:rtl}
[dir="rtl"] .purl{direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .pcard .purl,[dir="rtl"] .pmini .purl,[dir="rtl"] .pband .purl{white-space:nowrap;overflow:hidden;text-overflow:clip}
