/* Bug World UI theme — "storybook toybox": the same chunky ink outline as the world art (#3b2a1e),
   cream paper panels, leaf-green for go, honey for rewards, lavender for the bug's own actions.
   Loaded after every other stylesheet so it is the single source of the look. */
:root{color-scheme:light;
  --ink:#3b2a1e;--paper:#fff6e2;--paper2:#f6e7c8;--wood:#a8743f;--woodD:#7a4b2a;
  --leaf:#6cc24a;--leafD:#3f8a2c;--lav:#8d7fd6;--lavD:#5a4aa6;--honey:#ffcf4a;--honeyD:#c48f12;--berry:#e0564b;--berryD:#9c2f26;
  --chip:var(--paper);--acc:var(--lav);--uiz:1;
  --pop:0 4px 0 var(--ink);--pop-s:0 3px 0 var(--ink);--lift:0 10px 24px rgba(59,42,30,.28)}
/* bigger on desktop and large tablets */
@media (min-width:1100px) and (min-height:640px){:root{--uiz:1.22}}
@media (min-width:1500px) and (min-height:800px){:root{--uiz:1.42}}
@media (min-width:2200px) and (min-height:1100px){:root{--uiz:1.75}}
#tl,#dock,.btns,#offBadge,#ol-hud,#ol-chat,#pl-actions,#gtoast,#ol-toast,.ol-card,.pl-card,.mcard,#pl-deco,.ol-bub{zoom:var(--uiz)}

html body{color:var(--ink);font-family:"Baloo 2",system-ui,sans-serif}
html body button{font-family:"Baloo 2",system-ui,sans-serif}

