@font-face{font-family:Fredoka;src:url(assets/fonts/fredoka-latin-500-normal.woff2) format('woff2');font-weight:500;font-display:swap}
:root{--ink:#5b3519;--ink-soft:#8a5a34;--cream:#fff8ec;--cream-2:#f6e8cf;--walnut:#6e4222;--honey:#e9a640;--sage:#7d9a6a;--peach:#d9845f;--lilac:#9b86b8;--shadow:0 6px 18px #5b351926;--tray-w:min(96vw,700px)}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:radial-gradient(120% 90% at 50% 18%,#fffaf1 0%,#f7ecd9 48%,#e7d2b0 100%);color:var(--ink);font-family:Fredoka,ui-rounded,'Trebuchet MS',system-ui,sans-serif;font-weight:500;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
button{font:inherit;color:inherit;cursor:pointer;-webkit-user-select:none;user-select:none}
button:focus-visible,a:focus-visible,.world:focus-visible{outline:3px solid #3d7ea6;outline-offset:3px}
button:disabled{cursor:default;opacity:.45}
img{-webkit-user-drag:none;user-select:none}
svg{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.app{position:fixed;inset:0;-webkit-user-select:none;user-select:none}
.world{position:absolute;inset:0;outline:none}
.world canvas{display:block;width:100%;height:100%;touch-action:none}

/* header */
.top{position:fixed;z-index:5;top:0;left:0;right:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:start;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));pointer-events:none}
.top>*{pointer-events:auto}
.top-left{display:grid;grid-template-columns:58px max-content;grid-template-rows:60px auto;align-items:center;gap:18px 16px;position:relative;width:max-content}
.top-left #home{grid-area:1/1}
.top-left #ideas{grid-area:1/2}
.top-right{display:flex;gap:8px;justify-content:flex-end}
.wood-btn{width:58px;height:58px;border:0;border-radius:50%;display:grid;place-items:center;background:url(assets/sticklings/ui/button-base.webp) center/contain no-repeat;color:#694020;filter:drop-shadow(0 4px 6px #5b351933);transition:transform .15s}
.wood-btn svg{width:26px;height:26px}
.wood-btn:active{transform:scale(.92)}
.wood-btn:disabled{opacity:.4}
#sound .mute{display:none}#sound.off .mute{display:block}#sound.off .waves{display:none}
.pill{display:inline-flex;align-items:center;gap:7px;min-height:46px;padding:0 18px;border:2px solid #e6cfa9;border-radius:999px;background:var(--cream);box-shadow:var(--shadow);font-size:17px}
.pill svg{width:20px;height:20px}
.mascot{grid-area:2/1;position:relative;justify-self:center;width:58px;pointer-events:none;transform-origin:50% 100%;animation:breathe 4.2s ease-in-out infinite;filter:drop-shadow(0 4px 4px #5b351933)}
.mascot.cheer{animation:mascot-cheer .9s ease-out 2}
@keyframes mascot-cheer{30%{transform:translateY(-5px) rotate(5deg) scale(1.04)}60%{transform:rotate(-3deg)}}
@keyframes breathe{50%{transform:translateY(-2px) rotate(-3deg)}}
@keyframes cheer{30%{transform:translateY(-16px) rotate(6deg) scale(1.08)}60%{transform:translateY(0) rotate(-4deg)}}
.brand{margin:0;display:flex;flex-direction:column;align-items:center;pointer-events:none}
.brand .title{height:clamp(44px,7.4vw,84px);width:auto;filter:drop-shadow(0 3px 3px #5b351926)}
.brand .subtitle{height:clamp(16px,2.5vw,30px);width:auto;margin-top:-4px}
.footer-mark{position:fixed;bottom:max(2px,env(safe-area-inset-bottom));left:0;right:0;margin:0;text-align:center;font-size:12px;color:#8a5a3488;pointer-events:none;z-index:4}

/* Keep live instructions available to screen readers without a banner over the table. */
#hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;pointer-events:none}

/* picture guide */
.guide{position:fixed;z-index:4;left:max(12px,env(safe-area-inset-left));top:clamp(118px,15vw,150px);width:clamp(250px,25vw,350px)}
.board{position:relative;aspect-ratio:1536/1024;background:url(assets/sticklings/ui/guide-board.webp) center/100% 100% no-repeat;filter:drop-shadow(0 8px 12px #5b351933)}
.cards{position:absolute;left:2.4%;right:2.4%;top:4.2%;height:73.5%;display:grid;grid-template-columns:1fr 1fr;gap:2.2%}
.card{position:relative;border:3px solid transparent;border-radius:12px;background:transparent;padding:6% 4% 15%;display:flex;align-items:center;justify-content:center;transition:border-color .2s,box-shadow .2s}
.card img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.card .badge{position:absolute;left:5%;top:5%;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#c96f50;color:#fff;font-size:14px;box-shadow:0 2px 3px #0002}
.card.done .badge{background:var(--sage)}
.card .label{position:absolute;left:4%;right:4%;bottom:4%;font-size:clamp(12px,1.05vw,14px);line-height:1.1;text-align:center}
.card.active{border-color:var(--honey);box-shadow:0 0 0 3px #ffd88a88,0 0 18px #ffbf4d88;animation:glow 1.8s ease-in-out infinite}
.card.invite{display:grid;place-items:center;padding:10%}
.card.invite .label{position:static;font-size:clamp(13px,1.2vw,16px);color:var(--ink-soft)}
@keyframes glow{50%{box-shadow:0 0 0 5px #ffd88a66,0 0 26px #ffbf4daa}}
.board-nav{position:absolute;left:3%;right:3%;bottom:3.5%;height:14%;display:flex;align-items:center;justify-content:space-between;padding:0 2%}
.board-nav button{width:clamp(34px,3.2vw,44px);height:clamp(34px,3.2vw,44px);border-radius:50%;border:2px solid #d5ad74;background:#fbe9c9;color:#694020;display:grid;place-items:center;box-shadow:0 2px 0 #c99a5e}
.board-nav button svg{width:60%;height:60%}
.board-nav button.glow{background:#ffd27a;animation:glow 1.4s infinite}
#progress{font-size:clamp(15px,1.5vw,20px);letter-spacing:.04em}
.guide-title{margin:8px 4px 6px;font-size:17px;text-align:center}
.guide-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.chip{min-height:44px;padding:0 15px;border-radius:999px;border:2px solid #e6cfa9;background:var(--cream);box-shadow:0 2px 0 #e0c79e;font-size:15px}
.chip-go{background:#ffe3a6;border-color:#e9b55e}
.guide-back{position:fixed;z-index:4;left:max(12px,env(safe-area-inset-left));top:clamp(118px,15vw,150px)}

/* selection */
.select-bar{position:fixed;z-index:6;right:max(12px,env(safe-area-inset-right));top:clamp(118px,15vw,150px);display:flex;align-items:center;gap:6px;padding:6px 6px 6px 16px;border-radius:999px;background:var(--cream);box-shadow:var(--shadow);font-size:15px}
.select-bar button{display:inline-flex;align-items:center;gap:5px;min-height:44px;padding:0 13px;border-radius:999px;border:0;background:#f4e3c4}
.select-bar button svg{width:18px;height:18px}
#done{background:#d9ebc9;width:44px;justify-content:center;padding:0}

/* building box */
.tray{position:fixed;z-index:5;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);width:var(--tray-w);aspect-ratio:2172/724;background:url(assets/sticklings/ui/control-tray.webp) center/100% 100% no-repeat;display:grid;grid-template-columns:repeat(4,1fr);gap:2.3%;padding:4.4% 4.6% 5.4% 4.9%;filter:drop-shadow(0 8px 12px #3b251633)}
.well{position:relative;border:3px solid transparent;border-radius:18px;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0 0 4%;transition:border-color .2s,transform .12s}
.well img,.well svg{position:absolute;top:10%;height:52%;width:auto;max-width:72%;filter:drop-shadow(0 4px 3px #2b190e55)}
.well svg{color:#f5d7a4;stroke-width:3;top:14%;height:42%}
.well img.tilt{transform:rotate(62deg)}
.well span{position:relative;padding:3px 14px;border-radius:999px;background:linear-gradient(#fff8ea,#f1dfbf);box-shadow:0 2px 0 #c49a64;font-size:clamp(13px,2.2vw,18px);white-space:nowrap}
.well:active{transform:scale(.95)}
.well.open,.well[aria-expanded=true]{border-color:#a7c08f;box-shadow:inset 0 0 0 2px #e2f0d488}
.well.nudge{animation:nudge 1.6s ease-in-out infinite}
@keyframes nudge{50%{border-color:#ffd27a;transform:translateY(-3px)}}

.drawer{position:fixed;z-index:5;left:50%;transform:translateX(-50%);bottom:calc(max(14px,env(safe-area-inset-bottom)) + var(--tray-w)*724/2172 - 6px);width:min(98vw,780px);height:clamp(132px,19vw,158px);border-style:solid;border-width:36px 50px 40px;border-image:url(assets/sticklings/ui/extras-tray.webp) 170 245 190 fill / 36px 50px 40px stretch;filter:drop-shadow(0 6px 10px #3b251633);display:flex;align-items:stretch}
.drawer-head{position:absolute;left:0;right:0;top:-31px;margin:0;display:flex;justify-content:space-between;font-size:13px;color:#fff6e4;text-shadow:0 1px 2px #0006;padding:0 4px}
.drawer-items{flex:1;display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;padding:2px 2px;margin:-8px 0}
.drawer-items::-webkit-scrollbar{display:none}
.item{flex:0 0 calc((100% - 32px)/5);scroll-snap-align:start;border:0;border-radius:14px;background:#ffffff38;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px;transition:background .15s,transform .12s;touch-action:pan-x}
.item img{width:clamp(48px,7vw,70px);height:clamp(48px,7vw,70px);object-fit:contain;pointer-events:none}
.item span{font-size:12px;line-height:1.05;text-align:center;color:var(--ink)}
.item:active{transform:scale(.94);background:#ffffff80}
.item.wanted{background:#ffe3a6cc;box-shadow:0 0 0 2px #e9b55e}
.drawer-arrow{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;border:2px solid #d5ad74;background:#fbe9c9;color:#694020;display:grid;place-items:center;z-index:1;box-shadow:0 2px 0 #c99a5e}
.drawer-arrow svg{width:24px;height:24px}
.drawer-arrow.left{left:-46px}.drawer-arrow.right{right:-46px}
.drag-ghost{position:fixed;left:0;top:0;width:80px;height:80px;z-index:20;pointer-events:none;filter:drop-shadow(0 8px 8px #0004)}

.toast{position:fixed;z-index:8;left:50%;bottom:calc(max(14px,env(safe-area-inset-bottom)) + var(--tray-w)*724/2172 + 16px);transform:translate(-50%,10px);max-width:min(86vw,460px);padding:12px 20px;border-radius:20px;background:#fff8ecf2;box-shadow:var(--shadow);font-size:18px;text-align:center;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s}
.toast.show{opacity:1;transform:translate(-50%,0)}

.loading{position:fixed;inset:0;z-index:30;display:grid;place-content:center;justify-items:center;gap:12px;background:#fbf3e6;font-size:20px;transition:opacity .4s}
.loading img{width:120px;animation:breathe 1.6s ease-in-out infinite}
.loading.gone{opacity:0;pointer-events:none}

/* dialogs */
.sheet{width:min(94vw,900px);max-height:88vh;border:0;border-radius:28px;padding:22px 24px 26px;background:var(--cream);color:var(--ink);box-shadow:0 0 0 6px #b98754,0 20px 60px #3b25166b}
.sheet::backdrop{background:#3b25165c;backdrop-filter:blur(3px)}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sheet h2{margin:0;font-size:28px;font-weight:500}
.close{width:48px;height:48px;border-radius:50%;border:2px solid #e6cfa9;background:#fff;font-size:28px;line-height:1}
.sheet-copy{margin:6px 0 14px;color:var(--ink-soft)}
.sheet-copy.small{font-size:14px;margin-top:16px}
.starts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.start{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:14px 18px;border-radius:18px;border:2px solid #e6cfa9;background:linear-gradient(#fffdf7,#f7e9d0);text-align:left}
.start strong{font-size:20px;font-weight:500}.start span{font-size:14px;color:var(--ink-soft)}
.choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.choice{display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:8px 8px 10px;border-radius:18px;border:2px solid #ead6b4;background:#fff;text-align:left;transition:transform .12s,box-shadow .12s}
.choice:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.choice img{width:100%;aspect-ratio:540/420;object-fit:cover;border-radius:12px;background:#f6ecdb}
.choice strong{font-size:16px;font-weight:500;margin-top:4px}
.choice span{font-size:13px;color:var(--ink-soft)}
.choice.done{border-color:#b9d1a6}
.settings{width:min(94vw,460px)}
.row{display:flex;align-items:center;gap:12px;min-height:52px;font-size:18px}
.row input{width:26px;height:26px;accent-color:#a8742f}
.row.buttons{flex-wrap:wrap;gap:8px}

.nogl{position:fixed;inset:0;z-index:25;overflow:auto;background:#fbf3e6;padding:24px}
.nogl details{background:#fff;border-radius:16px;margin:8px 0;padding:8px 12px}
.nogl summary{display:flex;align-items:center;gap:12px;font-size:18px;cursor:pointer}
.nogl summary img{width:90px;border-radius:8px}
.nogl figure{display:inline-block;width:min(46%,260px);margin:6px}
.nogl figure img{width:100%}

/* phones and narrow windows */
@media (max-width:759px){
  :root{--tray-w:min(98vw,520px)}
  .wood-btn{width:48px;height:48px}.wood-btn svg{width:22px;height:22px}
  .pill{min-height:44px;padding:0 13px;font-size:15px}
  .top-right{gap:4px}
  .guide{left:50%;transform:translateX(-50%);top:calc(max(10px,env(safe-area-inset-top)) + 106px);width:min(70vw,300px)}
  .guide-title{display:none}
  .guide-actions{margin-top:6px;gap:5px;flex-wrap:nowrap}
  .guide-actions .chip{min-height:40px;padding:0 11px;font-size:13px;white-space:nowrap}
  .card .badge{width:20px;height:20px;font-size:11px}
  .card .label{font-size:12px;line-height:1.05}
  .card:not(:has(.guide-art)):not(.invite){padding-bottom:24%}
  .guide-back{top:calc(max(10px,env(safe-area-inset-top)) + 106px);left:50%;transform:translateX(-50%)}
  .select-bar{right:50%;transform:translateX(50%);padding-left:12px;font-size:14px}
  .select-bar button{padding:0 10px}
  .drawer{width:calc(100vw - 88px);border-width:28px 36px 30px;border-image-width:28px 36px 30px;height:122px}
  .drawer-arrow{width:42px;height:42px}
  .drawer-arrow.left{left:-42px}.drawer-arrow.right{right:-42px}
  .item{flex-basis:calc((100% - 24px)/4)}
  .starts{grid-template-columns:1fr}
  .choices{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
  .toast{font-size:16px}
}
@media (max-width:759px) and (max-height:700px){.guide{width:min(58vw,240px)}}
@media (max-height:560px) and (min-width:760px){.guide{width:clamp(200px,20vw,280px);top:96px}.brand .subtitle{display:none}}
.less-motion *,.less-motion *::before{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
[hidden]{display:none!important}

/* "draw here" demo on an empty table */
.draw-demo{position:fixed;z-index:3;width:200px;height:110px;transform:translate(-50%,-50%);pointer-events:none;opacity:.85}
.draw-demo svg{position:absolute;inset:0;overflow:visible}
.demo-line{stroke:#c98f3f;stroke-width:9;stroke-dasharray:170;stroke-dashoffset:170;animation:demoLine 2.6s ease-in-out infinite;filter:drop-shadow(0 2px 2px #5b351933)}
.finger{position:absolute;left:0;top:0;width:38px;height:38px;margin:-19px 0 0 -19px;border-radius:50%;background:#fffaf2e6;border:3px solid #e9a640;box-shadow:0 4px 10px #5b351940;offset-path:path('M24 86 L176 30');offset-rotate:0deg;animation:demoFinger 2.6s ease-in-out infinite}
@keyframes demoLine{0%,12%{stroke-dashoffset:170;opacity:1}62%,84%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:0;opacity:0}}
@keyframes demoFinger{0%,12%{offset-distance:0%;transform:scale(1.15)}18%{transform:scale(.92)}62%{offset-distance:100%;transform:scale(.92)}74%,100%{offset-distance:100%;transform:scale(1.15);opacity:0}}
.less-motion .demo-line{stroke-dashoffset:0}

/* Illustrated wooden actions: labels stay visible at every screen size. */
.story-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;min-height:60px;padding:0 16px 0 5px;border:2px solid #d5b383;border-radius:21px;background:repeating-linear-gradient(3deg,transparent 0 7px,#ba874b0c 8px,transparent 10px 15px),linear-gradient(175deg,#fff5de 0%,#f0d5a5 72%,#dfbb82 100%);box-shadow:inset 0 2px 0 #fffdf4,0 3px 0 #b58b57,0 6px 10px #5b351921;color:#63401f;font-size:18px;white-space:nowrap;transition:transform .16s,box-shadow .16s}
.story-action .action-art{display:block;width:56px;height:56px;flex:none;overflow:visible;stroke-width:2;filter:drop-shadow(0 2px 1px #6e422218)}
.action-label{text-shadow:0 1px #fff9e9;line-height:1.1}
.ideas-action{transform:rotate(-2deg)}
.fresh-action{transform:rotate(2deg)}
.fresh-ico{display:block;width:56px;height:56px;flex:none}
.idea-light,.fresh-broom{transform-box:fill-box;transform-origin:center;transition:transform .2s}
@media (hover:hover){
  .story-action:hover{transform:translateY(-2px) rotate(0);box-shadow:inset 0 2px 0 #fffdf4,0 5px 0 #b58b57,0 9px 13px #5b351928}
  .ideas-action:hover .idea-light{transform:rotate(9deg) translateY(-2px)}
  .fresh-action:hover .fresh-broom{transform:rotate(-12deg) translateX(-2px)}
}
.story-action:active{transform:translateY(3px) rotate(0);box-shadow:inset 0 2px 0 #fffdf4,0 1px 0 #b58b57}
.fresh:disabled{opacity:.55;filter:saturate(.6)}
.fresh.poof .fresh-broom{animation:sweep-clean .65s ease-out}
.fresh.poof .fresh-sparkles{animation:clean-glint .65s ease-out}
@keyframes sweep-clean{35%{transform:translateX(-6px) rotate(-18deg)}70%{transform:translateX(3px) rotate(6deg)}}
@keyframes clean-glint{40%{opacity:.3}75%{opacity:1}}
/* Stack actions below the small controls before they crowd the title. */
@media (min-width:760px) and (max-width:1050px){
  .top-left{grid-template-rows:58px 60px;row-gap:14px}
  .top-left #ideas{grid-area:2/2}
  .top-right{flex-wrap:wrap;max-width:180px;justify-self:end;row-gap:10px}
  .fresh-action{order:2}
  .guide,.guide-back,.select-bar{top:155px}
}
@media (max-width:759px){
  .top{grid-template-columns:48px minmax(0,1fr) 100px;column-gap:8px;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
  .top-left{grid-template-columns:40px max-content;grid-template-rows:48px 48px;gap:10px 10px}
  .top-left #home{justify-self:start}
  .top-left #ideas{grid-area:2/2}
  .mascot{width:38px}
  .top-right{flex-wrap:wrap;width:124px;max-width:none;justify-self:end;row-gap:10px}
  .story-action{min-height:48px;padding:0 9px 0 2px;gap:2px;border-radius:17px;font-size:15px}
  .story-action .action-art,.fresh-ico{width:40px;height:40px}
  .fresh-action{order:2;font-size:14px}
}
@media (max-width:420px){
  .brand .title{height:36px}.brand .subtitle{height:14px;margin-top:-1px}
}


.world.placing-extra canvas{cursor:crosshair}

/* Keep room to aim at a roof on a phone held sideways. */
@media (max-height:500px) and (min-width:600px){
  :root{--tray-w:360px}
  .top{grid-template-columns:1fr auto 1fr;padding-top:max(6px,env(safe-area-inset-top))}
  .top-left{grid-template-columns:44px max-content;grid-template-rows:44px;gap:8px}
  .top-left #ideas{grid-area:1/2}
  .top-right{flex-wrap:nowrap;max-width:none;width:auto;gap:5px}
  .mascot{display:none}
  .wood-btn{width:44px;height:44px}.wood-btn svg{width:22px;height:22px}
  .brand .title{height:36px}.brand .subtitle{display:none}
  .story-action{min-height:44px;padding:0 9px 0 2px;gap:2px;font-size:14px;border-radius:15px}
  .story-action .action-art,.fresh-ico{width:36px;height:36px}
  .fresh-action{order:0}
  .tray{height:102px;aspect-ratio:auto;bottom:max(10px,env(safe-area-inset-bottom));padding:14px 25px 18px;gap:8px}
  .well span{padding:2px 8px;font-size:13px}
  .drawer{bottom:116px;height:126px;width:min(94vw,700px);border-width:28px 40px 30px;border-image-width:28px 40px 30px}
  .item img{width:44px;height:44px}
  .select-bar{top:60px;font-size:13px;padding:4px;gap:4px}
  .select-bar button{padding:0 9px}
  .guide,.guide-back{top:70px}
  .footer-mark{font-size:10px}
}

/* Exact step images for the grand builds, cropped from each guide’s picture sheet. */
.guide-art{display:block;width:100%;aspect-ratio:540/420;background-repeat:no-repeat;flex:none;mix-blend-mode:multiply}
.card:has(.guide-art){display:grid;grid-template-rows:minmax(0,1fr) auto;gap:2px;padding:6% 4% 4%}
.card .guide-art{height:100%;width:auto;max-width:100%;justify-self:center;background-color:#fbf0de}
.card:has(.guide-art) .label{position:static;min-width:0}

/* One sliding switch controls construction hints, independently of the picture guides. */
.ideas-controls{grid-area:1/2;display:flex;align-items:center;gap:10px}
.highlight-mode{position:relative;flex-shrink:0;display:grid;grid-template-columns:1fr 1fr;align-items:center;width:206px;height:44px;padding:3px;border:2px solid #cda674;border-radius:999px;background:linear-gradient(#dec093,#ecd5b0);box-shadow:inset 0 2px 4px #80552724,0 3px 5px #5b351922;font-size:14px;touch-action:manipulation}
.highlight-mode::before{content:"";position:absolute;left:3px;top:3px;bottom:3px;width:calc((100% - 6px)/2);border-radius:999px;background:linear-gradient(#fff9e9,#ffe2a4);box-shadow:0 2px 4px #79572c40,inset 0 0 0 1px #fffaf0;transition:transform .2s}
.highlight-mode[aria-checked=true]::before{transform:translateX(100%);background:linear-gradient(#f0fbf6,#bfe1d5)}
.highlight-mode span{position:relative;z-index:1}
.highlight-mode[aria-checked=false] span:last-child,.highlight-mode[aria-checked=true] span:first-child{color:#7e6346}
@media(max-width:1200px){
  .ideas-controls{grid-area:2/2}
}
@media(max-width:759px){
  .top{min-height:calc(max(10px,env(safe-area-inset-top)) + 166px)}
  .ideas-controls{position:fixed;top:calc(max(10px,env(safe-area-inset-top)) + 116px);left:50%;transform:translateX(-50%);gap:8px}
  .highlight-mode{width:178px;font-size:13px}
  .guide,.guide-back{top:calc(max(10px,env(safe-area-inset-top)) + 170px)}
}
@media(max-height:500px) and (min-width:600px){
  .top{min-height:104px}
  .ideas-controls{position:fixed;top:56px;left:max(12px,env(safe-area-inset-left));transform:none;gap:10px}
  .highlight-mode{height:44px;width:190px;font-size:13px}
  .guide,.guide-back{top:110px}
}

/* Guides: the Basic/Advanced switch only changes free-building highlights, so it steps aside while a
   picture guide is showing (it comes back with "My own way"). */
.guided .highlight-mode{display:none}
/* Toasts move to the top edge on phones and short screens so they never hide the build. */
.toast.high{bottom:auto;transform:translate(-50%,-6px)}
.toast.high.show{transform:translate(-50%,0)}
/* Phone held sideways: a compact Ideas sheet that shows whole guide cards. */
@media (max-height:500px) and (min-width:600px){
  .sheet{max-height:94vh;padding:12px 18px 16px}
  .sheet h2{font-size:21px}
  .chooser .sheet-copy{display:none}
  .starts{gap:8px;margin:8px 0 10px}
  .start{padding:7px 12px}.start strong{font-size:16px}.start span{display:none}
  .choices{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
  .choice{padding:5px 5px 7px;border-radius:14px}
  .choice img{border-radius:9px}
  .choice strong{font-size:14px}.choice span{font-size:12px}
}

/* WonderLinks only: sibling games also use this base stylesheet. */
.wonderlinks-game .brand{transform:translateY(calc(max(4px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-top))))}
.wonderlinks-game .tray{bottom:max(2px,env(safe-area-inset-bottom))}
.wonderlinks-game .drawer{bottom:calc(max(2px,env(safe-area-inset-bottom)) + var(--tray-w)*724/2172 - 6px)}
@media(max-height:560px){
 .wonderlinks-game .brand{transform:translateY(calc(max(4px,env(safe-area-inset-top)) - max(6px,env(safe-area-inset-top))))}
 .wonderlinks-game .drawer{bottom:calc(106px + max(2px,env(safe-area-inset-bottom)))}
}
