/* Toy Box studio styles. Neutral cool chrome, chunky outlines and stickers; each game brings its own colours.
   System fonts only (CSP allows no remote fonts), no scripts. Used by every page. */
:root{
  color-scheme:light;
  --bg:#eef1f5;--dot:rgba(30,40,60,.09);--card:#fff;--ink:#121418;--muted:#545b67;--lime:#dbf290;--focus:#6940a4;
  --round:ui-rounded,"SF Pro Rounded","Arial Rounded MT Bold",system-ui,-apple-system,"Segoe UI",sans-serif;
  --sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --border:3px solid var(--ink);
  --pop:5px 5px 0 var(--ink);
  font-family:var(--sans);font-synthesis:none;-webkit-text-size-adjust:100%;
}
/* Per-game palettes. Add one block per game; everything else stays neutral. */
.game-cozy-bottles{--game-a:#9b3fe0;--game-b:#2fa8ec;--game-c:#ffc21a;--game-art:linear-gradient(160deg,#8fdcff 0%,#46b8f0 55%,#7a5cf0 130%)}

*{box-sizing:border-box}
body{margin:0;overflow-x:clip;background:var(--bg);background-image:radial-gradient(var(--dot) 1.4px,transparent 1.6px);background-size:22px 22px;color:var(--ink);line-height:1.55}
img{display:block;max-width:100%;height:auto}
a{color:inherit;text-underline-offset:.25em}
:focus-visible{outline:3px solid var(--focus);outline-offset:4px;border-radius:6px}
::selection{background:var(--lime);color:var(--ink)}
h1,h2,h3,p,ul{margin:0}
h1,h2,h3{font-family:var(--round);font-weight:800;line-height:1.05;text-wrap:balance}
p{text-wrap:pretty}
.wrap{width:min(1180px,calc(100% - 64px));margin-inline:auto}
.skip-link{position:absolute;top:-10rem;left:1rem;z-index:10;padding:.7rem 1rem;border-radius:12px;background:var(--ink);color:#fff;font-weight:700}
.skip-link:focus{top:1rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
main:focus{outline:none}

/* Header */
.site-header{display:flex;align-items:center;justify-content:space-between;gap:14px 16px;flex-wrap:wrap;padding:16px 0}
.wordmark{display:inline-flex;align-items:center;border-radius:8px}
.wordmark img{width:auto;height:100px}
.badge{display:grid;place-items:center;flex-shrink:0;width:54px;height:54px;border-radius:50%;background:var(--card);border:2.5px solid var(--ink);box-shadow:3px 3px 0 var(--ink)}
.badge img{width:36px}
.nav{display:flex;gap:4px;padding:5px;border:2.5px solid var(--ink);border-radius:999px;background:var(--card);box-shadow:3px 3px 0 var(--ink)}
.nav a{display:flex;align-items:center;justify-content:center;min-height:40px;padding:0 16px;border-radius:999px;text-decoration:none;font:700 .95rem/1 var(--round)}
.nav a:hover{background:var(--lime)}
.nav a[aria-current=page]{background:var(--ink);color:#fff}

/* Hero */
.hero{text-align:center;padding:52px 0 84px}
.hero-mascot{position:relative;display:grid;place-items:center;width:170px;height:170px;margin:0 auto 32px;border-radius:50%;background:var(--card);border:var(--border);box-shadow:var(--pop);transform:rotate(-6deg)}
.hero-mascot img{width:118px}
.bubble{position:absolute;right:-56px;top:-8px;padding:6px 12px;border:2.5px solid var(--ink);border-radius:16px;background:var(--lime);font:800 1rem/1 var(--round);transform:rotate(14deg)}
.bubble::after{content:"";position:absolute;left:9px;bottom:-8px;width:13px;height:13px;background:var(--lime);border-right:2.5px solid var(--ink);border-bottom:2.5px solid var(--ink);transform:rotate(45deg)}
.hero h1{max-width:13em;margin:0 auto 20px;font-size:clamp(2.5rem,6.2vw,5.4rem);line-height:1;letter-spacing:-.02em}
.chip{display:inline-block;padding:0 .18em;border:var(--border);border-radius:.32em;background:var(--card);box-shadow:4px 4px 0 var(--ink);transform:rotate(-2deg)}
.hero-lede{max-width:32em;margin:0 auto;color:var(--muted);font-size:1.2rem}
.stickers{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:28px;padding:0;list-style:none}
.stickers li{padding:9px 14px;border:2px solid var(--ink);border-radius:999px;background:var(--card);font:700 .9rem/1 var(--round)}
.stickers li:nth-child(1){transform:rotate(-3deg)}.stickers li:nth-child(2){transform:rotate(2deg)}.stickers li:nth-child(3){transform:rotate(-1.5deg)}

/* Section heading */
.section-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:24px}
.section-head h2{font-size:clamp(1.75rem,3vw,2.4rem);letter-spacing:-.015em}
.more-link{display:inline-flex;align-items:center;gap:.3em;min-height:44px;font:700 1rem var(--round);text-decoration-thickness:2px}

/* Game cartridge */
.cart{position:relative;display:grid;grid-template-columns:1.1fr 1fr;border:var(--border);border-radius:28px;background:var(--card);box-shadow:8px 8px 0 var(--ink)}
.cart-art{position:relative;display:flex;align-items:center;justify-content:center;min-height:540px;padding:32px 12px;overflow:hidden;border-right:var(--border);border-radius:25px 0 0 25px;background:var(--game-b);background:var(--game-art)}
.phone{width:30%;max-width:190px;overflow:hidden;border:3px solid var(--ink);border-radius:22px;background:var(--ink);box-shadow:5px 5px 0 rgba(18,20,24,.85)}
.phone:nth-child(1){transform:rotate(-9deg) translate(18px,22px)}
.phone:nth-child(2){position:relative;z-index:1;transform:translateY(-12px) scale(1.12)}
.phone:nth-child(3){transform:rotate(9deg) translate(-18px,22px)}
.burst{position:absolute;right:-26px;top:-30px;z-index:2;display:grid;place-items:center;width:112px;height:112px;background:var(--game-c);text-align:center;font:800 1.05rem/1.05 var(--round);transform:rotate(12deg);
  clip-path:polygon(50% 0,61% 13%,77% 7%,80% 23%,96% 26%,90% 41%,100% 54%,87% 63%,91% 79%,75% 80%,69% 96%,55% 88%,42% 100%,34% 85%,18% 91%,17% 75%,2% 69%,11% 55%,0 41%,13% 33%,9% 17%,26% 16%,32% 1%,44% 12%)}
.cart-body{display:flex;flex-direction:column;justify-content:center;gap:18px;padding:48px 44px 44px}
.cart-title{display:flex;align-items:center;gap:16px}
.cart-icon{width:72px;height:72px;border:2.5px solid var(--ink);border-radius:18px}
.cart-title :is(h2,h3){font-size:clamp(2.1rem,3.4vw,3rem);letter-spacing:-.015em}
.cart-lede{color:var(--muted);font-size:1.2rem}
.cart-body p{font-size:1.05rem}
.pills{display:flex;flex-wrap:wrap;gap:8px;padding:0;list-style:none}
.pills li{padding:8px 12px;border:2px solid var(--ink);border-radius:999px;background:var(--card);font:700 .85rem/1 var(--round)}
.pills .pill-game{background:#d9effb;background:color-mix(in srgb,var(--game-b) 22%,#fff)}
.cart-actions{display:flex;flex-wrap:wrap;gap:14px;padding-top:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:54px;padding:12px 24px;border:var(--border);border-radius:16px;background:var(--ink);color:#fff;text-decoration:none;font:800 1.05rem/1.1 var(--round);box-shadow:4px 4px 0 var(--muted);transition:transform .1s,box-shadow .1s}
.btn-alt{background:var(--card);color:var(--ink);box-shadow:4px 4px 0 var(--ink)}
.btn:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink)}
.btn:active{transform:translate(3px,3px);box-shadow:1px 1px 0 var(--ink)}

/* Help tiles: the whole tile is clickable through its single link. */
.help{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:88px}
.tile{position:relative;display:flex;flex-direction:column;gap:8px;padding:26px;border:var(--border);border-radius:22px;background:var(--card);box-shadow:var(--pop);transition:transform .12s}
.tile:hover{transform:translate(-2px,-2px) rotate(-.6deg)}
.tile:focus-within{outline:3px solid var(--focus);outline-offset:4px}
.tile h3{font-size:1.45rem}
.tile p{color:var(--muted)}
.tile-bug{background:var(--lime)}
.tile-bug p{color:#3d4350}
.tile a{margin-top:auto;padding-top:10px;font:800 .95rem var(--round);text-decoration:none;overflow-wrap:anywhere}
.tile a::after{content:"";position:absolute;inset:0;border-radius:20px}
.tile a:focus-visible{outline:none}

/* Footer */
.site-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px 28px;margin-top:84px;padding:28px 0 44px;border-top:2.5px solid var(--ink);font-size:.95rem}
.footer-brand{display:flex;align-items:center;gap:18px}
.footer-logo img{width:auto;height:84px}
.copyright{color:var(--muted);font-size:.85rem}
.site-footer a{display:inline-flex;align-items:center;min-height:44px;text-decoration:none;font-weight:600}
.site-footer a:hover{text-decoration:underline}
.footer-links{display:flex;gap:20px}

main{min-height:55vh}

/* Page intros: Apps, Support, Privacy and app pages */
.page-intro{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:10px 24px;padding:40px 0 32px}
.page-intro h1{font-size:clamp(2.6rem,6vw,4.4rem);letter-spacing:-.02em}
.page-intro p{color:var(--muted);font-size:1.15rem}

/* Support and Privacy directories */
.directory{display:grid;gap:18px}
.app-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:20px 24px;padding:22px 26px;border:var(--border);border-radius:24px;background:var(--card);box-shadow:var(--pop)}
.app-card-icon{width:72px;height:72px;border:2.5px solid var(--ink);border-radius:18px}
.app-card h2{font-size:clamp(1.5rem,2.6vw,2rem);letter-spacing:-.01em}
.app-card p{color:var(--muted)}
.directory-contact{display:inline-flex;flex-wrap:wrap;gap:.35em;margin-top:26px;padding:14px 18px;border:2.5px solid var(--ink);border-radius:16px;background:var(--lime);font-weight:600;overflow-wrap:anywhere}
.directory-contact a{font-weight:800}
.app-links{display:flex;flex-wrap:wrap;gap:14px}

/* Game page */
.app-hero{position:relative;display:grid;grid-template-columns:1.15fr .85fr;margin-top:24px;border:var(--border);border-radius:28px;background:var(--card);box-shadow:8px 8px 0 var(--ink)}
.app-hero-copy{display:flex;flex-direction:column;justify-content:center;gap:20px;padding:52px 48px}
.eyebrow{margin-bottom:6px;color:var(--muted);font:800 .8rem/1 var(--round);letter-spacing:.08em;text-transform:uppercase}
.app-hero h1{font-size:clamp(2.6rem,5vw,4.2rem);letter-spacing:-.02em}
.app-hero-art{display:flex;align-items:center;justify-content:center;min-height:520px;padding:40px 24px;overflow:hidden;border-left:var(--border);border-radius:0 25px 25px 0;background:var(--game-b);background:var(--game-art)}
.hero-phone{display:block;width:min(250px,72%);overflow:hidden;border:3px solid var(--ink);border-radius:26px;background:var(--ink);box-shadow:6px 6px 0 rgba(18,20,24,.85);transform:rotate(4deg)}
.gallery{display:grid;grid-template-columns:.8fr 1.2fr;align-items:center;gap:48px;margin-top:88px}
.gallery-copy h2{margin-bottom:12px;font-size:clamp(1.75rem,3vw,2.4rem);letter-spacing:-.015em}
.gallery-copy p{max-width:24em;color:var(--muted);font-size:1.15rem}
.gallery-shots{display:flex;justify-content:center;gap:28px;padding:40px 24px 52px;border:var(--border);border-radius:28px;background:var(--game-b);background:var(--game-art);box-shadow:var(--pop)}
.shot{width:min(230px,44%);margin:0;text-align:center}
.shot img{border:3px solid var(--ink);border-radius:22px;box-shadow:5px 5px 0 rgba(18,20,24,.85)}
.shot:nth-child(1){transform:rotate(-4deg)}.shot:nth-child(2){transform:rotate(4deg) translateY(16px)}
.shot figcaption{display:inline-block;margin-top:16px;padding:7px 12px;border:2px solid var(--ink);border-radius:999px;background:var(--card);font:700 .85rem/1.2 var(--round)}

/* Support and privacy documents: the policy text is unchanged; only its frame is styled. */
.breadcrumb{padding:12px 0 22px;color:var(--muted);font-size:.9rem;overflow-wrap:anywhere}
.breadcrumb a{color:var(--ink);font-weight:600}
.legal-layout{display:grid;grid-template-columns:240px minmax(0,1fr);align-items:start;gap:36px}
.legal-aside{position:sticky;top:52px;display:flex;flex-direction:column;gap:14px;padding:22px;border:var(--border);border-radius:22px;background:var(--card);box-shadow:var(--pop)}
.legal-aside .app-icon{width:64px;height:64px;border:2.5px solid var(--ink);border-radius:16px}
.legal-aside h2{font-size:1.3rem}
.legal-nav{display:flex;flex-direction:column;gap:6px}
.legal-nav a{display:flex;align-items:center;min-height:44px;padding:0 14px;border-radius:12px;text-decoration:none;font:700 .95rem/1.2 var(--round)}
.legal-nav a:hover{background:var(--lime)}
.legal-nav a[aria-current=page]{background:var(--ink);color:#fff}
.legal-document{min-width:0;padding:48px 56px 52px;border:var(--border);border-radius:24px;background:var(--card);box-shadow:var(--pop);overflow-wrap:anywhere}
.legal-document>*{max-width:44rem}
.legal-document h1{margin-bottom:22px;font-size:clamp(2rem,4vw,2.8rem);letter-spacing:-.02em}
.legal-document h2{margin:36px 0 12px;font-size:1.3rem;line-height:1.25}
.legal-document p,.legal-document li{font-size:1.02rem;line-height:1.75}
.legal-document p{margin-bottom:14px}
.legal-document ul,.legal-document ol{margin:0 0 14px;padding-left:22px}
.legal-document li+li{margin-top:6px}
.legal-document a{font-weight:600;text-decoration-thickness:1.5px}

/* 404 */
.notfound h1{font-size:clamp(2.4rem,5vw,4rem)}
.notfound .cart-actions{justify-content:center;margin-top:26px}

@media(max-width:1100px){.burst{right:-12px}}
@media(max-width:900px){
  .cart{grid-template-columns:1fr}
  .cart-art{min-height:480px;border-right:0;border-bottom:var(--border);border-radius:25px 25px 0 0}
  .help{grid-template-columns:1fr 1fr}
  .help .tile:last-child{grid-column:1/-1}
  .app-hero{grid-template-columns:1fr}
  .app-hero-art{min-height:0;padding:32px 20px 40px;border-left:0;border-top:var(--border);border-radius:0 0 25px 25px}
  .gallery{grid-template-columns:1fr;gap:24px;margin-top:64px}
  .legal-layout{grid-template-columns:1fr;gap:20px}
  .legal-aside{position:static;flex-direction:row;flex-wrap:wrap;align-items:center;gap:12px 16px}
  .legal-nav{flex-direction:row;flex-wrap:wrap;width:100%}
}
@media(max-width:600px){
  .wrap{width:calc(100% - 32px)}
  .site-header{padding:14px 0 6px}
  .wordmark img{height:80px}
  .nav a{min-height:44px;padding:0 10px;font-size:.9rem}
  .hero{padding:22px 0 44px}
  .hero-mascot{width:104px;height:104px;margin-bottom:20px;border-width:2.5px;box-shadow:4px 4px 0 var(--ink)}.hero-mascot img{width:72px}
  .bubble{right:-42px;top:-10px;padding:5px 10px;font-size:.85rem}
  .hero h1{font-size:clamp(2.1rem,10.5vw,2.6rem)}
  .hero-lede{font-size:1.05rem}
  .stickers{gap:8px;margin-top:20px}
  .stickers li{padding:8px 11px;font-size:.82rem}
  .cart{border-radius:24px;box-shadow:5px 5px 0 var(--ink)}
  .cart-art{min-height:320px;padding:24px 8px;border-radius:21px 21px 0 0}
  .phone{border-width:2.5px;border-radius:16px;box-shadow:3px 3px 0 rgba(18,20,24,.85)}
  .burst{right:-2px;top:-22px;width:86px;height:86px;font-size:.85rem}
  .cart-body{gap:16px;padding:26px 20px 24px}
  .cart-icon{width:58px;height:58px;border-radius:15px}
  .btn{flex:1 1 100%}
  .help{grid-template-columns:1fr;gap:16px;margin-top:60px}
  .tile{padding:22px}
  .site-footer{flex-direction:column;align-items:flex-start;gap:6px;margin-top:60px;padding-top:24px}
  .footer-brand{margin-bottom:6px}
  .footer-logo img{height:76px}
  .page-intro{padding:26px 0 22px}
  .page-intro h1{font-size:clamp(2.3rem,11vw,2.9rem)}
  .page-intro p{font-size:1.02rem}
  .app-card{grid-template-columns:auto 1fr;gap:14px 16px;padding:18px}
  .app-card .btn{grid-column:1/-1}
  .app-card-icon{width:58px;height:58px;border-radius:15px}
  .app-hero{margin-top:12px;border-radius:24px;box-shadow:5px 5px 0 var(--ink)}
  .app-hero-copy{gap:16px;padding:28px 20px 26px}
  .app-hero-art{border-radius:0 0 21px 21px}
  .hero-phone{width:min(210px,64%);border-radius:20px}
  .gallery-shots{gap:14px;padding:26px 12px 40px;border-radius:24px}
  .shot img{border-width:2.5px;border-radius:16px}
  .shot figcaption{padding:6px 9px;font-size:.75rem}
  .legal-aside{padding:16px 18px}
  .legal-aside .app-icon{width:48px;height:48px;border-radius:12px}
  .legal-nav a{padding:0 12px;background:var(--bg);font-size:.9rem}
  .legal-document{padding:26px 20px 30px;border-radius:20px;box-shadow:4px 4px 0 var(--ink)}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.btn:hover,.tile:hover{transform:none}}

/* Motion: the workshop assembles as you scroll, like the logo's beetle stacking blocks.
   CSS only (the CSP blocks scripts). Scroll-linked parts need animation-timeline support;
   elsewhere, and with reduced motion, the page stays static. */
.crawl{display:none}
@media(prefers-reduced-motion:no-preference){
  .hero-mascot{animation:pop-in .7s cubic-bezier(.34,1.56,.64,1) both}
  .bubble{animation:pop .45s cubic-bezier(.34,1.56,.64,1) .55s both}
  .chip{animation:pop-in .5s cubic-bezier(.34,1.56,.64,1) .3s both}
  .stickers li{animation:drop-in .55s cubic-bezier(.34,1.56,.64,1) both}
  .stickers li:nth-child(1){animation-delay:.5s}.stickers li:nth-child(2){animation-delay:.62s}.stickers li:nth-child(3){animation-delay:.74s}
  .page-intro>*,.app-hero{animation:rise .6s cubic-bezier(.2,.7,.2,1) both}
  .page-intro>:nth-child(2){animation-delay:.08s}
  .hero-phone{animation:pop-in .7s cubic-bezier(.34,1.56,.64,1) .2s both}
  .app-hero .burst{animation:slap .7s cubic-bezier(.2,.7,.2,1) .45s both}

  @supports(animation-timeline:view()){
    /* A tiny beetle rides a rail along the top as the page scrolls. */
    .crawl{display:block;position:fixed;inset:0 0 auto;z-index:20;height:38px;pointer-events:none;animation:fade-in linear both;animation-timeline:scroll(root);animation-range:0 120px}
    .crawl-fill{position:absolute;inset:0 0 auto;height:6px;background:var(--lime);border-bottom:2px solid var(--ink);transform-origin:0 0;animation:grow linear both;animation-timeline:scroll(root)}
    .crawl-bug{position:absolute;inset:3px 0 auto;display:flex;padding-inline:10px;justify-content:flex-end;animation:crawl linear both;animation-timeline:scroll(root)}
    .crawl-bug .badge{width:34px;height:34px;border-width:2px;box-shadow:2px 2px 0 var(--ink)}
    .crawl-bug .badge img{width:22px}

    /* Hero drifts away with a little tilt; the greeting fades. */
    .hero{view-timeline:--hero block}
    .hero-mascot{animation:pop-in .7s cubic-bezier(.34,1.56,.64,1) both,float-away linear both;animation-timeline:auto,--hero;animation-range:normal,exit 0% exit 100%}
    .bubble{animation:pop .45s cubic-bezier(.34,1.56,.64,1) .55s both,fade-out linear both;animation-timeline:auto,--hero;animation-range:normal,exit 0% exit 45%}

    /* The game's screens start stacked like a closed deck and fan out. */
    .cart-art{view-timeline:--art block}
    .phone{animation:deal cubic-bezier(.2,.7,.2,1) both;animation-timeline:--art;animation-range:entry 45% entry 100%}
    .phone:nth-child(1){--from-x:95%;--from-r:9deg}
    .phone:nth-child(2){--from-y:44px;--from-s:.9}
    .phone:nth-child(3){--from-x:-95%;--from-r:-9deg}
    .burst{animation:slap linear both;animation-timeline:view();animation-range:cover 18% cover 30%}
    .section-head>*,.cart-body>*{animation:rise cubic-bezier(.2,.7,.2,1) both;animation-timeline:view();animation-range:entry 0% entry 100%}

    /* Help tiles land like stacked blocks. */
    .tile{animation:land cubic-bezier(.2,.8,.25,1.15) both;animation-timeline:view();animation-range:entry 0% entry 100%}
    .shot{animation:rise cubic-bezier(.2,.7,.2,1) both;animation-timeline:view();animation-range:entry 0% entry 85%}
    .shot:nth-child(2){animation-range:entry 15% entry 100%}
    .tile:nth-child(2){--drop:70px;--tilt:-5deg}.tile:nth-child(3){--drop:120px;--tilt:4deg}.tile:nth-child(4){--drop:170px;--tilt:-3deg}
  }
}
@keyframes pop-in{from{scale:.3;opacity:0}}
@keyframes pop{from{scale:0}}
@keyframes drop-in{from{translate:0 -36px;opacity:0}}
@keyframes fade-in{from{opacity:0}}
@keyframes fade-out{to{opacity:0}}
@keyframes grow{from{scale:0 1}}
@keyframes crawl{from{translate:calc(-100% + 54px) 0}}
@keyframes float-away{to{translate:0 -70px;rotate:14deg}}
@keyframes deal{from{translate:var(--from-x,0) var(--from-y,24px);rotate:var(--from-r,0deg);scale:var(--from-s,.92)}}
@keyframes slap{0%{scale:.2;rotate:-40deg;opacity:0}55%{scale:1.12;rotate:5deg;opacity:1}78%{scale:.95;rotate:-2deg}100%{scale:1;rotate:0deg}}
@keyframes rise{from{translate:0 26px;opacity:0}}
@keyframes land{0%{translate:0 var(--drop,40px);rotate:var(--tilt,4deg);opacity:0}60%{opacity:1}}
