@font-face{font-family:"Bricolage";src:url(/assets/fonts/bricolage.woff2) format("woff2");font-weight:200 800;font-display:swap}
:root{--ink:#17132b;--grape:#3d2fe3;--grape2:#2c20b8;--crumb:#ffcf33;--bar:46px}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#0c0806;color:#fff;font:500 15px/1.3 "Bricolage",ui-rounded,"Segoe UI",system-ui,sans-serif;overscroll-behavior:none}
a{color:inherit}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:3px solid var(--crumb);outline-offset:2px;border-radius:10px}

/* the waryant bar: home, game switcher, sponsor, full screen */
.pbar{position:fixed;inset:0 0 auto 0;height:calc(var(--bar) + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));display:flex;align-items:center;gap:10px;background:var(--grape);box-shadow:0 2px 0 var(--ink);z-index:2}
.logo{display:inline-flex;align-items:center;gap:7px;text-decoration:none;font-weight:800;font-size:1.25rem;letter-spacing:-.04em;flex:none}
.logo svg{width:30px;height:18px;color:var(--crumb)}
.games{display:flex;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:none}
.games::-webkit-scrollbar{display:none}
.games a{display:inline-flex;align-items:center;gap:7px;padding:0 13px;height:34px;border-radius:999px;text-decoration:none;font-weight:700;font-size:.92rem;white-space:nowrap;color:rgba(255,255,255,.82)}
.games a svg{width:22px;height:14px;flex:none}
.games a:hover{background:rgba(255,255,255,.14);color:#fff}
.games a[aria-current]{background:var(--crumb);color:var(--ink)}
.spacer{flex:1}
.promo{display:block;flex:none;line-height:0;border-radius:999px;transition:transform .15s,filter .15s}
.promo:hover{transform:translateY(-1px);filter:brightness(1.12)}
.promo img{height:34px;width:auto}
.promo .sm{display:none}
.fs{flex:none;width:36px;height:36px;border:0;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;display:grid;place-items:center}
.fs:hover{background:rgba(255,255,255,.24)}
.fs svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

/* the game fills everything under the bar */
.stage{position:fixed;inset:calc(var(--bar) + env(safe-area-inset-top)) 0 0 0;background:#0c0806}
.stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;background:#0c0806}
.loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#e8dcc8;transition:opacity .4s;pointer-events:none}
.loading.gone{display:none}
.loading b{font-size:2rem;letter-spacing:-.03em;color:var(--crumb)}
.spin{width:30px;height:30px;border-radius:50%;border:3px solid rgba(255,207,51,.25);border-top-color:var(--crumb);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.fail{position:absolute;inset:0;display:none;align-items:center;justify-content:center;text-align:center;padding:20px}
.fail.on{display:flex}
.fail a{color:var(--crumb)}

/* full screen hides the bar so the game gets every pixel */
:fullscreen .pbar{display:none} :fullscreen .stage{top:0}

@media (max-width:720px){
  :root{--bar:42px}
  .logo span{display:none}
  .games a{padding:0 10px;font-size:.85rem}
  .games a .long{display:none}
  .promo .lg{display:none} .promo .sm{display:block} .promo img{height:30px}
}
@media (max-width:400px){ .games a .nm{display:none} .games a{padding:0 12px} }
@media (prefers-reduced-motion:reduce){.spin{animation:none}}

.offer{position:fixed;top:calc(var(--bar) + env(safe-area-inset-top) + 8px);right:max(10px,env(safe-area-inset-right));z-index:3;width:min(300px,calc(100vw - 20px));padding:16px 16px 14px;border-radius:18px;background:linear-gradient(160deg,#3d2fe3,#1f1580);color:#fff;box-shadow:0 18px 50px rgba(0,0,0,.5),0 0 0 2px var(--ink);animation:pop .25s cubic-bezier(.2,1.3,.4,1)}
@keyframes pop{from{transform:translateY(-6px) scale(.96);opacity:0}}
.offer[hidden]{display:none}
.offer small{display:block;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#c9c2ff}
.offer b{display:block;font-size:1.45rem;line-height:1.05;letter-spacing:-.03em;margin:6px 0 10px}
.offer em{font-style:normal;color:var(--crumb)}
.offer ul{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:6px;font-size:.92rem}
.offer li{display:flex;gap:8px;align-items:center}
.offer li::before{content:"";width:16px;height:16px;flex:none;border-radius:50%;background:var(--crumb) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' stroke='%2317132b' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat}
.offer .cta{display:flex;align-items:center;justify-content:center;min-height:46px;border-radius:999px;background:var(--crumb);color:var(--ink);font-weight:800;font-size:1.05rem;text-decoration:none;box-shadow:0 4px 0 var(--ink);transition:transform .12s,box-shadow .12s}
.offer .cta:hover{transform:translateY(-2px);box-shadow:0 6px 0 var(--ink)}
.offer .x{position:absolute;top:8px;right:8px;width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:20px;line-height:1;cursor:pointer}
button.promo{border:0;padding:0;background:none;cursor:pointer}
.offer .advLink{display:block;text-align:center;margin-top:10px;font-size:12px;font-weight:700;color:rgba(255,255,255,.7);text-decoration:underline}
.offer .advLink:hover{color:#fff}
/* focus mode (phones without real full screen): bar slides away, game fills the screen */
.pbar,.stage{transition:transform .25s ease,top .25s ease}
html.focus .pbar{transform:translateY(-100%)}
html.focus .stage{top:0}
html.focus .offer{display:none!important}
.unfocus{position:fixed;z-index:5;left:0;top:42%;transform:translateX(-100%);width:20px;height:56px;padding:0;border:0;border-radius:0 12px 12px 0;background:rgba(61,47,227,.85);color:#fff;display:grid;place-items:center;cursor:pointer;transition:transform .25s ease;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.unfocus::before{content:"";position:absolute;inset:-12px -16px -12px -4px}
.unfocus svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;transform:rotate(180deg)}
html.focus .unfocus{transform:translateX(env(safe-area-inset-left))}
/* home logo: a W badge, so it never looks like the Formicarium ant tab */
.logo .mono{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--crumb);color:var(--ink);font-weight:800;font-size:19px;letter-spacing:0;line-height:1;box-shadow:0 2px 0 rgba(0,0,0,.25);transition:transform .15s}
.logo:hover .mono{transform:rotate(-6deg) scale(1.05)}
/* v8: install as an app */
.inst{flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 12px;border:0;border-radius:10px;background:#ffcf33;color:#17132b;font:800 13px/1 inherit;cursor:pointer;box-shadow:0 2px 0 #17132b}
.inst[hidden],.ihint[hidden]{display:none}
.inst:hover{filter:brightness(1.06)} .inst svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.ihint{position:absolute;right:10px;top:calc(100% + 8px);z-index:20;width:260px;background:#fff;color:#17132b;border-radius:14px;padding:14px 16px 12px;box-shadow:0 14px 40px rgba(0,0,0,.35);font-size:14px;line-height:1.45}
.ihint ol{margin:6px 0 0;padding-left:18px} .ihint svg{width:15px;height:15px;vertical-align:-2px;fill:none;stroke:#3d2fe3;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ihint .x{position:absolute;right:6px;top:4px;border:0;background:none;font-size:20px;cursor:pointer;color:#6b6585}
@media (max-width:640px){.inst span{display:none}.inst{width:36px;padding:0;justify-content:center}}