/* ---- shared building blocks ---- */
html body .chip,html body .ol-chip{background:var(--paper);color:var(--ink);border:3px solid var(--ink);border-radius:16px;box-shadow:var(--pop-s),var(--lift);backdrop-filter:none}
html body :is(.ol-chip,#mapBtn,#muteBtn):active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}
html body :is(button,summary,input,select):focus-visible{outline:3px solid var(--honey);outline-offset:3px}

/* ---- name plate (top left) ---- */
html body header.chip{padding:6px 14px 7px 10px;display:flex;flex-direction:column;align-items:flex-start;gap:2px;max-width:min(520px,calc(100vw/var(--uiz) - 24px))}
header .plate{display:flex;align-items:center;gap:8px;font-size:21px;line-height:1.05;font-weight:800}
header .logo{display:inline-flex;align-items:center;gap:6px;color:var(--lavD);letter-spacing:.2px;font-size:23px;text-shadow:0 2px 0 #d9d1ff}
header .logo svg{width:30px;height:30px;flex:none}
header #placeName{font-size:14px;font-weight:800;color:#fff;background:var(--wood);border:2px solid var(--ink);border-radius:9px;padding:0 9px 1px;-webkit-text-stroke:0;letter-spacing:.2px;white-space:nowrap}
header #hint{font-size:13px;max-width:440px;font-weight:600;opacity:.8;overflow:hidden;max-height:3em;animation:bwhint 1s ease 14s forwards}
header:hover #hint,header:focus-within #hint{animation:none;max-height:3em;opacity:.8}
@keyframes bwhint{to{opacity:0;max-height:0;max-width:0}}

/* ---- square icon buttons under the plate ---- */
#tl{position:fixed;left:12px;top:12px;z-index:5;display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-width:calc(100vw/var(--uiz) - 24px)}
#tools{display:flex;gap:8px}
html body #tl header.chip{position:static}
html body #tools .chip{position:static;min-height:46px;padding:4px 12px;display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:16px;color:var(--ink);cursor:pointer}
html body #muteBtn{padding:4px 9px}
#mapBtn svg,#muteBtn svg,#setBtn svg{width:24px;height:24px}
html body #setBtn{padding:4px 9px}

/* ---- action buttons (bottom right): round, chunky, labelled ---- */
html body .btns{right:12px;bottom:12px;gap:10px;align-items:flex-end}
html body .btns button{width:66px;min-width:0;height:auto;min-height:0;padding:0;background:none;border:0;box-shadow:none;color:var(--ink);display:flex;flex-direction:column;align-items:center;gap:3px;font-size:14px;font-weight:800}
.btns button .ic{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#b9aef0,var(--lav) 60%,var(--lavD));border:3px solid var(--ink);box-shadow:var(--pop),var(--lift);color:#fff;transition:transform .08s}
.btns button .ic svg{width:32px;height:32px}
.btns button .lb{background:var(--paper);border:2px solid var(--ink);border-radius:9px;padding:0 7px;line-height:1.35;white-space:nowrap}
html body .btns button:active{transform:none;box-shadow:none}
.btns button:active .ic{transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}
.btns button:hover .ic{filter:brightness(1.07)}
.btns #roll .ic{background:radial-gradient(circle at 35% 30%,#c5f0a8,var(--leaf) 60%,var(--leafD))}
.btns #close .ic{background:radial-gradient(circle at 35% 30%,#fff,#e9dcc0 60%,#c9b48c);color:var(--ink)}

/* ---- currency + level (top right) ---- */
html body #ol-hud,html body #offBadge{gap:10px}
html body .offCoins,html body #ol-hud .ol-chip{min-height:46px;display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:17px}
html body .ol-chip.save{background:var(--honey);color:var(--ink)}
html body .ol-bar{border-color:var(--ink);background:#5a4630}
html body .ol-chip .ol-dot{background:var(--berry);border:2px solid var(--ink)}

/* ---- toasts ---- */
html body #gtoast,html body #ol-toast{background:var(--ink);color:var(--paper);border:3px solid var(--paper);box-shadow:0 0 0 3px var(--ink),var(--lift);border-radius:16px;font-weight:700;top:16px;padding:8px 16px}

/* ---- dialogs (sign-in, shop, map, profile, trade…) ---- */
html body :is(.ol-layer,.pl-layer,#map){background:rgba(46,32,20,.5);backdrop-filter:blur(2px)}
html body :is(.ol-card,.pl-card,.mcard){background:var(--paper);color:var(--ink);border:4px solid var(--ink);border-radius:26px;box-shadow:0 6px 0 var(--ink),0 20px 50px rgba(30,18,8,.45)}
html body .ol-card{background:var(--paper) linear-gradient(var(--paper2),var(--paper2)) top/100% 10px no-repeat}
html body :is(.ol-card h1,.ol-card h2,.mcard h2){font-weight:800;letter-spacing:.2px}
html body .ol-card h1{color:var(--lav);paint-order:stroke fill;-webkit-text-stroke:6px var(--ink)}
html body .pl-head{background:linear-gradient(var(--wood),var(--woodD));border-bottom:4px solid var(--ink);padding:10px 12px 10px 18px}
html body .pl-head h2{color:#fff;paint-order:stroke fill;-webkit-text-stroke:5px var(--ink);font-weight:800;font-size:26px}
html body .pl-x{width:44px;height:44px;border-radius:50%;background:var(--berry);color:#fff;border:3px solid var(--ink);box-shadow:var(--pop-s);font-size:20px;line-height:1;display:grid;place-items:center}
html body .pl-x:active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}
html body .pl-tabs{padding:10px 16px 8px;background:var(--paper2);border-bottom:3px dashed rgba(59,42,30,.25)}
html body :is(.pl-tabs button,#pl-deco .top button.alt,#pl-deco .top button:not(:last-of-type)){background:var(--paper);color:var(--ink);border:3px solid var(--ink);border-radius:12px;box-shadow:var(--pop-s);font-weight:800}
html body :is(.pl-tabs button[aria-selected=true],#pl-deco .top button[aria-pressed=true]){background:var(--honey)}
html body .pl-body{padding-top:12px}
html body .pl-item{background:#fff;border:3px solid var(--ink);border-radius:18px;box-shadow:var(--pop-s)}
html body .pl-rar{border:2px solid var(--ink)}

/* primary / secondary / danger buttons everywhere */
html body :is(.ol-btn,.pl-btn,.pl-item button,.ol-mini,#pl-deco .top button:last-of-type){background:linear-gradient(#86d566,var(--leaf));color:#fff;border:3px solid var(--ink);box-shadow:var(--pop);border-radius:14px;font-weight:800;text-shadow:0 2px 0 rgba(30,60,20,.45)}
html body :is(.ol-btn,.pl-btn,.pl-item button,.ol-mini):active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}
html body :is(.ol-btn.alt,.ol-mini.alt){background:var(--paper);color:var(--ink);text-shadow:none}
html body .ol-btn.danger{background:linear-gradient(#ee7a6f,var(--berry));box-shadow:var(--pop)}
html body :is(.ol-btn,.pl-btn,.pl-item button,.ol-mini,#pl-deco .top button):disabled{box-shadow:0 3px 0 #a8977a;border-color:#a8977a;cursor:not-allowed;background:#d9ccb2;color:#7d6c55;text-shadow:none;opacity:1}
html body .ol-link{color:var(--lavD)}
html body :is(.ol-card input,.ol-card select,#ol-say input){background:#fff;color:var(--ink);border:3px solid var(--ink);border-radius:12px}
html body .ol-names button{border:3px solid var(--ink);background:#fff;color:var(--ink);box-shadow:var(--pop-s)}
html body .ol-names button[aria-pressed=true]{background:var(--honey);color:var(--ink)}
html body .mclose{color:var(--lavD);font-weight:800}

/* ---- context actions (Decorate, Shop, Plant…) ---- */
html body #pl-actions{right:12px;bottom:108px}
html body #pl-actions button{background:linear-gradient(#ffe48a,var(--honey));color:var(--ink);border:3px solid var(--ink);box-shadow:var(--pop),var(--lift);font-weight:800;border-radius:16px}
html body #pl-actions button:active{transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}

/* ---- decorate / planting bar ---- */
html body #pl-deco{background:var(--paper);border:4px solid var(--ink);border-radius:22px;box-shadow:0 5px 0 var(--ink),var(--lift)}
html body #pl-deco .row button{background:#fff;border:3px solid var(--ink);box-shadow:var(--pop-s);color:var(--ink);font-weight:700}
html body #pl-deco .row button[aria-pressed=true]{background:#fff2bf;border-color:var(--ink);outline:3px solid var(--honey)}

/* ---- chat ---- */
html body #ol-phr{background:var(--paper);border:3px solid var(--ink);box-shadow:var(--pop-s)}
html body #ol-phr button,html body .ol-phrs button{background:#fff;border:2px solid var(--ink);color:var(--ink)}
html body .ol-bub{border:3px solid var(--ink);color:var(--ink);box-shadow:0 3px 0 var(--ink)}
html body .ol-bub::after{bottom:-10px;border-top-color:var(--ink);border-width:9px;margin-left:-9px}
html body .ol-dm{border:2px solid var(--ink)}html body .ol-dm.me{background:var(--lav)}
html body :is(.ol-dms,.ol-tlist){background:var(--paper2)}
html body .ol-warn{border-width:3px}

/* ---- map ---- */
html body .mwrap button{box-shadow:var(--pop-s);font-weight:800}

/* phones: keep everything inside the screen */
@media (max-width:560px){
  header .plate{font-size:18px}header .logo svg{width:24px;height:24px}
  html body .btns{gap:6px}html body .btns button{width:56px}.btns button .ic{width:52px;height:52px}.btns button .ic svg{width:27px;height:27px}
  .btns button .lb{font-size:12px}
  html body #pl-actions{bottom:96px}
}
@media (prefers-reduced-motion:reduce){header #hint{animation:none}}
/* map dialog */
html body .mcard{padding:0 0 14px;overflow:hidden}
html body .mcard h2{margin:0 0 12px;padding:10px 16px;background:linear-gradient(var(--wood),var(--woodD));border-bottom:4px solid var(--ink);color:#fff;paint-order:stroke fill;-webkit-text-stroke:5px var(--ink);font-size:26px}
html body .mcard .mwrap{margin:0 16px}
html body .mclose{margin-top:12px;min-height:44px;padding:4px 22px;background:var(--paper);border:3px solid var(--ink);border-radius:14px;box-shadow:var(--pop-s);color:var(--ink);text-decoration:none}
html body .mclose:active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}

/* ---- player profile card: a rounded square ---- */
.bp-layer{position:fixed;inset:0;z-index:24;display:grid;place-items:center;background:rgba(46,32,20,.45);padding:12px}
.bp-card{zoom:var(--uiz);position:relative;width:min(340px,calc(100vw/var(--uiz) - 24px));background:var(--paper);border:4px solid var(--ink);border-radius:34px;box-shadow:0 6px 0 var(--ink),0 20px 50px rgba(30,18,8,.45);padding:14px 16px 16px;display:flex;flex-direction:column;align-items:center;gap:8px}
.bp-x{position:absolute;top:-14px;right:-14px;width:44px;height:44px;border-radius:50%;background:var(--berry);color:#fff;border:3px solid var(--ink);box-shadow:var(--pop-s);display:grid;place-items:center;cursor:pointer}
.bp-x svg{width:20px;height:20px}
.bp-name{display:flex;align-items:center;gap:8px;max-width:100%}
.bp-name h2{margin:0;font-size:26px;font-weight:800;line-height:1.1;overflow-wrap:anywhere;color:var(--ink)}
.bp-star{display:inline-flex;flex:none;filter:drop-shadow(0 2px 0 rgba(59,42,30,.35))}
.bp-note{margin:-4px 0 0;font-size:13px;font-weight:600;opacity:.8;text-align:center}
.bp-pic{width:220px;aspect-ratio:1;border-radius:28px;border:4px solid var(--ink);background:radial-gradient(circle at 50% 38%,#fff 0,#efe2ff 45%,#c9bdf3 100%);overflow:hidden;display:grid;place-items:center;box-shadow:inset 0 -10px 0 rgba(59,42,30,.08)}
.bp-img{width:100%;height:100%;object-fit:cover;display:block;filter:brightness(1.3) saturate(1.1) drop-shadow(0 6px 4px rgba(59,42,30,.25))}
.bp-spin{width:36px;height:36px;border-radius:50%;border:5px solid rgba(59,42,30,.2);border-top-color:var(--lav);animation:bpspin .8s linear infinite}
.bp-pic.ready .bp-spin{display:none}
@keyframes bpspin{to{transform:rotate(360deg)}}
.bp-xp{position:relative;width:220px;height:20px;border:3px solid var(--ink);border-radius:11px;background:#5a4630;overflow:hidden}
.bp-xp span{display:block;height:100%;background:linear-gradient(#9ff0b0,#3fbf6a)}
.bp-xp b{position:absolute;inset:0;display:grid;place-items:center;font-size:12px;color:#fff;text-shadow:0 1px 0 var(--ink),0 0 3px var(--ink)}
.bp-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 8px;margin-top:4px}
.bp-act{width:64px;display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:0;padding:0;cursor:pointer;color:var(--ink);font:800 12.5px "Baloo 2",system-ui,sans-serif;line-height:1.1;text-align:center}
.bp-ic{width:50px;height:50px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(#86d566,var(--leaf));color:#fff;border:3px solid var(--ink);box-shadow:var(--pop-s)}
.bp-ic svg{width:26px;height:26px}
.bp-act.alt .bp-ic{background:linear-gradient(#b9aef0,var(--lav))}
.bp-act.warm .bp-ic{background:linear-gradient(#ffe48a,var(--honey));color:var(--ink)}
.bp-act.quiet .bp-ic{background:var(--paper2);color:var(--ink)}
.bp-act:active:not(:disabled) .bp-ic{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}
.bp-act:disabled{cursor:not-allowed}.bp-act:disabled .bp-ic{background:#d9ccb2;color:#8a7a62;border-color:#a8977a;box-shadow:0 3px 0 #a8977a}
.bp-act:disabled .bp-lb{opacity:.6}
.bp-act:focus-visible{outline:none}.bp-act:focus-visible .bp-ic{outline:3px solid var(--honey);outline-offset:2px}
.bp-more{width:100%;margin-top:6px;border-top:3px dashed rgba(59,42,30,.2);padding-top:8px}
.bp-more summary{cursor:pointer;font-weight:800;font-size:14px;text-align:center;list-style:none}.bp-more summary::-webkit-details-marker{display:none}
.bp-more[open] summary{margin-bottom:6px}
.bp-more .ol-btn{min-height:40px;font-size:15px;margin-top:6px}

/* ---- inbox ---- */
.bw-inv{display:flex;gap:10px;align-items:center;padding:10px;border:3px solid var(--ink);border-radius:16px;background:#fff;box-shadow:var(--pop-s);margin-bottom:10px}
.bw-inv .who{flex:1;min-width:0}.bw-inv .who b{display:block;font-size:17px}.bw-inv .who small{opacity:.75;font-weight:600}
.bw-inv .acts{display:flex;gap:6px}
.bw-inv .acts .bp-act{width:58px;font-size:11.5px}.bw-inv .acts .bp-ic{width:42px;height:42px;border-radius:13px}.bw-inv .acts .bp-ic svg{width:22px;height:22px}
.bw-set{display:flex;gap:12px;align-items:center;padding:10px 4px;border-bottom:2px dashed rgba(59,42,30,.18);font-weight:700}
.bw-set span{flex:1}.bw-set small{display:block;font-weight:600;opacity:.75}
.bw-tog{appearance:none;width:56px;height:32px;border-radius:18px;border:3px solid var(--ink);background:#d9ccb2;position:relative;cursor:pointer;flex:none;transition:background .15s}
.bw-tog::after{content:"";position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;background:#fff;border:2px solid var(--ink);transition:left .15s}
.bw-tog:checked{background:var(--leaf)}.bw-tog:checked::after{left:26px}
.bw-tog:focus-visible{outline:3px solid var(--honey);outline-offset:2px}
.ol-chip .ol-ic{display:inline-grid;width:22px;height:22px}.ol-chip .ol-ic svg{width:22px;height:22px}

/* ---- bottom-left dock: room chat log above [map] [chat bar] ---- */
:root{--chatfont:"Andy","Andy Bold","Patrick Hand","Comic Neue",cursive}
#dock{position:fixed;left:12px;bottom:12px;z-index:10;display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-width:min(460px,calc(100vw/var(--uiz) - 380px))}
.dock-row{display:flex;gap:8px;align-items:flex-end;width:100%}
html body #dock #mapBtn{position:static;min-height:50px;padding:4px 14px;display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:16px;color:var(--ink);cursor:pointer;flex:none}
#dock #mapBtn svg{width:26px;height:26px}
html body #dock #ol-chat{position:relative;left:auto;bottom:auto;flex:1;max-width:none;zoom:1}
html body #ol-say{width:100%}
html body #ol-say input{font-family:var(--chatfont);font-size:20px;min-height:50px;box-shadow:var(--pop-s)}
html body #ol-say .ol-chip{min-height:50px;flex:none}
html body #ol-say .ol-chip svg{width:24px;height:24px}
html body #ol-phr{position:absolute;left:0;bottom:calc(100% + 8px);width:min(420px,calc(100vw - 40px));z-index:2}
html body #ol-phr button,html body .ol-phrs button{font-family:var(--chatfont);font-size:18px}
#ol-log{width:100%;background:var(--paper);border:3px solid var(--ink);border-radius:16px;box-shadow:var(--pop-s),var(--lift);overflow:hidden}
#ol-log[hidden]{display:none}
.ol-logtog{width:100%;display:flex;align-items:center;gap:6px;background:var(--paper2);border:0;border-bottom:3px solid var(--ink);padding:4px 10px;font:800 15px "Baloo 2",system-ui,sans-serif;color:var(--ink);cursor:pointer;min-height:38px}
.ol-logtog span:nth-child(2){flex:1;text-align:left}
.ol-logtog .chev{transition:transform .15s}
#ol-log.closed .ol-logtog{border-bottom:0}#ol-log.closed .ol-logtog .chev{transform:rotate(180deg)}
#ol-log.closed .ol-loglist{display:none}
.ol-loglist{max-height:min(30vh,190px);overflow-y:auto;padding:6px 10px;font-family:var(--chatfont);font-size:19px;line-height:1.2}
.ol-loglist p{margin:2px 0;overflow-wrap:anywhere}.ol-loglist p b{font-weight:700;color:var(--lavD)}.ol-loglist p.me b{color:var(--leafD)}
.ol-loglist p.empty{font-family:"Baloo 2",system-ui,sans-serif;font-size:14px;opacity:.7}
html body .ol-bub{font-family:var(--chatfont);font-size:19px;font-weight:400;line-height:1.15;padding:5px 11px}
body.decorating #dock{display:none}
@media (max-width:700px){#dock{max-width:calc(100vw/var(--uiz) - 210px);bottom:calc(10px + env(safe-area-inset-bottom))}#ol-log .ol-loglist{max-height:18vh}}

/* ---- decorate: turn an item to any angle ---- */
.rot-box{display:flex;align-items:center;gap:8px;width:100%;padding:4px 2px}
.rot-title{font-weight:800;font-size:15px}
.rot-btn{flex:none;min-width:44px;min-height:44px;padding:0 10px;font:800 16px "Baloo 2",system-ui,sans-serif;background:var(--paper);color:var(--ink);border:3px solid var(--ink);border-radius:12px;box-shadow:var(--pop-s);cursor:pointer}
.rot-btn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}
.rot-slider{flex:1;min-width:120px;accent-color:var(--leaf);height:32px;cursor:pointer}
.rot-val{min-width:46px;text-align:right;font-size:17px}
@media (max-width:560px){.rot-btn{min-width:40px;padding:0 6px;font-size:14px}.rot-title{display:none}}
html body #pl-deco .row .rot-btn{width:auto;min-width:48px;flex:none;background:var(--paper)}
html body #pl-deco .row{overflow:visible}

html body .mwrap button{padding:2px 9px;font-size:14px}html body .mwrap button small{font-size:11px}

/* ---------- mini-games: Four in a Row, kart race HUD ---------- */
html body .ag-card{width:min(560px,100%)}
html body .ag-body{display:flex;flex-direction:column;align-items:center;gap:10px}
html body .ag-lead{font-size:17px;font-weight:700;margin:0 0 6px;text-align:center}
html body .ag-small{font-size:13px;text-align:center}
html body .ag-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
html body .ag-tile{background:var(--paper2);border:3px solid var(--ink);border-radius:18px;padding:10px;text-align:center;box-shadow:var(--pop-s)}
html body .ag-tile h3{margin:4px 0 0;font-size:18px}html body .ag-tile .pl-note{margin:2px 0 8px}
html body .ag-tile-art svg{width:86px;height:64px}
html body .ag-levels{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
html body .ag-levels .pl-btn{width:auto;min-width:74px;padding:6px 12px}
@media (max-width:440px){html body .ag-tiles{grid-template-columns:1fr}}
html body .ag-players{display:flex;align-items:center;gap:10px;font-weight:800;flex-wrap:wrap;justify-content:center}
html body .ag-p{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;border:2px solid transparent}
html body .ag-p.on{border-color:var(--ink);background:var(--honey)}
html body .ag-vs{opacity:.6;font-size:13px}
html body .ag-status{margin:0;font-weight:800;font-size:17px;min-height:1.4em;text-align:center}
html body .ag-foot{display:flex;align-items:center;justify-content:space-between;width:100%;gap:10px}
html body .ag-foot .pl-btn{width:auto}
html body .ag-clock{font-weight:800;font-variant-numeric:tabular-nums}html body .ag-clock.low{color:var(--berryD)}
html body .ag-reward{text-align:center;width:100%}
html body .ag-gain{font-size:18px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:4px;margin:2px 0}
html body .ag-disc{display:block;width:84%;aspect-ratio:1;border-radius:50%;box-shadow:inset 0 -4px 0 rgba(0,0,0,.25),inset 0 3px 0 rgba(255,255,255,.35)}
html body .ag-players .ag-disc{width:18px;height:18px}
html body .ag-disc.d1{background:var(--berry)}html body .ag-disc.d2{background:var(--honey)}
html body .ag-disc.drop{animation:agDrop .35s cubic-bezier(.4,1.6,.6,1)}
html body .ag-disc.win{outline:3px solid #fff;outline-offset:-2px;animation:agPulse .8s ease-in-out infinite alternate}
@keyframes agDrop{from{transform:translateY(-260%)}to{transform:none}}
@keyframes agPulse{to{filter:brightness(1.3);transform:scale(1.08)}}
html body .ag-four{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;background:#4f7bd6;border:3px solid var(--ink);border-radius:16px;padding:8px;width:min(100%,430px);box-shadow:var(--pop)}
html body .ag-col{display:flex;flex-direction:column;gap:4px;background:none;border:0;padding:0;border-radius:10px;cursor:pointer}
html body .ag-col:not(:disabled):hover,html body .ag-col:focus-visible{background:rgba(255,255,255,.18);outline:none}
html body .ag-col:disabled{cursor:default;opacity:1}
html body .ag-hole{display:grid;place-items:center;aspect-ratio:1;border-radius:50%;background:#2c4f9e;box-shadow:inset 0 3px 0 rgba(0,0,0,.3)}
html body .ag-invite{position:fixed;left:50%;top:calc(env(safe-area-inset-top) + 86px);transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;
  background:var(--paper);border:3px solid var(--ink);border-radius:18px;padding:8px 12px;box-shadow:var(--pop),var(--lift);font-weight:800;max-width:calc(100vw - 24px)}
html body .ag-invite .pl-btn{width:auto;padding:4px 12px}
html body .ag-results{margin:0 0 6px;padding-left:24px;font-size:16px}html body .ag-results li.you{font-weight:800;color:var(--lavD)}
#raceHud{position:fixed;left:0;right:0;margin:0 auto;top:calc(env(safe-area-inset-top) + 74px);z-index:20;display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none;width:min(92vw,520px)}
#raceHud[hidden]{display:none}
#raceHud .rh-top{display:flex;gap:10px}
#raceHud .rh-top span:not(:empty){background:var(--paper);border:3px solid var(--ink);border-radius:14px;padding:2px 12px;font-weight:800;font-size:18px;box-shadow:var(--pop-s);font-variant-numeric:tabular-nums}
#raceHud .rh-row{display:flex;flex-direction:column;align-items:center;gap:4px}
#raceHud .rh-join{pointer-events:auto;width:auto;padding:8px 18px;font-size:18px}
#raceHud .rh-join[hidden]{display:none}
#raceHud .rh-info{background:rgba(255,246,226,.92);border-radius:12px;padding:2px 10px;font-size:13px;font-weight:700;text-align:center}
#raceHud .rh-info:empty{display:none}
#raceHud .rh-big{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%) scale(.6);font-size:96px;font-weight:900;color:var(--honey);-webkit-text-stroke:5px var(--ink);opacity:0;transition:opacity .15s,transform .2s}
#raceHud .rh-big.show{opacity:1;transform:translate(-50%,-50%) scale(1)}#raceHud .rh-big.go{color:var(--leaf)}
body.kart-area #wave,body.kart-area #jump,body.kart-area #roll,body.kart-area #sit,body.kart-area #close,body.kart-area #emote,body.kart-area #emotes{display:none}

/* phones: compact title card that never runs under the silver and level chips */
@media (max-width:560px){
  header #hint{display:none}
  html body #tl{max-width:calc(100vw - 150px)}
  html body #tl header.chip{padding:6px 10px}
  header .plate{flex-wrap:wrap;row-gap:3px;font-size:17px}header .logo{font-size:19px}
  header #placeName{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  html body .offCoins,html body #ol-hud .ol-chip{min-height:40px;font-size:15px;padding:2px 9px}
  html body #ol-hud{max-width:140px}
  html body #tools .chip{min-height:42px}
  #raceHud{top:calc(env(safe-area-inset-top) + 132px)}
  #raceHud .rh-big{font-size:72px}
}

#confetti{position:fixed;inset:0;z-index:80;pointer-events:none}
html body .pl-lock{text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px}
html body .pl-lockic{font-size:54px;line-height:1}
html body .pl-price{font-size:22px;font-weight:900;display:flex;align-items:center;gap:6px;margin:4px 0 0}
html body .pl-lock .pl-btn{width:auto;padding:8px 18px;margin-top:6px}
html body .gg{display:flex;flex-direction:column;gap:12px}
html body .gg-sec{background:var(--paper2);border:3px solid var(--ink);border-radius:16px;padding:10px 14px}
html body .gg-sec h3{margin:0 0 6px;font-size:18px}
html body .gg-sec ol,html body .gg-sec ul{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:3px}
html body .gg-t{border-collapse:collapse;width:100%;font-size:14px;margin-top:6px}
html body .gg-t th,html body .gg-t td{text-align:left;padding:4px 6px;border-bottom:2px solid rgba(59,42,30,.15);white-space:nowrap}
html body .gg-t th{font-weight:800}
html body .gg-scroll{overflow-x:auto}
html body .gg-rar{display:inline-block;color:#fff;font-weight:800;font-size:12px;border-radius:999px;padding:1px 8px}

/* decorating: the panel slides away while you drag something, so you can see where it lands */
html body #pl-deco{transition:transform .22s ease,opacity .22s ease}
body.deco-dragging #pl-deco{transform:translateY(calc(100% + 24px));opacity:0;pointer-events:none}
body.deco-dragging .btns,body.deco-dragging #pl-actions,body.deco-dragging #dock{opacity:0;pointer-events:none}
@media (max-width:560px){
  html body #pl-deco{left:8px;right:8px;bottom:8px;padding:8px;gap:4px;border-radius:18px}
  html body #pl-deco .top{gap:6px}
  html body #pl-deco .top b{flex:1 1 100%;order:5;font-size:13px;line-height:1.25;font-weight:700}
  html body #pl-deco .top button{min-height:36px;padding:3px 10px;font-size:14px}
  html body #pl-deco .top button:last-of-type{margin-left:auto}
  html body #pl-deco .row button{width:78px;font-size:11px;padding:3px}
  html body #pl-deco img,html body #pl-deco .plain{width:44px;height:44px}
  html body #pl-deco .row{overflow-x:auto}
}

/* phones: smaller chrome so more of the world shows */
@media (max-width:560px){
  html body #tl{left:8px;top:8px;gap:6px}
  html body #tl header.chip{padding:5px 9px;border-radius:14px}
  header .logo{font-size:17px}header .logo svg{width:20px;height:20px}
  html body #tools{gap:6px}
  html body #tools .chip,html body #muteBtn,html body #setBtn{min-height:38px;padding:2px 8px;border-radius:12px}
  #muteBtn svg,#setBtn svg{width:20px;height:20px}
  html body #dock #mapBtn{min-height:42px;padding:2px 12px;font-size:15px;border-radius:14px}
  html body #dock #mapBtn svg{width:20px;height:20px}
  html body #offBadge{top:8px;right:8px;gap:6px}
}

/* race menu, waiting card, trophy line */
html body .ag-race-opts{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:480px){html body .ag-race-opts{grid-template-columns:1fr}}
html body .ag-race-opt{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--paper2);border:3px solid var(--ink);border-radius:18px;padding:14px 10px;box-shadow:var(--pop);cursor:pointer;font:inherit;color:var(--ink)}
html body .ag-race-opt:hover,html body .ag-race-opt:focus-visible{background:var(--honey);outline:none}
html body .ag-race-opt:active{transform:translateY(2px);box-shadow:var(--pop-s)}
html body .ag-race-ic{font-size:40px;line-height:1}html body .ag-race-opt b{font-size:19px}html body .ag-race-opt small{font-size:13px;font-weight:600;opacity:.85}
html body .ag-wait{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:60;display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--paper);border:4px solid var(--ink);border-radius:22px;padding:16px 22px;box-shadow:0 5px 0 var(--ink),var(--lift);font-weight:800;text-align:center;max-width:calc(100vw - 32px)}
html body .ag-wait-n{font-size:54px;line-height:1;color:var(--lavD)}
html body .ag-wait small{font-weight:600}html body .ag-wait .pl-btn{width:auto;padding:4px 14px}
html body .ag-trophy{display:flex;align-items:center;justify-content:center;gap:8px;font-weight:800;background:#fff2bf;border:3px solid var(--ink);border-radius:14px;padding:6px 10px}
html body .ag-trophy img{width:52px;height:52px}

html body .ag-tro{display:flex;align-items:center;gap:10px;background:var(--paper2);border:3px solid var(--ink);border-radius:14px;padding:6px 10px;margin:6px 0}
html body .ag-tro img{width:48px;height:48px}html body .ag-tro b{display:block;font-size:17px}html body .ag-tro small{font-weight:600}

/* race start lights */
#raceHud .rh-lights{position:fixed;left:50%;top:34%;transform:translate(-50%,-50%) scale(.7);display:flex;align-items:center;gap:12px;background:#2b2420;border:5px solid var(--ink);border-radius:26px;padding:14px 18px;box-shadow:0 6px 0 var(--ink),var(--lift);opacity:0;transition:opacity .15s,transform .2s}
#raceHud .rh-lights.show{opacity:1;transform:translate(-50%,-50%) scale(1)}
#raceHud .rh-lights i{width:52px;height:52px;border-radius:50%;background:#4a2320;box-shadow:inset 0 -5px 0 rgba(0,0,0,.35)}
#raceHud .rh-lights i.on{background:radial-gradient(circle at 40% 35%,#ff9a8a,#e8231a 60%);box-shadow:0 0 22px #ff3b2b,inset 0 -5px 0 rgba(0,0,0,.25)}
#raceHud .rh-lights b{display:none;font-size:52px;font-weight:900;color:#7dff6a;-webkit-text-stroke:3px var(--ink);padding:0 6px}
#raceHud .rh-lights.go i{background:radial-gradient(circle at 40% 35%,#c9ffb8,#3fd13a 60%);box-shadow:0 0 22px #3fd13a}
#raceHud .rh-lights.go b{display:block}
@media (max-width:560px){#raceHud .rh-lights i{width:38px;height:38px}#raceHud .rh-lights b{font-size:38px}}

/* rewards flying to the HUD */
.fly-coin,.fly-spark{position:fixed;left:0;top:0;z-index:95;pointer-events:none;will-change:transform}
.fly-coin{width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffffff,#d6dbe2 45%,#8a9099 80%);border:2.5px solid #3b2a1e;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}
.fly-spark{width:18px;height:18px;background:hsl(var(--h,50),95%,62%);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);filter:drop-shadow(0 0 4px hsl(var(--h,50),100%,70%))}
.fly-hit{animation:flyHit .32s ease}
@keyframes flyHit{40%{transform:scale(1.18)}100%{transform:scale(1)}}
.fly-plus{position:fixed;z-index:95;transform:translateX(-50%);pointer-events:none;font-weight:900;font-size:16px;color:#fff;-webkit-text-stroke:3px #3b2a1e;paint-order:stroke;opacity:0;animation:flyPlus 1.6s ease forwards}
.fly-plus.xp{color:#ffe36a}
@keyframes flyPlus{0%{opacity:0;margin-top:6px}15%{opacity:1;margin-top:0}75%{opacity:1}100%{opacity:0;margin-top:-10px}}
@media (prefers-reduced-motion:reduce){.fly-hit,.fly-plus{animation:none}}

html body .ag-tro-ic{font-size:36px;width:48px;text-align:center}

/* shop tabs: one row you can swipe, names never cut off */
html body .pl-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:8px;flex-shrink:0;min-height:max-content;align-items:center}
html body .pl-tabs::-webkit-scrollbar{display:none}
html body .pl-tabs button{flex:none;width:auto;white-space:nowrap;min-width:0;padding:6px 14px;line-height:1.3;min-height:38px}
@media (max-width:560px){
  html body .pl-tabs{padding:8px 10px 6px}
  html body .pl-tabs button{font-size:14px;padding:4px 11px}
  html body .pl-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  html body .pl-item{padding:8px 6px;border-radius:14px}
  html body .pl-item img{width:64px;height:64px}
  html body .pl-item b{font-size:14px}
  html body .pl-item small{font-size:12px}
  html body .pl-item button{min-height:36px;font-size:14px;padding:4px 8px}
  html body .pl-item .pl-rar,html body .pl-item [class*=rar]{font-size:11px}
}

/* the Seed Stall: three wooden shelves that scroll sideways */
html body .ss{display:flex;flex-direction:column;gap:14px}
html body .ss-shelf h3{margin:0 0 4px;font-size:17px;display:flex;align-items:baseline;gap:8px}
html body .ss-shelf h3 small{font-size:13px;font-weight:700;opacity:.7}
html body .ss-row{display:flex;gap:10px;overflow-x:auto;padding:4px 4px 10px;scroll-snap-type:x proximity;scrollbar-width:thin}
html body .ss-row:focus-visible{outline:3px solid var(--honey);border-radius:12px}
html body .ss-plank{height:14px;margin-top:-8px;border-radius:6px;background:linear-gradient(#b07a45,#7a4b2a);border:3px solid var(--ink);box-shadow:0 4px 0 rgba(59,42,30,.35)}
html body .ss-packet{flex:none;width:124px;scroll-snap-align:start;display:flex;flex-direction:column;align-items:center;gap:1px;text-align:center;background:#fff;border:3px solid var(--ink);border-radius:14px;padding:6px 6px 8px;box-shadow:var(--pop-s);position:relative}
html body .ss-packet::before{content:"";position:absolute;left:0;right:0;top:0;height:6px;border-radius:11px 11px 0 0;background:var(--rar)}
html body .ss-pic{position:relative;width:84px;height:84px;margin-top:4px}
html body .ss-pic img{width:84px;height:84px}
html body .ss-lv{position:absolute;right:-6px;bottom:-4px;min-width:28px;height:28px;padding:0 5px;border-radius:999px;background:var(--honey);border:3px solid var(--ink);font-weight:900;font-size:14px;line-height:22px;color:var(--ink)}
html body .ss-have{position:absolute;left:-6px;top:-2px;min-width:22px;height:22px;padding:0 4px;border-radius:999px;background:var(--leaf);border:2px solid var(--ink);color:#fff;font-weight:900;font-size:12px;line-height:18px}
html body .ss-packet b{font-size:14px;line-height:1.1;margin-top:4px}
html body .ss-rar{font-size:11px;font-weight:800;color:var(--rar)}
html body .ss-packet small{font-size:12px;display:flex;align-items:center;gap:3px;justify-content:center}
html body .ss-grow{opacity:.75}
html body .ss-btns{display:flex;gap:4px;width:100%;margin-top:4px}
html body .ss-btns .ss-buy{flex:1;min-height:34px;padding:2px 4px;font-size:14px;margin:0;width:auto}
html body .ss-packet.locked{background:#ece6da}
html body .ss-packet.locked .ss-pic img{filter:grayscale(.7) opacity(.6)}
html body .ss-packet.locked .ss-lv{background:#d9ccb2}
html body .ss-buy{background:linear-gradient(#86d566,var(--leaf));color:#fff;border:3px solid var(--ink);border-radius:12px;font:800 14px "Baloo 2",system-ui,sans-serif;box-shadow:var(--pop-s);text-shadow:0 2px 0 rgba(30,60,20,.45);cursor:pointer}
html body .ss-buy:disabled{box-shadow:0 3px 0 #a8977a;border-color:#a8977a;cursor:not-allowed;background:#d9ccb2;color:#7d6c55;text-shadow:none}

html body .ss-leaves{color:#b5123f;font-weight:800}
html body .ss-empty{margin:0;padding:18px 10px;font-weight:700;opacity:.7;font-size:14px;white-space:normal}
html body .ss-when{font-weight:700;font-size:13px;margin-top:-4px}

html body .ss-top{display:flex;align-items:center;gap:10px;justify-content:space-between}
html body .ss-top .pl-note{margin:0}
html body .ss-q{flex:none;width:38px;height:38px;border-radius:50%;background:var(--honey);border:3px solid var(--ink);box-shadow:var(--pop-s);font:900 20px "Baloo 2",system-ui,sans-serif;color:var(--ink);cursor:pointer;padding:0;line-height:1}
html body .ss-q[aria-expanded=true]{background:var(--paper2)}
html body .ss-q:active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}
html body .ss-help{background:var(--paper2);border:3px solid var(--ink);border-radius:14px;padding:8px 12px;margin:8px 0}
html body .ss-help>b{font-size:16px}
html body .ss-help p{margin:4px 0;font-weight:600;font-size:14px}
html body .ss-help-tag{display:inline-block;min-width:84px;text-align:center;color:#fff;font-weight:800;font-size:12px;border-radius:999px;padding:1px 8px}

/* messages never block taps on the world */
#gtoast,#ol-toast,.fly-plus{pointer-events:none}

/* Seed Stall, tidier: smaller packets, star levels, everything on one grid */
html body .ss-top{align-items:center;margin-bottom:6px}
html body .ss-top .pl-note{flex:1}
html body .ss{gap:12px}
html body .ss-shelf h3{margin:0 0 6px;padding:0 2px}
html body .ss-row{gap:8px;padding:2px 2px 10px;scroll-padding-left:2px}
html body .ss-plank{margin:-8px 0 0}
html body .ss-packet{width:112px;padding:8px 6px 8px;gap:2px;justify-content:flex-start}
html body .ss-pic{width:72px;height:72px;margin:2px auto 0}
html body .ss-pic img{width:72px;height:72px}
html body .ss-lv{position:absolute;right:-12px;bottom:-8px;width:34px;height:34px;min-width:0;padding:0;border:0;background:none;border-radius:0;line-height:0}
html body .ss-lv svg{width:34px;height:34px;display:block;filter:drop-shadow(0 2px 0 rgba(59,42,30,.35))}
html body .ss-packet.locked .ss-lv svg polygon{fill:#d9ccb2}
html body .ss-packet b{margin-top:6px;font-size:14px;min-height:2.2em;display:flex;align-items:center;justify-content:center}
html body .ss-own{color:var(--leafD);font-weight:800}
html body .ss-btns{margin-top:auto;padding-top:4px}
html body .ss-btns .ss-buy{min-height:32px;font-size:13px;border-width:2.5px}
@media (max-width:560px){
  html body .ss-packet{width:104px}
  html body .ss-pic,html body .ss-pic img{width:64px;height:64px}
  html body .ss-grow{font-size:11px}
}

html body .ss-packet.locked .ss-lv{background:none}
/* Seed Stall: labelled grow time and harvest rewards */
html body .ss-packet .ss-stats{display:grid;grid-template-columns:auto 1fr;gap:2px 6px;align-items:center;width:100%;box-sizing:border-box;margin:4px 0 2px;padding:5px 6px;border-radius:8px;background:rgba(59,42,30,.07);font-size:11px;line-height:1.25;text-align:left}
html body .ss-packet .ss-k{color:#7a6552;font-weight:600;white-space:nowrap}
html body .ss-packet .ss-v{display:flex;align-items:center;justify-content:flex-end;gap:3px;font-weight:700;color:#3b2a1e;white-space:nowrap}
html body .ss-packet .ss-v .pl-silver{transform:scale(.8)}
html body .ss-packet .ss-xp{color:#8a4fd1}
html body .ss-packet .ss-price{font-weight:700}
@media (max-width:520px){html body .ss-packet .ss-stats{grid-template-columns:1fr;gap:0;text-align:center;padding:4px}
 html body .ss-packet .ss-k{font-size:10px}html body .ss-packet .ss-v{justify-content:center;margin-bottom:2px}
 html body .ss-packet .ss-k:empty{display:none}}
html body .ss-packet .ss-v{flex-wrap:wrap;white-space:normal;text-align:center}
html body .ss-packet .ss-v{flex-wrap:nowrap;white-space:nowrap}
html body .ss-packet .ss-big{font-size:10px;letter-spacing:-.2px}
/* painted art: level stars, the silver coin, seed packets */
.bw-star{position:relative;display:inline-grid;place-items:center;width:var(--s,40px);height:var(--s,40px);flex:none;line-height:1}
.bw-star img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.bw-star b{position:relative;top:7%;font:800 calc(var(--s,40px)*.4)/1 "Baloo 2",system-ui,sans-serif;color:#fff;
  text-shadow:0 0 1px #3b2a1e,1.5px 0 0 #3b2a1e,-1.5px 0 0 #3b2a1e,0 1.5px 0 #3b2a1e,0 -1.5px 0 #3b2a1e,1px 1px 0 #3b2a1e,-1px -1px 0 #3b2a1e,1px -1px 0 #3b2a1e,-1px 1px 0 #3b2a1e}
.bw-star b.sm{font-size:calc(var(--s,40px)*.3)}
html body .ss-lv .bw-star{--s:34px}
img[src*="art/seed/"]{object-fit:contain}
.fly-coin{border:0;border-radius:0;box-shadow:none;background:url(art/ui/coin.webp?v=1) center/contain no-repeat}
html body .ss-lv .bw-star{filter:drop-shadow(0 2px 0 rgba(59,42,30,.35))}
html body .ss-packet.locked .ss-lv .bw-star img{filter:grayscale(1) brightness(1.05)}
html body .ss-pic .ss-lv img{width:100%;height:100%}
html body .ss-pic > img{object-fit:contain}
/* the stats box stacks label over value at every width (two columns were too tight on the cards) */
html body .ss-packet .ss-stats{grid-template-columns:1fr;gap:0;text-align:center;padding:4px}
html body .ss-packet .ss-k{font-size:10px}
html body .ss-packet .ss-v{justify-content:center;margin-bottom:2px}
html body .ss-packet .ss-k:empty{display:none}
/* while planting, the bar sits at the top so the soil patch stays free to tap */
html body #pl-deco.planting{bottom:auto;top:96px}
body.deco-dragging #pl-deco.planting{transform:none;opacity:1;pointer-events:auto}
/* level star numbers: sit in the middle of the star whatever card they are on */
html body .bw-star > b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;min-height:0;padding-top:12%;
  font:800 calc(var(--s,40px)*.4)/1 "Baloo 2",system-ui,sans-serif;color:#fff}
html body .bw-star > b.sm{font-size:calc(var(--s,40px)*.3)}
html body .ss-packet.locked .ss-lv .bw-star img{filter:saturate(.75) opacity(.8)}
/* first time planting: the white glove shows how to drag a seed */
.tut-hand{position:fixed;left:0;top:0;width:76px;margin:-6px 0 0 -6px;transform-origin:8% 7%;z-index:61;pointer-events:none;opacity:0;filter:drop-shadow(0 6px 6px rgba(59,42,30,.3))}
.tut-packet{position:fixed;left:0;top:0;width:54px;height:64px;object-fit:contain;z-index:60;pointer-events:none;opacity:0;filter:drop-shadow(0 4px 4px rgba(59,42,30,.3))}
.tut-tip{position:fixed;left:0;top:0;transform:translateX(-50%);z-index:60;pointer-events:none;background:var(--paper,#fff6e2);color:var(--ink,#3b2a1e);border:3px solid var(--ink,#3b2a1e);border-radius:999px;padding:4px 14px;font:800 15px "Baloo 2",system-ui,sans-serif;white-space:nowrap;box-shadow:0 3px 0 var(--ink,#3b2a1e);animation:tutBob 1.6s ease-in-out infinite}
@keyframes tutBob{50%{margin-top:-5px}}
@media (prefers-reduced-motion:reduce){.tut-tip{animation:none}}
html body #pl-deco .row .pl-seed{touch-action:none;cursor:grab}
html body #pl-deco .row .pl-seed img{pointer-events:none}
/* ---- balance pill with the level star (shop headers) ---- */
html body .pl-wallet{display:inline-flex;align-items:center;gap:8px}
html body .pl-coins{display:inline-flex;align-items:center;gap:6px;background:#fff;border:3px solid var(--ink);border-radius:999px;padding:3px 14px 3px 8px;font:800 17px "Baloo 2",system-ui,sans-serif;box-shadow:0 3px 0 var(--ink)}
html body .pl-coins .pl-silver{width:22px;height:22px;margin:0;vertical-align:0}
html body .pl-lvl{display:inline-flex;filter:drop-shadow(0 2px 0 rgba(59,42,30,.35))}
html body .ss-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
/* ---- Seed Stall shelves: just packets and their level stars ---- */
html body .ss-row{gap:14px;padding:6px 6px 12px;cursor:grab;user-select:none;-webkit-user-select:none;touch-action:pan-x pan-y}
html body .ss-row.dragging{cursor:grabbing;scroll-snap-type:none}
html body .ss-row.dragging .ss-bag{pointer-events:none}
html body .ss-bag{position:relative;flex:none;width:78px;height:92px;padding:0;border:0;background:none;cursor:pointer;scroll-snap-align:start;transition:transform .15s}
html body .ss-bag:hover,html body .ss-bag:focus-visible{transform:translateY(-4px) rotate(-2deg)}
html body .ss-bag:focus-visible{outline:3px solid var(--honey);outline-offset:3px;border-radius:10px}
html body .ss-bag>img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 0 rgba(59,42,30,.25))}
html body .ss-bag.locked>img{filter:grayscale(.65) opacity(.6)}
html body .ss-bag .ss-lv{position:absolute;right:-8px;bottom:-6px;width:34px;height:34px;min-width:0;padding:0;border:0;background:none;line-height:0}
html body .ss-bag.locked .ss-lv .bw-star img{filter:saturate(.75) opacity(.8)}
html body .ss-new{position:absolute;left:-8px;top:-8px;width:34px;height:34px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px rgba(59,42,30,.3));animation:ssGem 2.4s ease-in-out infinite}
@keyframes ssGem{0%,100%{transform:rotate(-6deg) scale(1)}50%{transform:rotate(6deg) scale(1.08)}}
@media (prefers-reduced-motion:reduce){html body .ss-new{animation:none}}
@media (max-width:520px){html body .ss-bag{width:70px;height:84px}}
/* ---- the seed details card ---- */
html body .ss-pop-wrap{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:rgba(59,42,30,.35);padding:14px}
html body .ss-pop{position:relative;width:min(340px,100%);background:var(--paper);border:4px solid var(--ink);border-radius:22px;box-shadow:0 6px 0 var(--ink);padding:16px 16px 12px;display:flex;flex-direction:column;gap:10px;animation:ssPop .18s ease-out}
@keyframes ssPop{from{transform:scale(.9);opacity:0}}
html body .ss-pop .pl-x{position:absolute;right:10px;top:10px}
html body .ss-pop-top{display:flex;gap:14px;align-items:center;padding-right:40px}
html body .ss-pop-pic{position:relative;width:86px;height:100px;flex:none}
html body .ss-pop-pic img{width:100%;height:100%;object-fit:contain}
html body .ss-pop-pic .ss-lv{position:absolute;right:-10px;bottom:-6px;width:38px;height:38px;border:0;background:none;padding:0;line-height:0}
html body .ss-pop-pic .ss-lv .bw-star{--s:38px}
html body .ss-pop h3{margin:0 0 4px;font-size:22px;line-height:1.1}
html body .ss-pop .ss-price{margin:6px 0 0;font-weight:800;font-size:16px;display:flex;align-items:center}
html body .ss-pop .ss-stats{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;align-items:center;background:rgba(59,42,30,.07);border-radius:12px;padding:10px 12px;text-align:left;font-size:15px}
html body .ss-pop .ss-k{font-size:14px;font-weight:700;color:#7a6552}
html body .ss-pop .ss-v{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;font-weight:800;color:var(--ink);margin:0}
html body .ss-pop .ss-xp{color:#8a4fd1}
html body .ss-pop .ss-own{margin:0;text-align:center;font-weight:800;color:#3f8a35;min-height:0}
html body .ss-pop .ss-own:empty{display:none}
html body .ss-pop .ss-leaves{margin:0;text-align:center;font-weight:800;color:#b5123f}
html body .ss-pop .ss-lock{margin:0;text-align:center;font-weight:800}
html body .ss-pop .ss-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
html body .ss-pop .ss-buy{min-height:46px;font-size:17px}
html body .ss-pop-foot{display:flex;justify-content:center;border-top:2px dashed rgba(59,42,30,.2);padding-top:10px}
html body .pl-card{position:relative}
/* rarity help: the tags line up and the words sit clear of them */
html body .ss-help p{display:flex;align-items:center;gap:12px}
html body .ss-help-tag{flex:none;min-width:96px}
/* ---- inventory beside the profile (wide screens) or in its place (phones) ---- */
.bp-layer.bp-has-side{display:flex;align-items:center;justify-content:center;gap:16px}
.bp-layer .bp-card[hidden]{display:none}
.inv-card{background:var(--paper);border:4px solid var(--ink);border-radius:24px;box-shadow:0 6px 0 var(--ink),var(--lift);width:min(380px,100%);max-height:min(560px,calc(100vh - 40px));display:flex;flex-direction:column;overflow:hidden;zoom:var(--uiz);animation:ssPop .18s ease-out}
.inv-card .pl-body{overflow:auto;padding:12px}
.inv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.inv-item{display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;background:#fff;border:3px solid var(--ink);border-radius:16px;padding:8px 6px;box-shadow:0 3px 0 rgba(59,42,30,.25)}
.inv-item.on{background:#fff6cf;outline:3px solid var(--honey)}
.inv-item img{width:56px;height:56px;object-fit:contain}
.inv-item b{font-size:14px;line-height:1.1}
.inv-item small{font-weight:700;opacity:.7}
.inv-item .pl-btn{margin-top:4px;min-height:38px;padding:4px 8px}
.inv-empty{text-align:center;padding:24px 8px}.inv-empty p:first-child{font-weight:800;font-size:18px;margin:0 0 4px}
@media (max-width:759px){.inv-card{width:min(420px,100%)}}
/* ---- the level star in the top corner ---- */
.ol-badge-hud{cursor:pointer;border-radius:12px}
.ol-badge-hud:focus-visible{outline:3px solid var(--honey);outline-offset:3px}
.ol-badge-hud:hover .bw-star{transform:scale(1.08)}
.ol-badge-hud .bw-star{transition:transform .15s}
.ol-badge-hud.lvl-spin .bw-star{animation:lvlSpin 3s cubic-bezier(.3,0,.2,1)}
@keyframes lvlSpin{0%{transform:rotateY(0) scale(1)}15%{transform:rotateY(360deg) scale(1.3)}70%{transform:rotateY(1440deg) scale(1.3)}100%{transform:rotateY(1800deg) scale(1)}}
@media (prefers-reduced-motion:reduce){.ol-badge-hud.lvl-spin .bw-star{animation:lvlPulse 3s ease-in-out}@keyframes lvlPulse{20%,80%{transform:scale(1.25)}}}
/* ---- your level panel ---- */
html body .xp-top{display:flex;align-items:center;gap:14px}
html body .xp-star{flex:none;filter:drop-shadow(0 3px 0 rgba(59,42,30,.35))}
html body .xp-info{flex:1}html body .xp-info h3{margin:0;font-size:26px}html body .xp-info p{margin:2px 0 0;font-weight:700;opacity:.75}
html body .xp-bar{position:relative;height:30px;border-radius:999px;background:#eadcc0;border:3px solid var(--ink);overflow:hidden;margin:14px 0 6px}
html body .xp-bar span{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#b98cff,#8a4fd1)}
html body .xp-bar b{position:relative;display:block;text-align:center;line-height:24px;font-weight:800;color:#fff;-webkit-text-stroke:4px var(--ink);paint-order:stroke fill}
html body .xp-left{text-align:center;margin:4px 0 0;font-weight:700}
html body .xp-help{background:var(--paper2);border:3px solid var(--ink);border-radius:14px;padding:8px 12px;margin:10px 0 0}
html body .xp-help ul{list-style:none;margin:6px 0;padding:0;display:grid;gap:6px}
html body .xp-help li{display:flex;gap:10px;align-items:center;font-weight:700}
html body .xp-help li span{width:24px;text-align:center}
html body .xp-help .pl-note{margin:4px 0 0}
/* try on clothes in the shop */
html body .pl-try{background:var(--paper)!important;color:var(--ink)!important;text-shadow:none!important;border:3px solid var(--ink)!important;box-shadow:var(--pop-s)!important}
html body .try-pic{position:relative;width:min(260px,70vw);aspect-ratio:1;margin:0 auto 8px;border-radius:24px;border:4px solid var(--ink);background:radial-gradient(circle at 50% 40%,#fff,#e9ddff 70%);display:grid;place-items:center;overflow:hidden}
html body .try-pic img{width:100%;height:100%;object-fit:contain}
html body .try-row{display:flex;gap:10px;justify-content:center;align-items:center;margin-bottom:10px;font-weight:800}
html body .try-price{display:inline-flex;align-items:center}

/* emote menu: pops up above the Emote button */
#emotes{position:absolute;right:118px;bottom:calc(100% + 14px);display:flex;gap:10px;padding:10px 12px 8px;background:var(--paper);border:3px solid var(--ink);border-radius:20px;box-shadow:var(--pop),var(--lift);animation:emoPop .16s ease-out}
#emotes[hidden]{display:none}
#emotes::after{content:"";position:absolute;right:59px;bottom:-11px;width:16px;height:16px;background:var(--paper);border-right:3px solid var(--ink);border-bottom:3px solid var(--ink);transform:rotate(45deg)}
.btns #emote .ic{background:radial-gradient(circle at 35% 30%,#ffe9a8,var(--honey) 60%,#d99a1c);color:var(--ink)}
.btns #emote.on .ic{transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}
@keyframes emoPop{from{transform:translateY(8px) scale(.92);opacity:0}to{transform:none;opacity:1}}
@media (max-width:760px){#emotes{right:96px;gap:6px;padding:8px 8px 6px}#emotes::after{right:48px}}

/* top bar: level then silver on the left; friends, inbox, account, sound and settings on the right. No title card. */
html body #tl header.chip{display:none}
html body #tl{left:auto;right:12px;flex-direction:row;align-items:flex-start;gap:10px;max-width:calc(100vw/var(--uiz) - 24px)}
html body #offBadge,html body #ol-hud{left:12px;right:auto;justify-content:flex-start;flex-wrap:wrap}
html body #ol-hud{max-width:calc(100vw/var(--uiz) - 260px)}
#ol-hud-r{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end}
html body #ol-hud-r .ol-chip{min-height:46px;display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:17px}
@media (max-width:560px){
  html body #tl{left:auto;right:8px;top:8px;gap:6px;max-width:none}
  html body #offBadge,html body #ol-hud{left:8px;right:auto;top:8px}
  html body #ol-hud{max-width:calc(100vw - 190px)}
  html body #ol-hud-r{gap:6px}
  html body #ol-hud-r .ol-chip{min-height:38px;font-size:15px;padding:2px 9px}
}

/* the home button sits left of the map button, styled the same */
html body #dock #homeBtn{position:static;min-height:50px;padding:4px 14px;display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:16px;color:var(--ink);cursor:pointer;flex:none}
#dock #homeBtn svg{width:26px;height:26px}
@media (max-width:560px){html body #dock #homeBtn{min-height:42px;padding:2px 12px;font-size:15px;border-radius:14px}html body #dock #homeBtn svg{width:20px;height:20px}}
/* silver: no box, just white numbers and the coin with a soft shadow so they read on any background */
html body .offCoins,html body #ol-hud [data-fly=silver]{background:none!important;border:0!important;box-shadow:none!important;color:#fff!important;padding-left:2px;
  text-shadow:0 2px 3px rgba(30,15,5,.75),0 0 2px rgba(30,15,5,.9);font-size:20px}
html body .offCoins .pl-silver,html body #ol-hud [data-fly=silver] .pl-silver{filter:drop-shadow(0 2px 2px rgba(30,15,5,.7))}

/* the run button: blue, with the energy left filling it from the bottom */
.btns #run .ic{position:relative;overflow:hidden;background:radial-gradient(circle at 35% 30%,#b8e2ff,#4f9be0 60%,#2f6fb4)}
.btns #run .ic svg{position:relative}
.btns #run .runfill{position:absolute;left:0;right:0;bottom:0;background:rgba(255,255,255,.28);pointer-events:none}
.btns #run.off .ic{background:radial-gradient(circle at 35% 30%,#e6e1d8,#a9a196 60%,#857c70)}
.btns #run.tired .ic{background:radial-gradient(circle at 35% 30%,#ffd2c4,#e07a5f 60%,#b4503a)}
/* stall menus (pickaxe stall, café): one row per thing to buy */
html body .pl-stall{display:flex;flex-direction:column;gap:8px;margin:8px 0}
html body .pl-stall-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;background:rgba(255,244,222,.75);border:2px solid rgba(120,80,40,.18)}
html body .pl-stall-ic{font-size:30px;line-height:1;width:40px;text-align:center;flex:none}
html body .pl-stall-txt{flex:1;display:flex;flex-direction:column;min-width:0}
html body .pl-stall-txt small{opacity:.75;font-size:13px}
html body img.pl-stall-ic{width:44px;height:44px;object-fit:contain}
/* phones: invites wrap (the name and message across the top, the three choices spread underneath) */
@media (max-width:600px){
  html body .bw-inv{flex-wrap:wrap;gap:8px;padding:10px 12px}
  html body .bw-inv .who{flex:1 1 100%}
  html body .bw-inv .who b{display:inline;margin-right:6px}
  html body .bw-inv .acts{flex:1 1 100%;justify-content:space-between;gap:8px}
  html body .bw-inv .acts .bp-act{flex:1;width:auto;font-size:12.5px;white-space:nowrap}
  html body .bw-inv .acts .bp-ic{width:100%;max-width:96px;height:38px;border-radius:12px}
  html body .bw-inv .acts .bp-ic svg{width:20px;height:20px}
}
/* phones: Home and Map sit on their own row above the round action buttons, so nothing overlaps */
@media (max-width:640px){
  html body #dock{bottom:calc(104px + env(safe-area-inset-bottom));max-width:calc(100vw/var(--uiz) - 24px)}
  html body .btns{gap:6px}
  html body .btns button{width:60px}
  html body .btns button .ic{width:54px;height:54px}
  html body .btns button .ic svg{width:28px;height:28px}
}
/* phones: smaller place labels on the world map so they don't run into each other */
@media (max-width:480px){
  html body .mcard .mwrap{margin:0 4px}
  html body .mwrap button{padding:1px 6px;font-size:11.5px;border-width:2px;border-radius:10px;white-space:nowrap;box-shadow:0 2px 0 #3b2a1e}
  html body .mwrap button small{font-size:9.5px}
}
/* the rarity gem on a seed packet: small, solid, tucked on the top left corner (never faded with a locked packet) */
html body .ss-bag>img.ss-new{position:absolute;left:-9px;top:-9px;width:32px;height:32px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 1px rgba(59,42,30,.35));opacity:1;z-index:2}
html body .ss-bag.locked>img.ss-new{filter:drop-shadow(0 2px 1px rgba(59,42,30,.35))}

/* ---- painted shop windows: a chunky wooden frame, a hanging sign for the title, a carved close button, vines in the corners ---- */
html body .pl-layer{padding-top:58px}
html body .pl-card{overflow:visible;max-height:calc(100% - 60px);border:11px solid transparent;border-radius:30px;
  background:radial-gradient(ellipse at 50% 0%,#fffaf0 0%,var(--paper) 55%,#f7e8c6 100%) padding-box,url(art/ui/kit_wood.webp) 0 0/240px auto repeat border-box;
  box-shadow:0 0 0 4px var(--ink),inset 0 0 0 4px var(--ink),inset 0 8px 14px rgba(90,56,24,.18),0 10px 0 4px var(--ink),0 26px 50px rgba(30,18,8,.5)}
html body .pl-card::before,html body .pl-card::after{content:"";position:absolute;top:-26px;width:96px;height:82px;background:url(art/ui/kit_vine.webp) 0 0/contain no-repeat;pointer-events:none;z-index:2;filter:drop-shadow(0 3px 2px rgba(40,24,10,.35))}
html body .pl-card::before{left:-28px}
html body .pl-card::after{right:-28px;transform:scaleX(-1)}
html body .pl-card>.pl-head{position:static;background:none;border:0;padding:0 64px;margin:-66px 0 0;justify-content:center;z-index:3}
html body .pl-card>.pl-head h2{flex:none;margin:0;min-width:min(300px,100%);max-width:100%;box-sizing:border-box;text-align:center;
  border-style:solid;border-width:40px 62px 14px;border-image:url(art/ui/kit_sign.webp) 125 190 40 190 fill / 40px 62px 14px 62px stretch;padding:4px 0 6px;
  color:#fff;-webkit-text-stroke:6px var(--ink);paint-order:stroke fill;font-size:26px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;filter:drop-shadow(0 4px 3px rgba(40,24,10,.35))}
html body .pl-card>.pl-head .pl-x,html body .ss-pop .pl-x{position:absolute;top:-24px;right:-22px;width:54px;height:54px;border:0;border-radius:50%;background:url(art/ui/kit_close.webp) center/contain no-repeat;box-shadow:none;color:transparent;font-size:0;z-index:4;filter:drop-shadow(0 4px 2px rgba(40,24,10,.4));transition:transform .12s}
html body :is(.pl-card>.pl-head .pl-x,.ss-pop .pl-x):hover{transform:scale(1.06) rotate(-6deg)}
html body :is(.pl-card>.pl-head .pl-x,.ss-pop .pl-x):active{transform:translateY(2px) scale(.96);box-shadow:none}
html body .pl-card>.pl-head .pl-x:focus-visible{outline:3px solid var(--honey);outline-offset:2px}
html body .pl-card .pl-tabs{background:none;border-bottom:3px dashed rgba(122,75,42,.3);margin-top:6px}
html body .pl-card .pl-tabs button{border:0;box-shadow:none;border-radius:0;background:none;color:#fff;-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;
  border-style:solid;border-width:6px 18px;border-image:url(art/ui/kit_tab.webp) 60 110 fill / 6px 18px stretch;padding:2px 2px;filter:drop-shadow(0 3px 0 rgba(59,42,30,.55))}
html body .pl-card .pl-tabs button[aria-selected=true]{border-image-source:url(art/ui/kit_leafbtn.webp);border-image-slice:70 150 fill;transform:translateY(-2px)}
html body .pl-card .ss-plank{height:30px;margin:-14px -6px 0;background:none;border:0;box-shadow:none;border-radius:0;
  border-style:solid;border-width:0 26px;border-image:url(art/ui/kit_shelf.webp) 0 170 fill / 0 26px stretch;filter:drop-shadow(0 4px 2px rgba(59,42,30,.3))}
html body .pl-card .ss-shelf h3{display:inline-flex;padding:2px 14px 2px 12px;margin:0 0 6px;background:url(art/ui/kit_wood.webp) 0 0/200px auto;color:#fff;-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;border:3px solid var(--ink);border-radius:12px;box-shadow:var(--pop-s)}
html body .pl-card .ss-shelf h3 small{color:#fff6e2;opacity:1;-webkit-text-stroke:3px var(--ink)}
html body .ss-pop{border:9px solid transparent;background:radial-gradient(ellipse at 50% 0%,#fffaf0,var(--paper) 60%) padding-box,url(art/ui/kit_wood.webp) 0 0/220px auto border-box;box-shadow:0 0 0 4px var(--ink),inset 0 0 0 3px var(--ink),0 8px 0 4px var(--ink),0 20px 40px rgba(30,18,8,.45)}
@media (max-width:520px){
  html body .pl-card{border-width:8px}
  html body .pl-card>.pl-head{padding:0 46px;margin-top:-58px}
  html body .pl-card>.pl-head h2{font-size:21px;min-width:0;border-width:34px 48px 12px;border-image-width:34px 48px 12px 48px}
  html body .pl-card::before,html body .pl-card::after{width:70px;height:60px;top:-20px}
  html body .pl-card>.pl-head .pl-x{width:46px;height:46px;top:-20px;right:-16px}
}
html body .pl-card .pl-tabs button{border:0 !important;box-shadow:none !important;border-radius:0 !important;background:none !important;color:#fff !important;-webkit-text-stroke:3.5px var(--ink);paint-order:stroke fill;font-size:16px;
  border-style:solid !important;border-width:8px 20px !important;border-image:url(art/ui/kit_tab.webp) 60 110 fill / 8px 20px stretch !important;padding:0 4px !important;min-height:40px}
html body .pl-card .pl-tabs button[aria-selected=true]{border-image:url(art/ui/kit_leafbtn.webp) 70 150 fill / 8px 20px stretch !important}
html body .pl-card .pl-tabs button:active{transform:translateY(2px)}
html body .pl-card .pl-item{border:6px solid transparent;border-radius:20px;background:linear-gradient(#fffdf6,#fff3dc) padding-box,url(art/ui/kit_wood.webp) 0 0/180px auto border-box;box-shadow:0 0 0 3px var(--ink),inset 0 0 0 2px var(--ink),0 5px 0 3px var(--ink)}
html body .pl-card .pl-grid{gap:18px;padding:4px 4px 8px}
html body .pl-card .pl-item{border-width:4px}
html body .pl-card .pl-item img{width:102px;height:102px;filter:drop-shadow(0 4px 3px rgba(59,42,30,.25))}
html body .pl-card .pl-item button:not(:disabled),html body .pl-card .ss-buy:not(:disabled){background:none !important;border:0 !important;box-shadow:none !important;border-radius:0 !important;
  border-style:solid !important;border-width:9px 24px !important;border-image:url(art/ui/kit_leafbtn.webp) 70 150 fill / 9px 24px stretch !important;filter:drop-shadow(0 3px 0 rgba(40,70,20,.6));
  color:#fff;-webkit-text-stroke:3.5px #2f5a1c;paint-order:stroke fill;text-shadow:none;padding:0 4px !important}
html body .pl-card .pl-item button:not(:disabled):active,html body .pl-card .ss-buy:not(:disabled):active{transform:translateY(2px);filter:none}
@media (max-width:520px){html body .pl-card .pl-grid{gap:12px}html body .pl-card .pl-item img{width:76px;height:76px}}
/* round 2: a crafted interior, display plates behind the goods, wooden price tags, a clearer active tab */
html body .pl-card{background:
  radial-gradient(ellipse at 50% -10%,rgba(255,255,255,.75),transparent 55%) padding-box,
  radial-gradient(circle at 20% 30%,rgba(196,143,18,.06) 0 2px,transparent 3px) 0 0/23px 23px padding-box,
  radial-gradient(circle at 70% 80%,rgba(122,75,42,.06) 0 1.5px,transparent 2.5px) 0 0/31px 31px padding-box,
  linear-gradient(#fff6e2,#f5e3bd) padding-box,url(art/ui/kit_wood.webp) 0 0/240px auto repeat border-box;
  box-shadow:0 0 0 4px var(--ink),inset 0 0 0 4px var(--ink),inset 0 10px 18px rgba(90,56,24,.22),inset 0 -8px 16px rgba(90,56,24,.12),0 10px 0 4px var(--ink),0 26px 50px rgba(30,18,8,.5)}
html body .pl-card .pl-item{background:radial-gradient(ellipse at 50% 28%,#fffdf4 0,#ffefc6 38%,#f3d9a4 78%,#e9c88c 100%) padding-box,url(art/ui/kit_wood.webp) 0 0/180px auto border-box;padding-top:10px}
html body .pl-card .pl-item img{background:radial-gradient(ellipse at 50% 88%,rgba(122,75,42,.28) 0,rgba(122,75,42,0) 55%)}
html body .pl-card .pl-item b{font-size:17px;font-weight:800;letter-spacing:.2px}
html body .pl-card .pl-item .pl-rar{border-radius:999px;padding:1px 10px;box-shadow:0 2px 0 var(--ink)}
html body .pl-card .pl-price{display:inline-flex;align-items:center;gap:2px;opacity:1;font-weight:800;font-size:14px;color:var(--ink);margin:2px 0;
  border-style:solid;border-width:5px 10px 5px 30px;border-image:url(art/ui/kit_tag.webp) 40 50 40 150 fill / 5px 10px 5px 30px stretch;padding:1px 2px;filter:drop-shadow(0 2px 1px rgba(59,42,30,.3))}
html body .pl-card .pl-tabs button:not([aria-selected=true]){opacity:.9;transform:scale(.94)}
html body .pl-card .pl-tabs button[aria-selected=true]{transform:translateY(-3px) scale(1.06);font-size:17px}
/* the sign's ropes run right up off the top of the screen, so it hangs from something instead of stopping in mid air */
html body .pl-card>.pl-head h2{position:relative;overflow:visible;text-overflow:clip;border-width:40px 77px 14px;border-image:url(art/ui/kit_sign.webp) 125 240 40 240 fill / 40px 77px 14px 77px stretch}
html body .pl-card>.pl-head h2::before,html body .pl-card>.pl-head h2::after{content:"";position:absolute;bottom:100%;height:100vh;width:15px;margin-bottom:36px;background:url(art/ui/kit_rope.webp) center bottom/15px auto repeat-y;pointer-events:none}
html body .pl-card>.pl-head h2::before{left:-22px}
html body .pl-card>.pl-head h2::after{right:-28px}
@media (max-width:520px){
  html body .pl-card>.pl-head h2{font-size:19px;border-width:34px 65px 12px;border-image-width:34px 65px 12px 65px}
  html body .pl-card>.pl-head h2::before,html body .pl-card>.pl-head h2::after{width:12px;background-size:12px auto;margin-bottom:31px}
  html body .pl-card>.pl-head h2::before{left:-18px}
  html body .pl-card>.pl-head h2::after{right:-23px}
}
/* seed shelves: the bags (and their level stars) stand in front of the plank, and there's headroom so the rarity gems aren't cut off */
html body .pl-card .ss-row{position:relative;z-index:2;padding-top:14px}
html body .pl-card .ss-plank{position:relative;z-index:1}
/* phones: the garden's Plant and Expand buttons get their own row above Home and Map, instead of sitting under them */
@media (max-width:640px){
  html body #pl-actions{bottom:calc(164px + env(safe-area-inset-bottom));right:12px;gap:8px}
  html body #pl-actions button{min-height:44px;padding:0 14px;font-size:15px;border-radius:14px}
}
/* the sign keeps its painted proportions (its leaves and ladybird were being squashed): the middle band is exactly as tall as the art */
html body .pl-layer{padding-top:96px}
html body .pl-card{max-height:calc(100% - 100px)}
html body .pl-card>.pl-head{margin-top:-92px}
html body .pl-card>.pl-head h2,html body .ol-inbox>h2{box-sizing:content-box;height:66px;line-height:66px;padding:0 4px}
@media (max-width:520px){
  html body .pl-layer{padding-top:86px}
  html body .pl-card>.pl-head{margin-top:-82px}
  html body .pl-card>.pl-head h2,html body .ol-inbox>h2{height:56px;line-height:56px}
}
/* the inbox wears the same painted window: wooden frame, vines, hanging sign with ropes, carved close button */
html body .ol-layer:has(.ol-inbox){padding-top:96px}
html body .ol-card.ol-inbox{position:relative;overflow:visible;display:flex;flex-direction:column;max-height:calc(100% - 100px);padding:0 18px 14px;border:11px solid transparent;border-radius:30px;
  background:radial-gradient(ellipse at 50% -10%,rgba(255,255,255,.75),transparent 55%) padding-box,linear-gradient(#fff6e2,#f5e3bd) padding-box,url(art/ui/kit_wood.webp) 0 0/240px auto repeat border-box;
  box-shadow:0 0 0 4px var(--ink),inset 0 0 0 4px var(--ink),inset 0 10px 18px rgba(90,56,24,.22),0 10px 0 4px var(--ink),0 26px 50px rgba(30,18,8,.5)}
html body .ol-inbox::before,html body .ol-inbox::after{content:"";position:absolute;top:-26px;width:96px;height:82px;background:url(art/ui/kit_vine.webp) 0 0/contain no-repeat;pointer-events:none;z-index:2;filter:drop-shadow(0 3px 2px rgba(40,24,10,.35))}
html body .ol-inbox::before{left:-28px}html body .ol-inbox::after{right:-28px;transform:scaleX(-1)}
html body .ol-inbox>h2{position:relative;align-self:center;flex:none;margin:-92px 0 6px;min-width:min(240px,100%);text-align:center;z-index:3;
  border-style:solid;border-width:40px 77px 14px;border-image:url(art/ui/kit_sign.webp) 125 240 40 240 fill / 40px 77px 14px 77px stretch;
  color:#fff;-webkit-text-stroke:6px var(--ink);paint-order:stroke fill;font-size:26px;white-space:nowrap;filter:drop-shadow(0 4px 3px rgba(40,24,10,.35))}
html body .ol-inbox>h2::before,html body .ol-inbox>h2::after{content:"";position:absolute;bottom:100%;height:100vh;width:15px;margin-bottom:36px;background:url(art/ui/kit_rope.webp) center bottom/15px auto repeat-y;pointer-events:none}
html body .ol-inbox>h2::before{left:-22px}html body .ol-inbox>h2::after{right:-28px}
html body .ol-inbox .ol-x{position:absolute;top:-24px;right:-22px;width:54px;height:54px;padding:0;border:0;border-radius:50%;background:url(art/ui/kit_close.webp) center/contain no-repeat;z-index:4;cursor:pointer;filter:drop-shadow(0 4px 2px rgba(40,24,10,.4))}
html body .ol-inbox .ol-x:active{transform:translateY(2px) scale(.96)}
html body .ol-inbox .ol-scroll{overflow:auto;min-height:0;padding:4px 2px 2px}
html body .ol-inbox .bw-inv{border:4px solid transparent;border-radius:18px;background:radial-gradient(ellipse at 50% 20%,#fffdf4,#ffefc6 60%,#f3d9a4) padding-box,url(art/ui/kit_wood.webp) 0 0/180px auto border-box;box-shadow:0 0 0 3px var(--ink),0 4px 0 3px var(--ink)}
@media (max-width:520px){
  html body .ol-layer:has(.ol-inbox){padding-top:86px}
  html body .ol-card.ol-inbox{border-width:8px;padding:0 12px 12px}
  html body .ol-inbox>h2{margin-top:-82px;font-size:21px;border-width:34px 65px 12px;border-image-width:34px 65px 12px 65px}
  html body .ol-inbox>h2::before,html body .ol-inbox>h2::after{width:12px;background-size:12px auto;margin-bottom:31px}
  html body .ol-inbox>h2::before{left:-18px}html body .ol-inbox>h2::after{right:-23px}
  html body .ol-inbox::before,html body .ol-inbox::after{width:70px;height:60px;top:-20px}
  html body .ol-inbox .ol-x{width:46px;height:46px;top:-20px;right:-16px}
}
/* phones: a tidy bottom-left dock. Room chat log (compact), then the chat bar across the full width, then Home and Map,
   all the same height; the garden's Plant/Expand buttons move up under the top right buttons so nothing crowds */
@media (max-width:640px){
  html body #dock{left:10px;right:10px;max-width:none;width:auto;gap:6px}
  html body #dock .dock-row{flex-wrap:wrap;gap:6px;align-items:stretch}
  html body #dock #ol-chat{order:-1;flex:1 0 100%;width:100%}
  html body #ol-say{width:100%;gap:6px}
  html body #ol-say input{flex:1 1 auto;min-width:0;min-height:46px;font-size:18px;padding:6px 12px}
  html body #ol-say .ol-chip,html body #dock #homeBtn,html body #dock #mapBtn{min-height:46px;height:46px;padding:0 14px;font-size:15px;border-radius:14px}
  html body #ol-say .ol-chip{display:inline-flex;align-items:center;justify-content:center}html body #ol-say .ol-chip[type=button]{width:46px;padding:0}
  html body #dock #homeBtn svg,html body #dock #mapBtn svg,html body #ol-say .ol-chip svg{width:20px;height:20px}
  html body #ol-log .ol-logtog{min-height:32px;font-size:14px;padding:2px 10px}
  html body #ol-log .ol-loglist{max-height:min(16vh,120px);font-size:17px;padding:4px 10px}
  html body #pl-actions{top:calc(84px + env(safe-area-inset-top));bottom:auto;right:10px;flex-direction:column;align-items:flex-end;gap:6px}
  html body #pl-actions button{min-height:42px;height:42px;padding:0 14px;font-size:15px}
}
/* the chat show/hide button (left of Emote) and the fade it controls */
.btns #chatTog .ic{background:radial-gradient(circle at 35% 30%,#fff3d6,#f2c98a 60%,#c98a4e);color:var(--ink)}
.btns #chatTog[aria-pressed=false] .ic{background:radial-gradient(circle at 35% 30%,#eee6d6,#cbbfa8 60%,#9a8c74);color:#5a4a3a}
#ol-log,#ol-chat{transition:opacity .25s ease,transform .25s ease}
body.chat-hidden #ol-log,body.chat-hidden #ol-chat{opacity:0;transform:translateY(8px);pointer-events:none;visibility:hidden;transition:opacity .25s ease,transform .25s ease,visibility 0s .25s}
@media (max-width:640px){
  html body .btns{gap:4px}
  html body .btns button{width:54px}
  html body .btns button .ic{width:48px;height:48px}
  html body .btns button .ic svg{width:25px;height:25px}
  html body .btns button .lb{font-size:11.5px}
}
/* the Bugbox logo heads the start screen */
html body .ol-card h1.ol-logo{margin:-6px 0 2px;text-align:center;line-height:0}
html body .ol-card h1.ol-logo img{width:min(300px,82%);height:auto;filter:drop-shadow(0 6px 6px rgba(70,30,10,.25))}
/* the dock's own box is see-through to taps: only its buttons, chat bar and log catch them, so walking works in the empty space (and where hidden chat was) */
html body #dock,html body #dock .dock-row{pointer-events:none}
html body #dock .dock-row>*,html body #dock>#ol-log,html body #dock #ol-chat>*{pointer-events:auto}
html body #dock #ol-chat{pointer-events:none}
body.chat-hidden #dock #ol-log,body.chat-hidden #dock #ol-chat,body.chat-hidden #dock #ol-chat *{pointer-events:none !important}

/* the Games list on a bug's profile: a tile per game you can challenge them to */
html body .ag-picks{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:8px 0}
html body .ag-pick{display:flex;flex-direction:column;align-items:center;gap:6px;width:150px;padding:10px;border:4px solid transparent;border-radius:18px;cursor:pointer;font:800 16px "Baloo 2",system-ui,sans-serif;color:var(--ink);
  background:radial-gradient(ellipse at 50% 28%,#fffdf4 0,#ffefc6 45%,#f3d9a4 100%) padding-box,url(art/ui/kit_wood.webp) 0 0/180px auto border-box;box-shadow:0 0 0 3px var(--ink),0 5px 0 3px var(--ink)}
html body .ag-pick:active{transform:translateY(3px);box-shadow:0 0 0 3px var(--ink),0 2px 0 3px var(--ink)}
html body .ag-pick .ag-tile-art{width:100%}
html body .ag-invite{flex-wrap:wrap}

/* ---------- sign in and sign up: the loading screen's warm sunset, the Bugbox logo, a chunky wooden framed card ---------- */
html body .ol-layer:has(.ol-auth:not(.ol-sheet)){background:radial-gradient(ellipse at 50% 38%,#ffe2a8 0%,#f3b66e 40%,#c9733c 80%,#8e4a26 100%) !important;backdrop-filter:none !important;overflow-y:auto;align-items:start;padding:52px 14px 24px}
html body .ol-layer:has(.ol-auth:not(.ol-sheet))::before{content:"";position:fixed;inset:0;pointer-events:none;
  background:radial-gradient(circle at 12% 80%,rgba(255,255,255,.18) 0 3px,transparent 4px) 0 0/90px 90px,radial-gradient(circle at 70% 20%,rgba(255,240,200,.22) 0 2px,transparent 3px) 0 0/130px 130px}
html body .ol-sheet-layer{z-index:40;background:rgba(70,36,16,.45) !important}
html body .ol-card.ol-auth{position:relative;width:min(420px,100%);margin:auto;padding:0 22px 16px;overflow:visible;max-height:none;font-family:"Baloo 2",system-ui,sans-serif;
  border:10px solid transparent;border-radius:30px;background:linear-gradient(#fff8e8,#f8e8c4) padding-box,url(art/ui/kit_wood.webp) 0 0/240px auto repeat border-box;
  box-shadow:0 0 0 4px var(--ink),inset 0 0 0 4px var(--ink),0 10px 0 4px var(--ink),0 26px 50px rgba(60,26,8,.45)}
html body .ol-card.ol-auth.ol-sheet{padding:16px 20px 16px;width:min(400px,100%)}
html body .ol-auth-logo{display:flex;justify-content:center;margin:-10px -12px 0;pointer-events:none}
html body .ol-auth-logo img{width:min(300px,86%);height:auto;margin-top:-42px;filter:drop-shadow(0 8px 8px rgba(70,30,10,.3))}
html body .ol-card.ol-auth h2{margin:-2px 0 6px;text-align:center;font-size:26px;font-weight:800;color:#fff;-webkit-text-stroke:6px var(--ink);paint-order:stroke fill;letter-spacing:.3px}
html body .ol-card.ol-auth.ol-sheet h2{margin-top:0}
html body .ol-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
html body .ol-auth-tag{text-align:center;font-weight:800;font-size:18px;margin:-4px 0 8px;color:#7a4a1e}
html body .ol-auth-msg{text-align:center;font-weight:700;margin:-4px 0 8px;padding:8px 12px;border-radius:12px;background:#fff1cc;border:2px solid #e0a43a}
html body .ol-card.ol-auth label{font-weight:800;margin:10px 0 4px;color:var(--ink)}
html body .ol-card.ol-auth :is(input:not([type=checkbox]),select){min-height:48px;font-size:18px;background:#fffdf6;border:3px solid var(--ink);border-radius:14px;box-shadow:inset 0 3px 0 rgba(59,42,30,.08)}
html body .ol-card.ol-auth :is(input,select):focus-visible{outline:3px solid var(--honey);outline-offset:2px}
html body .ol-card.ol-auth .ol-btn{min-height:52px;font-size:19px;border-radius:16px !important;background:linear-gradient(#ffe78a,#ffcf4a 55%,#f0a52a) !important;color:var(--ink) !important;text-shadow:0 1px 0 rgba(255,255,255,.5) !important;border:3px solid var(--ink) !important;box-shadow:0 5px 0 var(--ink) !important}
html body .ol-card.ol-auth .ol-btn.alt{background:linear-gradient(#fff8e8,#f3dfb4) !important;font-size:17px}
html body .ol-card.ol-auth .ol-btn:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 var(--ink) !important}
html body .ol-card.ol-auth .ol-row{gap:10px}
html body .ol-card.ol-auth .ol-small{font-size:14px;opacity:.85;margin:6px 0 0}
html body .ol-auth-note{text-align:center}
html body .ol-card.ol-auth .ol-link{color:#9a4f12;font-weight:800}
html body .ol-card.ol-auth .ol-back{display:block;margin:8px auto 0}
html body .ol-auth-foot{display:flex;justify-content:center;align-items:center;gap:10px;margin:10px 0 0;padding-top:8px;border-top:2px dashed rgba(122,75,42,.3);font-size:14px}
html body .ol-auth-foot .ol-link{padding:4px 2px;font-size:14px}
html body .ol-auth-pv{text-align:center;font-weight:800;margin:6px 0 0;color:#9a4f12}
html body .ol-card.ol-auth .ol-check{align-items:flex-start;font-weight:600;line-height:1.35}
html body .ol-card.ol-auth .ol-check .ol-link{padding:0;display:inline;font-size:inherit}
html body .ol-card.ol-auth .ol-check input{accent-color:#f0a52a}
html body .ol-card.ol-auth .ol-err{color:#b3261e;text-align:center}
html body .ol-card.ol-auth .ol-rules{line-height:1.4}
html body .ol-card.ol-auth .ol-rules li{margin:4px 0}
html body .ol-card.ol-auth .ol-names button{min-height:44px;font-size:16px}
@media (max-width:520px){
  html body .ol-card.ol-auth{border-width:8px;padding:0 16px 14px}
  html body .ol-auth-logo img{width:min(250px,88%);margin-top:-34px}
  html body .ol-card.ol-auth .ol-row{flex-direction:column;gap:0}
  html body .ol-card.ol-auth h2{font-size:23px}
}
html body .ol-auth-logo.sm img{width:min(210px,70%);margin-top:-36px}
@media (max-width:520px){html body .ol-auth-logo.sm img{width:min(180px,66%);margin-top:-30px}}
/* round 2: a painted sunset scene behind the card (the garden's hills, washed in the loading screen's warm light), tighter spacing, password eye, clear name picks */
html body .ol-layer:has(.ol-auth:not(.ol-sheet)){background:
  radial-gradient(ellipse at 50% 30%,rgba(255,226,168,.55) 0%,rgba(243,182,110,.35) 45%,rgba(142,74,38,.75) 100%),
  url(art/garden/backdrop.webp) center 40%/cover no-repeat,#c9733c !important}
html body .ol-layer:has(.ol-auth:not(.ol-sheet))::before{background:
  conic-gradient(from 200deg at 50% -10%,transparent 0 6deg,rgba(255,240,200,.16) 6deg 10deg,transparent 10deg 18deg,rgba(255,240,200,.12) 18deg 23deg,transparent 23deg 32deg,rgba(255,240,200,.14) 32deg 36deg,transparent 36deg)}
html body .ol-auth-logo.sm img{width:min(170px,60%);margin-top:-32px}
html body .ol-card.ol-auth h2{margin:-6px 0 2px;font-size:24px}
html body .ol-card.ol-auth label{margin:8px 0 3px}
html body .ol-card.ol-auth :is(input:not([type=checkbox]),select){min-height:46px}
html body .ol-card.ol-auth .ol-btn.alt{box-shadow:0 4px 0 var(--ink) !important}
html body .ol-card.ol-auth .ol-err:empty{min-height:0;margin:4px 0 0}
html body .ol-pw{position:relative}
html body .ol-pw input{padding-right:52px !important}
html body .ol-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:40px;height:36px;border:0;border-radius:10px;background:transparent;font-size:20px;cursor:pointer;opacity:.55}
html body .ol-eye[aria-pressed=true]{opacity:1;background:#fff1cc}
html body .ol-eye:focus-visible{outline:3px solid var(--honey)}
html body .ol-card.ol-auth .ol-names{gap:8px}
html body .ol-card.ol-auth .ol-names button{background:#fffdf6;position:relative}
html body .ol-card.ol-auth .ol-names button[aria-pressed=true]{background:linear-gradient(#ffe78a,#ffcf4a);box-shadow:0 0 0 3px #f0a52a,0 3px 0 var(--ink)}
html body .ol-card.ol-auth .ol-names button[aria-pressed=true]::after{content:"✓";position:absolute;right:8px;top:50%;transform:translateY(-50%);font-weight:900;color:var(--ink)}
html body .ol-card.ol-auth .ol-more{margin-top:4px;text-decoration:none}
html body .ol-auth-step{margin:4px 0 0;padding:8px 12px;border-radius:12px;background:#fff1cc;border:2px solid #f0c25a;font-weight:800;text-align:center}
html body .ol-step[hidden]{display:none}
html body .ol-card.ol-auth .ol-check{margin-top:10px}
html body .ol-card.ol-auth .ol-check input{width:26px;height:26px;margin-top:0}
@media (max-width:520px){html body .ol-auth-logo.sm img{width:min(150px,56%);margin-top:-28px}}
html body .ol-card.ol-auth label.ol-check{display:flex;gap:12px;align-items:center;font-weight:700}
html body .ol-card.ol-auth label.ol-check input{flex:none}
/* round 3: step labels, a hand drawn shuffle icon, slimmer name pills so step 1 fits */
html body .ol-stepno{margin:0 0 2px;text-align:center;font-size:13px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:#9a4f12}
html body .ol-card.ol-auth .ol-more{display:inline-flex;align-items:center;gap:6px}
html body .ol-shuf{display:inline-grid;width:22px;height:22px;color:#7a4a1e}
html body .ol-shuf svg{width:100%;height:100%}
html body .ol-card.ol-auth .ol-names button{min-height:40px;padding:6px 10px}
/* fit the longest step on a laptop screen with no scrolling */
html body .ol-layer:has(.ol-auth:not(.ol-sheet)){padding-top:44px !important;padding-bottom:10px !important}
html body .ol-card.ol-auth{padding-bottom:10px}
html body .ol-card.ol-auth .ol-back{margin:2px auto 0;padding:4px 0}
html body .ol-auth-foot{margin-top:4px;padding-top:6px}
html body .ol-card.ol-auth label{margin:6px 0 3px}
html body .ol-card.ol-auth .ol-small{margin-top:4px}
html body .ol-card.ol-auth .ol-btn{margin-top:8px}
html body .ol-auth-logo.sm img{width:min(150px,54%);margin-top:-30px}
/* a chunky painted tick box to match the buttons */
html body .ol-card.ol-auth .ol-check input[type=checkbox]{appearance:none;-webkit-appearance:none;width:30px;height:30px;margin:0;flex:none;border:3px solid var(--ink);border-radius:9px;background:#fffdf6;box-shadow:0 3px 0 var(--ink);display:grid;place-items:center;cursor:pointer}
html body .ol-card.ol-auth .ol-check input[type=checkbox]:checked{background:linear-gradient(#ffe78a,#ffcf4a)}
html body .ol-card.ol-auth .ol-check input[type=checkbox]:checked::after{content:"✓";font:900 18px/1 "Baloo 2",system-ui,sans-serif;color:var(--ink)}
html body .ol-card.ol-auth .ol-check input[type=checkbox]:focus-visible{outline:3px solid var(--honey);outline-offset:2px}

/* ===== painted HUD (main game screen): the same wood, cream, leaf and plank pieces as the shops, settings and inbox ===== */
:root{--rim:url(art/ui/kit_wood.webp) 0 0/160px auto repeat border-box;--cream:linear-gradient(#fffaf0,#f6e6c2) padding-box}
/* every round cornered HUD button: cream face in a wooden rim with a dark ink outline and a chunky lip */
html body :is(#tools .chip,#ol-hud-r .ol-chip,#dock .dock-row>.chip,#ol-say .ol-chip[type=button],#ol-hud .ol-chip:not([data-fly])){
  border:5px solid transparent!important;border-radius:18px!important;background:var(--cream),var(--rim)!important;
  box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.55),0 5px 0 2.5px var(--ink),0 9px 14px rgba(30,18,8,.28)!important;color:var(--ink)!important}
html body :is(#tools .chip,#ol-hud-r .ol-chip,#dock .dock-row>.chip,#ol-say .ol-chip[type=button],#ol-hud .ol-chip:not([data-fly])):hover{filter:brightness(1.05)}
html body :is(#tools .chip,#ol-hud-r .ol-chip,#dock .dock-row>.chip,#ol-say .ol-chip[type=button],#ol-hud .ol-chip:not([data-fly])):active{transform:translateY(3px);box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.55),0 2px 0 2.5px var(--ink)!important}
/* Send: the green leaf button, like Buy in the shops */
html body #ol-say .ol-chip[type=submit]{background:none!important;box-shadow:none!important;border-style:solid!important;border-width:9px 22px!important;border-radius:0!important;
  border-image:url(art/ui/kit_leafbtn.webp) 70 150 fill / 9px 22px stretch!important;padding:0 6px!important;color:#fff!important;font-weight:800;font-size:19px;
  -webkit-text-stroke:4px #2f4a12;paint-order:stroke fill;filter:drop-shadow(0 3px 0 rgba(40,70,20,.65))}
html body #ol-say .ol-chip[type=submit]:active{transform:translateY(2px);filter:drop-shadow(0 1px 0 rgba(40,70,20,.65))}
/* the chat box: cream paper in a thin wooden rim */
html body #ol-say input{border:4px solid transparent!important;border-radius:16px!important;background:linear-gradient(#fffdf7,#fff6e3) padding-box,var(--rim)!important;
  box-shadow:0 0 0 2.5px var(--ink),inset 0 2px 4px rgba(59,42,30,.18),0 4px 0 2.5px var(--ink)!important}
html body #ol-say input:focus{outline:none;box-shadow:0 0 0 2.5px var(--ink),0 0 0 6px rgba(255,212,92,.75),0 4px 0 2.5px var(--ink)!important}
/* quick phrases menu */
html body #ol-phr{border:6px solid transparent!important;border-radius:20px!important;background:var(--cream),var(--rim)!important;box-shadow:0 0 0 3px var(--ink),0 6px 0 3px var(--ink),0 14px 30px rgba(30,18,8,.35)!important}
html body #ol-phr button{background:#fffdf6!important;border:2.5px solid var(--ink)!important;border-radius:12px!important;box-shadow:0 3px 0 var(--ink)!important;color:var(--ink)!important}
/* room chat log: a wooden framed note with a plank header */
html body #ol-log{border:6px solid transparent!important;border-radius:20px!important;background:linear-gradient(#fffdf6,#fff1d6) padding-box,var(--rim)!important;
  box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.5),0 5px 0 2.5px var(--ink),0 10px 18px rgba(30,18,8,.3)!important}
html body #ol-log .ol-logtog{background:url(art/ui/kit_wood.webp) 0 0/200px auto!important;color:#fff!important;-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;border-bottom:3px solid var(--ink)!important;font-weight:800}
html body #ol-log .ol-logtog .ol-ic{color:#fff;filter:drop-shadow(0 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink))}
html body #ol-log .ol-loglist p b{color:#6b4a2b}
html body #ol-log .ol-loglist p.me b{color:#3f7a1f}
/* the round action buttons: coloured faces set in a wooden ring, with plank name plates */
html body .btns button .ic{border:5px solid transparent!important;background-clip:padding-box,border-box!important;
  box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.5),inset 0 -6px 0 rgba(0,0,0,.12),inset 0 5px 0 rgba(255,255,255,.35),0 5px 0 2.5px var(--ink),0 9px 14px rgba(30,18,8,.28)!important}
html body .btns #chatTog .ic,html body .btns #close .ic{background:radial-gradient(circle at 35% 30%,#fff,#f1e3c3 60%,#d9c194) padding-box,var(--rim)!important}
html body .btns #emote .ic{background:radial-gradient(circle at 35% 30%,#ffe9a8,var(--honey) 60%,#d99a1c) padding-box,var(--rim)!important}
html body .btns #run .ic{background:radial-gradient(circle at 35% 30%,#b8e2ff,#4f9be0 60%,#2f6fb4) padding-box,var(--rim)!important}
html body .btns #run.off .ic{background:radial-gradient(circle at 35% 30%,#e6e1d8,#a9a196 60%,#857c70) padding-box,var(--rim)!important}
html body .btns #run.tired .ic{background:radial-gradient(circle at 35% 30%,#ffd2c4,#e07a5f 60%,#b4503a) padding-box,var(--rim)!important}
html body .btns #roll .ic{background:radial-gradient(circle at 35% 30%,#c5f0a8,var(--leaf) 60%,var(--leafD)) padding-box,var(--rim)!important}
html body .btns button:active .ic,html body .btns #emote.on .ic{transform:translateY(3px);box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.5),0 2px 0 2.5px var(--ink)!important}
html body .btns button .lb{background:url(art/ui/kit_wood.webp) 0 0/140px auto!important;border:2.5px solid var(--ink)!important;border-radius:10px!important;color:#fff!important;
  -webkit-text-stroke:3.5px var(--ink);paint-order:stroke fill;font-weight:800;box-shadow:0 2px 0 var(--ink);padding:0 8px!important}
/* the emote picker that pops out above Emote: a wooden framed tray */
html body #emotes{border:6px solid transparent;background:var(--cream),var(--rim);box-shadow:0 0 0 2.5px var(--ink),0 5px 0 2.5px var(--ink),0 12px 24px rgba(30,18,8,.3)}
html body #emotes::after{background:#f6e6c2;border-color:var(--ink);bottom:-17px}
/* give the chat box room to breathe beside Home and Map on wider screens */
@media (min-width:901px){html body #dock{max-width:min(620px,calc(100vw/var(--uiz) - 420px))}html body #ol-say input{min-width:150px}}
/* round 2: lighter frames, a slimmer chat log, a run energy bar, outlined icons and a wooden silver plaque */
html body :is(#tools .chip,#ol-hud-r .ol-chip,#dock .dock-row>.chip,#ol-say .ol-chip[type=button],#ol-hud .ol-chip:not([data-fly])){border-width:4px!important}
html body #ol-log{border-width:5px!important}
@media (min-width:901px){html body #ol-log{max-width:440px}}
html body .btns button .ic{border-width:4px!important}
html body .btns button .ic svg{filter:drop-shadow(1.2px 0 0 var(--ink)) drop-shadow(-1.2px 0 0 var(--ink)) drop-shadow(0 1.2px 0 var(--ink)) drop-shadow(0 -1.2px 0 var(--ink))}
html body .btns :is(#chatTog,#close,#emote) .ic svg{filter:none}
html body .btns #chatTog .lb{font-size:12.5px}
html body .btns #run .lb{position:relative}
html body .btns #run .ebar{position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);display:block;width:44px;height:7px;border-radius:4px;background:rgba(59,42,30,.55);box-shadow:inset 0 0 0 1.5px var(--ink);overflow:hidden;-webkit-text-stroke:0}
html body .btns #run .ebar i{display:block;height:100%;background:linear-gradient(#bff27a,#6fbf2e);border-radius:4px}
html body .btns #run.tired .ebar i{background:linear-gradient(#ffc2a8,#e07a5f)}
html body .btns #run .runfill{display:none}
/* silver: a little wooden plaque with white outlined numbers, like the shop shelf labels */
html body .offCoins,html body #ol-hud [data-fly=silver]{border-style:solid!important;border-width:6px 16px!important;border-image:url(art/ui/kit_tab.webp) 60 110 fill / 6px 16px stretch!important;
  padding:0 4px 0 0!important;min-height:40px;color:#fff!important;-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;filter:drop-shadow(0 3px 0 rgba(59,42,30,.55))}

/* ===== round buttons with painted icons (top right, action buttons, Home, Map, phrases, chat log) ===== */
:root{--hb:58px}
@media (max-width:640px){:root{--hb:46px}}
html body :is(#tools .chip,#ol-hud-r .ol-chip:not([aria-label="Account menu"])){width:var(--hb)!important;height:var(--hb)!important;min-width:0!important;min-height:0!important;
  padding:0!important;border-radius:50%!important;display:grid!important;place-items:center;position:relative;font-size:0!important;line-height:0;flex:none}
html body :is(#tools .chip,#ol-hud-r .ol-chip:not([aria-label="Account menu"]))>:is(svg,.ol-ic){display:none!important}
html body :is(#tools .chip,#ol-hud-r .ol-chip:not([aria-label="Account menu"]))::before{content:"";position:absolute;inset:13%;background:var(--ico) center/contain no-repeat;filter:drop-shadow(0 2px 1px rgba(40,24,10,.35))}
html body #ol-hud-r .ol-dot{position:absolute;top:-6px;right:-6px;font-size:12px;line-height:1}
html body #muteBtn{--ico:url(art/ui/ic/sound.webp)}
html body #muteBtn[aria-pressed=true]{--ico:url(art/ui/ic/mute.webp)}
html body #setBtn{--ico:url(art/ui/ic/gear.webp)}
html body .dbg-btn{--ico:url(art/ui/ic/debug.webp)}
html body #ol-hud-r [aria-label^=Inbox]{--ico:url(art/ui/ic/inbox.webp)}
html body #ol-hud-r [aria-label^=Friends]{--ico:url(art/ui/ic/friends.webp)}
html body #tl,html body #ol-hud-r{align-items:center}
/* action buttons: cream faces with the painted icon */
html body .btns button .ic{background:radial-gradient(circle at 35% 28%,#fff,#f7ecd2 55%,#e6d3a8) padding-box,var(--rim)!important;position:relative}
html body .btns button .ic>svg,html body .btns #run .runfill{display:none!important}
html body .btns button .ic::before{content:"";position:absolute;inset:11%;background:var(--ico) center/contain no-repeat;filter:drop-shadow(0 2px 1px rgba(40,24,10,.35))}
html body .btns #chatTog{--ico:url(art/ui/ic/chat.webp)}
html body .btns #chatTog[aria-pressed=false]{--ico:url(art/ui/ic/chatoff.webp)}
html body .btns #emote{--ico:url(art/ui/ic/emote.webp)}
html body .btns #run{--ico:url(art/ui/ic/run.webp)}
html body .btns #run.off{--ico:url(art/ui/ic/walk.webp)}
html body .btns #run.tired .ic{background:radial-gradient(circle at 35% 28%,#fff1ea,#ffd6c6 55%,#f0a98f) padding-box,var(--rim)!important}
html body .btns #roll{--ico:url(art/ui/ic/roll.webp)}
html body .btns #close{--ico:url(art/ui/ic/zoom.webp)}
html body .btns #emote.on .ic{background:radial-gradient(circle at 35% 28%,#fffbe6,#ffe9a8 55%,#f2c95a) padding-box,var(--rim)!important}
html body #emotes .ic::before{display:none}
html body #emotes button .ic>svg{display:block!important}
/* Home, Map and quick phrases: painted icons in place of the line icons */
html body #dock :is(#homeBtn,#mapBtn)>svg,html body #ol-say .ol-chip[type=button]>svg{display:none!important}
html body #dock :is(#homeBtn,#mapBtn)::before,html body #ol-say .ol-chip[type=button]::before{content:"";width:32px;height:32px;flex:none;background:var(--ico) center/contain no-repeat;filter:drop-shadow(0 2px 1px rgba(40,24,10,.3))}
html body #homeBtn{--ico:url(art/ui/ic/home.webp)}
html body #mapBtn{--ico:url(art/ui/ic/map.webp)}
html body #ol-say .ol-chip[type=button]{--ico:url(art/ui/ic/phrases.webp);display:grid!important;place-items:center;width:58px;padding:0!important}
@media (max-width:640px){html body #dock :is(#homeBtn,#mapBtn)::before{width:26px;height:26px}html body #ol-say .ol-chip[type=button]::before{width:28px;height:28px}html body #ol-say .ol-chip[type=button]{width:50px}}
/* room chat: scroll icon in the plank header, a round minimise button, and when minimised it shrinks to a button the size of Home */
html body #ol-log .ol-logtog .ol-ic:first-child{width:30px;height:30px;background:url(art/ui/ic/log.webp) center/contain no-repeat;filter:drop-shadow(0 2px 1px rgba(40,24,10,.35))}
html body #ol-log .ol-logtog .ol-ic:first-child svg{display:none}
html body #ol-log .ol-logtog .chev{width:30px;height:30px;border-radius:50%;background:var(--cream),var(--rim);border:3px solid transparent;box-shadow:0 0 0 2px var(--ink),0 2px 0 2px var(--ink);position:relative;flex:none;transform:none!important;filter:none}
html body #ol-log .ol-logtog .chev svg{display:none}
html body #ol-log .ol-logtog .chev::after{content:"";position:absolute;left:50%;top:50%;width:12px;height:4px;margin:-2px 0 0 -6px;border-radius:2px;background:var(--ink)}
html body #ol-log.closed{width:auto!important;max-width:none!important;align-self:flex-start;border-radius:18px!important;border-width:4px!important;background:var(--cream),var(--rim)!important;
  box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.55),0 5px 0 2.5px var(--ink),0 9px 14px rgba(30,18,8,.28)!important}
html body #ol-log.closed .ol-logtog{background:none!important;color:var(--ink)!important;-webkit-text-stroke:0;min-height:42px;padding:2px 14px 2px 8px!important;border:0!important;font-size:16px;gap:8px}
html body #ol-log.closed .ol-logtog .chev{display:none}
html body #ol-log.closed .ol-logtog .ol-ic:first-child{width:32px;height:32px}
html body #tools{flex-wrap:nowrap!important;gap:10px;align-items:center}html body #tl{flex-wrap:nowrap}
html body :is(#tools .chip,#ol-hud-r .ol-chip:not([aria-label="Account menu"])){top:auto!important;left:auto!important;right:auto!important;bottom:auto!important}
html body :is(#tools .chip,#ol-hud-r .ol-chip:not([aria-label="Account menu"])){position:relative!important}
/* round 3: painted toasts, clearer run energy, roomier name plates */
html body #gtoast,html body #ol-toast{border:5px solid transparent!important;border-radius:18px!important;background:linear-gradient(#fffaf0,#f6e6c2) padding-box,url(art/ui/kit_wood.webp) 0 0/160px auto border-box!important;
  color:var(--ink)!important;box-shadow:0 0 0 2.5px var(--ink),0 5px 0 2.5px var(--ink),0 12px 24px rgba(30,18,8,.35)!important;font-weight:800!important;padding:8px 18px!important}
html body .btns button .lb{padding:0 10px!important}
html body .btns #run .ebar{width:50px;height:9px;bottom:-11px;border-radius:5px}
html body .btns #run.tired .ic::before{filter:grayscale(.65) brightness(.95) drop-shadow(0 2px 1px rgba(40,24,10,.35))}
html body .btns #run.tired .ebar{box-shadow:inset 0 0 0 1.5px #b4503a,0 0 0 1.5px #e07a5f}
/* the dock row: Home, Map, phrases, chat box and Send all share the chat box's height */
:root{--dh:54px}
@media (max-width:640px){:root{--dh:46px}}
html body :is(#dock #homeBtn,#dock #mapBtn,#ol-say .ol-chip,#ol-say input){height:var(--dh)!important;min-height:0!important;box-sizing:border-box!important;margin:0!important}
html body #ol-say .ol-chip[type=button]{width:var(--dh)!important}
html body #ol-say,html body #dock .dock-row{align-items:center!important}
html body .btns #run.tired .ebar{background:#fff3ea;box-shadow:inset 0 0 0 2px #c4422b,0 0 0 1.5px var(--ink)}
html body #ol-log:not(.closed) .ol-logtog .chev{top:-10px}
html body #ol-log{overflow:visible!important}html body #ol-log .ol-logtog{border-radius:14px 14px 0 0}html body #ol-log .ol-loglist{border-radius:0 0 14px 14px}html body #ol-log.closed .ol-logtog{border-radius:14px}
/* the Drift button on the race track: a round painted button like the action buttons, with a cooldown sweep */
#driftBtn{display:none;position:fixed;right:24px;bottom:22px;z-index:26;zoom:var(--uiz);background:none;border:0;padding:0;flex-direction:column;align-items:center;gap:3px;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;font:800 14px "Baloo 2",system-ui,sans-serif}
body.kart-area #driftBtn{display:flex}
@media (pointer:coarse){html body #driftBtn{right:calc(env(safe-area-inset-right) + 200px);bottom:calc(env(safe-area-inset-bottom) + 40px)}}
#driftBtn .ic{position:relative;width:74px;height:74px;border-radius:50%;border:4px solid transparent;background:radial-gradient(circle at 35% 28%,#fff,#f7ecd2 55%,#e6d3a8) padding-box,var(--rim);
  box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.5),0 5px 0 2.5px var(--ink),0 9px 14px rgba(30,18,8,.28);overflow:hidden}
#driftBtn .ic::before{content:"";position:absolute;inset:10%;background:url(art/ui/ic/drift.webp) center/contain no-repeat;filter:drop-shadow(0 2px 1px rgba(40,24,10,.35))}
#driftBtn .ic::after{content:"";position:absolute;inset:0;border-radius:50%;background:conic-gradient(rgba(40,26,14,.55) calc(var(--cd,0)*360deg),transparent 0);pointer-events:none}
#driftBtn .cd{position:absolute;inset:0;display:grid;place-items:center;z-index:2;color:#fff;font-size:26px;-webkit-text-stroke:5px var(--ink);paint-order:stroke fill}
#driftBtn .lb{background:url(art/ui/kit_wood.webp) 0 0/140px auto;border:2.5px solid var(--ink);border-radius:10px;color:#fff;-webkit-text-stroke:3.5px var(--ink);paint-order:stroke fill;box-shadow:0 2px 0 var(--ink);padding:0 10px;line-height:1.35}
#driftBtn.on .ic{box-shadow:0 0 0 2.5px var(--ink),0 0 0 7px rgba(255,212,92,.8),0 5px 0 2.5px var(--ink);transform:translateY(2px)}
#driftBtn.cool .ic::before{filter:grayscale(.6) opacity(.7)}
#driftBtn:active .ic{transform:translateY(3px)}
body.kart-area #run{display:none}
@media (pointer:fine){html body #driftBtn{bottom:118px;right:18px}}
/* Top Racers board */
html body .lb-body{display:flex;flex-direction:column;gap:10px}
html body .lb-tabs{display:flex;gap:8px;justify-content:center}
html body .lb-tabs button{flex:1;font:800 15px "Baloo 2",system-ui,sans-serif;color:#fff;-webkit-text-stroke:3.5px var(--ink);paint-order:stroke fill;background:none;cursor:pointer}
html body .lb-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:min(46vh,340px);overflow-y:auto}
html body .lb-row{display:flex;align-items:center;gap:10px;padding:5px 12px 5px 8px;border:4px solid transparent;border-radius:16px;background:linear-gradient(#fffdf6,#fff3dc) padding-box,url(art/ui/kit_wood.webp) 0 0/160px auto border-box;box-shadow:0 0 0 2px var(--ink),0 3px 0 2px var(--ink)}
html body .lb-row.top{background:radial-gradient(ellipse at 20% 50%,#fffbe8,#ffeeb8) padding-box,url(art/ui/kit_wood.webp) 0 0/160px auto border-box}
html body .lb-row.you .lb-name{color:#3f7a1f}
html body .lb-medal{width:34px;height:34px;flex:none;filter:drop-shadow(0 2px 1px rgba(40,24,10,.35))}
html body .lb-place{width:34px;flex:none;text-align:center;font:800 18px "Baloo 2",system-ui,sans-serif;color:#6b4a2b}
html body .lb-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px}
html body .lb-time{font:800 17px "Baloo 2",system-ui,sans-serif;color:var(--ink);font-variant-numeric:tabular-nums}
html body .lb-empty{text-align:center;padding:14px;opacity:.8}
html body .lb-prizes{margin:0;text-align:center;font-size:14px}
html body .lb-prizes .pl-silver{width:18px;height:18px;vertical-align:-3px}
/* rarity icon beside each rarity label, and level star badges in place of padlocks */
html body :is(.pl-rar,.ss-help-tag){display:inline-flex!important;align-items:center;gap:4px}
html body .pl-rar-ic{width:20px;height:20px;margin:-4px 0 -4px -4px;filter:drop-shadow(0 1px 1px rgba(40,24,10,.4));object-fit:contain}
html body .pl-needlv{display:inline-flex;align-items:center;justify-content:center;gap:6px;vertical-align:middle}
html body .pl-needlv-star{display:inline-flex;flex:none;line-height:0}
html body .pl-needlv-star>*{width:26px;height:26px}
html body .ss-lock .pl-needlv{font-weight:800}
html body .pl-card .pl-item .pl-try:not(:disabled){color:#fff!important;-webkit-text-stroke:3.5px #2f5a1c!important;paint-order:stroke fill}
/* shop silver balance: the same wooden plaque as the main screen */
html body .pl-coins{background:none!important;box-shadow:none!important;border-radius:0!important;border-style:solid!important;border-width:6px 16px!important;
  border-image:url(art/ui/kit_tab.webp) 60 110 fill / 6px 16px stretch!important;padding:0 4px 0 0!important;min-height:38px;color:#fff!important;
  -webkit-text-stroke:4px var(--ink);paint-order:stroke fill;filter:drop-shadow(0 3px 0 rgba(59,42,30,.55))}
html body .pl-coins .pl-silver{filter:drop-shadow(0 2px 2px rgba(30,15,5,.6))}
/* the shop's Clothing / Furniture / Seeds buttons: same cream and wood as the rest of the HUD */
html body #pl-actions button{border:4px solid transparent!important;border-radius:18px!important;background:linear-gradient(#fffaf0,#f6e6c2) padding-box,url(art/ui/kit_wood.webp) 0 0/160px auto border-box!important;
  box-shadow:0 0 0 2.5px var(--ink),inset 0 0 0 2px rgba(59,42,30,.55),0 5px 0 2.5px var(--ink),0 9px 14px rgba(30,18,8,.28)!important;color:var(--ink)!important}
html body #pl-actions button:active{transform:translateY(3px)}
html body .pl-card img.pl-rar-ic,html body .pl-rar img.pl-rar-ic,html body .ss-help-tag img.pl-rar-ic{width:20px!important;height:20px!important;filter:drop-shadow(0 1px 1px rgba(40,24,10,.4))!important}
html body .pl-card{max-height:calc((100vh - 110px) / var(--uiz))!important}
html body .pl-needlv .bw-star{width:26px!important;height:26px!important}html body .pl-needlv .bw-star img{width:100%!important;height:100%!important;filter:none!important;margin:0!important}html body .pl-needlv .bw-star>b{font-size:11px!important;-webkit-text-stroke:2.5px var(--ink);paint-order:stroke fill;color:#fff!important}
/* decorating: the box doubles as a drop zone for putting things away; dragging up out of it on touch screens */
#pl-deco .row button{touch-action:pan-x}
body.deco-putaway #pl-deco{outline:4px dashed #e8463a;outline-offset:3px;background:#fff1e6!important}
body.deco-putaway #pl-deco .top b::after{content:"  Let go to put it away";color:#c4422b}
body.deco-dragging.deco-moving #pl-deco{transform:none;opacity:.96;pointer-events:auto}
/* settings switches: a bigger knob that sits centred in the track */
html body .bw-tog{box-sizing:border-box;width:62px;height:36px;border-radius:20px;border:3px solid var(--ink);box-shadow:inset 0 2px 3px rgba(40,24,10,.25),0 2px 0 var(--ink)}
html body .bw-tog::after{box-sizing:border-box;top:50%;left:2px;width:28px;height:28px;transform:translateY(-50%);border:2.5px solid var(--ink);background:radial-gradient(circle at 35% 30%,#fff,#f3e8cf);box-shadow:0 2px 0 rgba(40,24,10,.35);transition:left .15s}
html body .bw-tog:checked::after{left:calc(100% - 30px)}

/* the world map: the cardboard box on its side, three floors of painted places, green pipes between them */
html body #map .mcard{width:min(860px,calc((100vw - 24px) / var(--uiz)),calc((100vh - 190px) / var(--uiz) * 1.5 + 36px));max-width:none}
html body #map .mbox{position:relative;aspect-ratio:1536/1024;border:4px solid var(--ink);border-radius:20px;overflow:hidden;background:#e8b26a;box-shadow:inset 0 0 0 2px rgba(255,240,210,.4)}
html body #map .mbg{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
html body #map .mpipes{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 4px 2px rgba(40,24,8,.35))}
html body #map [data-to]{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-100%);width:15.5%;padding:0;margin:0;border:0;background:none;box-shadow:none;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;font:inherit;color:var(--ink);transition:transform .15s ease,filter .15s ease;z-index:1}
html body #map [data-to] img{width:100%;height:auto;display:block;filter:drop-shadow(0 5px 3px rgba(40,24,8,.4))}
html body #map [data-to]:hover,html body #map [data-to]:focus-visible{transform:translate(-50%,-100%) scale(1.08);z-index:2;outline:none}
html body #map [data-to]:hover img,html body #map [data-to]:focus-visible img{filter:drop-shadow(0 0 6px #ffe08a) drop-shadow(0 5px 3px rgba(40,24,8,.4))}
html body #map .mtag{position:absolute;bottom:-14%;left:50%;transform:translateX(-50%);white-space:nowrap;background:linear-gradient(#fff6e2,#f3dfb6);border:3px solid var(--ink);border-radius:12px;
  padding:1px 9px 2px;font-weight:800;font-size:13px;line-height:1.1;text-align:center;box-shadow:0 3px 0 var(--ink)}
html body #map .mtag small{display:block;font-size:12px;font-weight:800;color:#3b2a1e}
html body #map [data-to].here .mtag{background:linear-gradient(#ffe48a,#f6c23c)}
html body #map [data-to].here .mtag small{background:#3b2a1e;color:#ffe48a;border-radius:99px;padding:0 8px;margin:2px auto 1px}
html body #map [data-to].here::before{content:'';position:absolute;left:50%;top:48%;width:86%;aspect-ratio:2/1;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(rgba(255,226,120,.75),rgba(255,226,120,0) 70%);animation:mapGlow 1.4s ease-in-out infinite;z-index:-1}
@keyframes mapGlow{50%{opacity:.45;transform:translate(-50%,-50%) scale(1.12)}}
html body #map [data-to].here img{animation:mapHere 1.4s ease-in-out infinite}
@keyframes mapHere{50%{transform:translateY(-4%)}}
html body #map [data-to].soon{filter:grayscale(.7) brightness(.85);cursor:default}
@media (max-width:640px){html body #map .mtag{font-size:11px;padding:0 5px;border-width:2px}html body #map .mtag small{font-size:10px}}

/* the world map wears the same painted window as the shops and inbox: wooden frame, vines, hanging sign with ropes, carved close button */
html body #map{padding-top:96px}
html body #map .mcard{position:relative;overflow:visible;padding:0 18px 18px;border:11px solid transparent;border-radius:30px;
  width:min(880px,calc((100vw - 24px) / var(--uiz)),calc((100vh - 250px) / var(--uiz) * 1.5 + 58px));
  background:radial-gradient(ellipse at 50% -10%,rgba(255,255,255,.75),transparent 55%) padding-box,linear-gradient(#fff6e2,#f5e3bd) padding-box,url(art/ui/kit_wood.webp) 0 0/240px auto repeat border-box;
  box-shadow:0 0 0 4px var(--ink),inset 0 0 0 4px var(--ink),inset 0 10px 18px rgba(90,56,24,.22),0 10px 0 4px var(--ink),0 26px 50px rgba(30,18,8,.5)}
html body #map .mcard::before,html body #map .mcard::after{content:"";position:absolute;top:-26px;width:96px;height:82px;background:url(art/ui/kit_vine.webp) 0 0/contain no-repeat;pointer-events:none;z-index:2;filter:drop-shadow(0 3px 2px rgba(40,24,10,.35))}
html body #map .mcard::before{left:-28px}html body #map .mcard::after{right:-28px;transform:scaleX(-1)}
html body #map .mcard>h2{position:relative;display:block;width:fit-content;min-width:min(240px,100%);box-sizing:border-box;margin:-92px auto 10px;padding:0;text-align:center;z-index:3;background:none;
  border-style:solid;border-width:40px 77px 14px;border-image:url(art/ui/kit_sign.webp) 125 240 40 240 fill / 40px 77px 14px 77px stretch;
  color:#fff;-webkit-text-stroke:6px var(--ink);paint-order:stroke fill;font-size:26px;line-height:1.15;white-space:nowrap;filter:drop-shadow(0 4px 3px rgba(40,24,10,.35))}
html body #map .mcard>h2::before,html body #map .mcard>h2::after{content:"";position:absolute;bottom:100%;height:100vh;width:15px;margin-bottom:36px;background:url(art/ui/kit_rope.webp) center bottom/15px auto repeat-y;pointer-events:none}
html body #map .mcard>h2::before{left:-22px}html body #map .mcard>h2::after{right:-28px}
html body #map .mclose{position:absolute;top:-24px;right:-22px;width:54px;height:54px;margin:0;padding:0;border:0;border-radius:50%;background:url(art/ui/kit_close.webp) center/contain no-repeat;color:transparent;font-size:0;text-decoration:none;z-index:4;cursor:pointer;filter:drop-shadow(0 4px 2px rgba(40,24,10,.4));transition:transform .12s}
html body #map .mclose:hover{transform:scale(1.06) rotate(-6deg)}
html body #map .mclose:active{transform:translateY(2px) scale(.96)}
html body #map .mwrap{margin:0}
html body #map .mbox{border-radius:18px;box-shadow:0 0 0 3px var(--ink),inset 0 0 0 2px rgba(255,240,210,.4),inset 0 6px 14px rgba(40,24,8,.3)}
@media (max-width:520px){
  html body #map{padding-top:86px}
  html body #map .mcard{border-width:8px;padding:0 10px 12px}
  html body #map .mcard>h2{font-size:21px;min-width:0;margin-top:-80px;border-width:34px 48px 12px;border-image-width:34px 48px 12px 48px}
  html body #map .mcard::before,html body #map .mcard::after{width:70px;height:60px;top:-20px}
  html body #map .mclose{width:46px;height:46px;top:-20px;right:-16px}
}
