/* Patchlings sits on the WonderLinks stage (sticklings.css), like Plank Pals; these are only its own pieces. */
:root{--sw:clamp(52px,min(7.2vw,(100vh - 330px) / 6),88px);--tray-w:min(96vw,620px)}
.drawer{height:clamp(118px,15vw,140px)}
.brand .title{height:clamp(42px,6.4vw,78px)}
.brand .tagline{margin-top:0;font-size:clamp(12px,1.45vw,17px);color:var(--ink);letter-spacing:.02em;white-space:nowrap}
/* Keep the mascot inside its header grid cell, clear of the guide below. */
.mascot{width:54px;height:54px;object-fit:contain;left:auto;top:auto}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* the box: Shapes, Faces and Parts open drawers; in play, dance, berry and jump */
.tray .well{touch-action:none}
.well img{top:5%;height:64%;max-width:94%;object-fit:contain}
.well.turn-well img{top:6%;height:62%;max-width:92%}
.play-well{display:none!important}
.playing .play-well:not([hidden]){display:flex!important}
.playing .kind-well{display:none}
.well.wanted{border-color:#ffd27a;box-shadow:0 0 0 3px #ffd88a88,0 0 18px #ffbf4daa;animation:glow 1.6s ease-in-out infinite}
.well[aria-pressed=true]{border-color:#a7c08f;box-shadow:inset 0 0 0 2px #e2f0d488}
.item{touch-action:none}
.item img{filter:drop-shadow(0 3px 2px #2b190e33)}
.item.lifting{transform:scale(.92);background:#ffffff80}

/* Undo and Bring to life bookend the box, one under each thumb */
.bookend{position:absolute;top:50%;width:clamp(70px,8.4vw,100px);aspect-ratio:1;border:0;padding:0;border-radius:50%;background:url(assets/sticklings/ui/button-base.webp) center/contain no-repeat;filter:drop-shadow(0 6px 8px #3b251640);display:grid;place-items:center;transition:transform .15s}
#undo.bookend,#stopDance.bookend{left:0;transform:translate(calc(-100% - 12px),-58%)}
#play.bookend{right:0;transform:translate(calc(100% + 12px),-58%)}
.bookend img{width:68%;height:68%;object-fit:contain;filter:drop-shadow(0 3px 2px #2b190e44)}
.bookend span{position:absolute;bottom:-14px;padding:2px 12px;border-radius:999px;background:linear-gradient(#fff8ea,#f1dfbf);box-shadow:0 2px 0 #c49a64;font-size:clamp(13px,1.5vw,16px);white-space:nowrap}
.bookend:active{filter:drop-shadow(0 2px 3px #3b251640) brightness(.97)}
.bookend:disabled{opacity:.5}
#play .ico-build{display:none}
.playing #play .ico-play{display:none}
.playing #play .ico-build{display:block}
.playing #play{animation:glow 1.8s ease-in-out infinite;border-radius:50%}
.playing #undo{display:none}
#play.ready{animation:glow 1.8s ease-in-out infinite;border-radius:50%}

/* the trays at the sides, for the piece that is chosen: what to do with it on the left, paint on the right */
.side-tray{position:fixed;z-index:5;top:calc(50% - 40px);transform:translateY(-50%);filter:drop-shadow(0 8px 12px #3b251633);animation:slideIn .25s ease-out;border-style:solid;border-width:calc(var(--sw) * .46) calc(var(--sw) * .2);border-image:url(assets/planks/ui/paint-tray.webp) 245 170 245 190 fill / calc(var(--sw) * .46) calc(var(--sw) * .2) stretch}
.edit-tray{left:max(10px,env(safe-area-inset-left));display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--sw) * .07);width:calc(var(--sw) * 2.2)}
.paint-tray{right:max(10px,env(safe-area-inset-right));width:calc(var(--sw) * 2.2)}
.side-well{position:relative;width:calc(var(--sw) * .86);aspect-ratio:.92;margin:0 auto;border:2px solid #ead7b3;border-radius:16px;background:radial-gradient(circle at 50% 38%,#fffdf6,#f6e8cf);box-shadow:inset 0 -3px 0 #e2c99f;padding:0 0 5%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;transition:transform .12s,border-color .2s}
.side-well img{position:absolute;top:3%;left:50%;transform:translateX(-50%);width:100%;height:66%;object-fit:contain;filter:drop-shadow(0 3px 3px #2b190e44);pointer-events:none}
.side-well span{position:relative;padding:2px 7px;border-radius:999px;background:linear-gradient(#fff8ea,#f1dfbf);box-shadow:0 2px 0 #c49a64;font-size:clamp(10px,calc(var(--sw) * .145),14px);white-space:nowrap}
.side-well:active{transform:scale(.93)}
.side-well:hover{border-color:#e2bf83}
.edit-tray .side-well:last-child:nth-child(odd){grid-column:1 / -1}
.pots{display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--sw) * .02) calc(var(--sw) * .04);margin:calc(var(--sw) * -.12) calc(var(--sw) * -.04) 0}
.pot{position:relative;border:0;background:none;padding:0;aspect-ratio:1.12;display:grid;place-items:center;border-radius:50%;width:calc(var(--sw) * .9);margin:0 auto}
.pot img{width:100%;height:100%;object-fit:contain;transition:transform .18s;filter:drop-shadow(0 3px 2px #6f523544)}
.pot[aria-pressed=true] img{transform:translateY(-5px) scale(1.06)}
.pot[aria-pressed=true]::after{content:'✓';position:absolute;bottom:-2px;left:50%;transform:translateX(-50%);width:20px;height:20px;border-radius:50%;background:#7d9a6a;color:#fff;border:2px solid #f8efd9;font:13px/16px system-ui;text-align:center}
.pot:active img{transform:scale(.92)}
.paint-tools{display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--sw) * .07);margin-top:calc(var(--sw) * .08)}
.tool-well[aria-pressed=true]{border-color:#e9b55e;background:radial-gradient(circle at 50% 38%,#fff6dc,#ffe0a3);box-shadow:inset 0 -3px 0 #e2b46a,0 0 0 3px #ffd88a88}
@keyframes slideIn{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
/* a chosen piece needs the sides: the picture guide steps aside until it is done */
.editing .guide,.editing .guide-back{display:none}
.brushing .world canvas{cursor:crosshair}

/* what a carried piece will do */
.drop-chip{position:fixed;left:0;top:0;z-index:7;display:flex;align-items:center;gap:6px;padding:5px 12px 5px 8px;border-radius:999px;background:#fff8ecf0;box-shadow:var(--shadow);font-size:15px;pointer-events:none;white-space:nowrap}
.drop-chip i{width:12px;height:12px;border-radius:50%;background:#f2b02e}
.drop-chip[data-state=tray] i{background:#b98b5b}
.carrying .tray.drop-here{filter:drop-shadow(0 0 10px #ffd27a) drop-shadow(0 8px 12px #3b251633)}

/* empty paper: a finger lifts a shape up out of the box */
.carry-demo .demo-line{stroke-dasharray:150;stroke-dashoffset:150}
.carry-demo .finger{offset-path:path('M100 104 C 100 70, 120 40, 150 24')}

/* the ideas sheet: guides, then masterpieces */
.choice .level{display:inline-block;margin-right:4px;color:#b57a34}
.masters-head{display:flex;align-items:baseline;gap:8px;margin:22px 0 10px;font-size:22px;font-weight:500}
.masters-head span{color:#d99a2b}
.masters-head small{font-size:14px;color:var(--ink-soft)}
.choices.masters .choice{border-color:#efcf8d;background:linear-gradient(#fffdf6,#fff4dc)}
.choices.masters .choice.done{border-color:#b9d1a6}

/* a made friend: the board shows what to do next */
.card.invite .go{display:block;margin:8px auto 0;min-height:40px;padding:0 14px;border-radius:999px;border:2px solid #e9b55e;background:#ffe3a6;font-size:14px}

@media (max-width:759px){
  :root{--tray-w:min(calc(100vw - 24px),520px);--sw:clamp(44px,min(14vw,(100vh - 340px) / 8),60px)}
  .mascot{width:40px;height:40px}
  .brand .tagline{display:none}
  .bookend{top:auto;bottom:calc(100% - 6px);width:62px}
  #undo.bookend,#stopDance.bookend{left:4px;transform:none}
  #play.bookend{right:4px;transform:none}
  .bookend span{font-size:12px;bottom:-10px;padding:1px 9px}
  .side-tray{top:calc(50% - 20px)}
  .edit-tray{grid-template-columns:1fr;width:calc(var(--sw) * 1.12)}
  .edit-tray .side-well:last-child:nth-child(odd){grid-column:auto}
  .paint-tray{width:calc(var(--sw) * 2.05)}
  .pot{width:calc(var(--sw) * .86)}
  .pot[aria-pressed=true]::after{width:16px;height:16px;font-size:10px;line-height:12px}
  .side-well span{font-size:10px;padding:1px 5px}
  /* the bookends stand on the box's ends here, so the drawer opens above them */
  .drawer{bottom:calc(max(2px,env(safe-area-inset-bottom)) + var(--tray-w)*724/2172 + 52px)}
}
@media (max-width:479px){.mascot{display:none}}
/* short landscape screens (phones on their side): a smaller box and board so the paper stays in view */
@media (max-height:560px){
  :root{--tray-w:min(70vw,600px,100vh);--sw:48px}
  .wood-btn{width:44px;height:44px}.wood-btn svg{width:20px;height:20px}
  .pill{min-height:40px;padding:0 12px;font-size:14px}
  .fresh{height:42px;font-size:14px;padding:0 12px 0 5px}.fresh-ico{width:32px;height:32px}
  .brand .title{height:36px}.brand .tagline{display:none}
  .mascot{display:none}
  .hint{top:calc(max(6px,env(safe-area-inset-top)) + 50px);font-size:13px}
  .guide,.guide-back{top:64px}
  .guide{width:clamp(170px,24vw,230px);left:max(10px,env(safe-area-inset-left));transform:none}
  .guide-title{display:none}
  .guide-actions .chip{min-height:36px;padding:0 10px;font-size:13px}
  .well span{font-size:12px;padding:2px 9px}
  .bookend{width:60px}
  .bookend span{font-size:12px;bottom:-10px}
  .side-tray{top:calc(50% - 30px)}
  .side-well span{display:none}
  .edit-tray{grid-template-columns:1fr 1fr;width:calc(var(--sw) * 2.1)}
  .paint-tray{width:calc(var(--sw) * 3)}
  .pots{grid-template-columns:1fr 1fr 1fr}
  .paint-tools{grid-template-columns:1fr 1fr}
  .side-well{width:calc(var(--sw) * .78);margin:0}
  .toast{font-size:15px}
}
@media (min-width:760px) and (max-width:1000px){:root{--tray-w:min(calc(100vw - 220px),100vh)}}
@media (max-width:759px){
  .hint{top:calc(max(10px,env(safe-area-inset-top)) + 120px)}
  .guide,.guide-back{top:calc(max(10px,env(safe-area-inset-top)) + 120px)}
}
@media (max-width:359px){.brand .title{width:100%;height:40px;object-fit:contain}}

/* Picture-first controls. Size the padding against the tray itself, not the viewport. */
:root{--tray-w:min(72vw,560px);--tray-h:168px;--sw:clamp(64px,7vw,78px)}
.tray{height:var(--tray-h);aspect-ratio:auto;padding:24px 30px 30px;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.well{min-width:0;min-height:48px;padding:0;border-radius:18px}
.well img,.well.turn-well img{top:0;left:50%;transform:translateX(-50%);width:94%;height:calc(100% - 25px);max-width:none;object-fit:contain;transition:translate .18s,rotate .18s}
.well span{position:absolute;bottom:0;left:50%;transform:translateX(-50%);font-size:14px;padding:3px 10px;white-space:nowrap;line-height:1.2}
.well[aria-expanded=true]{background:#fff2c82b;border-color:#a1ba80;box-shadow:inset 0 0 0 2px #f5ffe685}
.bookend{width:84px}
.bookend img{width:83%;height:83%;transition:translate .18s,rotate .18s}
.bookend span{font-size:14px;bottom:-16px}
#play.bookend{background:radial-gradient(circle at 42% 35%,#faffec,#d2e5ac 65%,#9fb777);box-shadow:inset 0 2px 2px #fff,0 3px 0 #789057;border:3px solid #f4f8d8}
#undo.bookend,#stopDance.bookend{background:radial-gradient(circle at 42% 35%,#fff8e8,#efdbb3 70%,#d4b77c);box-shadow:inset 0 2px 2px #fff,0 3px 0 #b39662;border:3px solid #fff3d7}
.drawer{bottom:calc(max(2px,env(safe-area-inset-bottom)) + var(--tray-h) - 5px);height:142px;width:min(92vw,680px);border-width:28px 44px 28px;border-image-width:28px 44px 28px}
.drawer-head{top:-24px}
.item{min-width:56px;min-height:56px}
.item img{width:56px;height:56px}
.side-well{min-width:44px;min-height:48px;aspect-ratio:.9;background:linear-gradient(155deg,#fffdf5,#f1e0be);border-color:#d9bb89;box-shadow:inset 0 2px 0 #fff,0 3px 0 #b48b55;padding:0;overflow:visible}
.side-well img{top:1px;width:94%;height:calc(100% - 20px)}
.side-well span{position:absolute;bottom:2px;font-size:11px;line-height:1.2;padding:2px 4px;box-shadow:none;background:none}
#remove{border-color:#d4a08b;background:linear-gradient(155deg,#fff6e8,#f3cdbb);box-shadow:inset 0 2px 0 #fff,0 3px 0 #b47962}
.header-art{width:38px;height:38px;object-fit:contain;pointer-events:none}
#ideas,#clear{height:52px;min-height:48px;padding:3px 14px 3px 6px;gap:5px;display:flex;align-items:center}
#clear .header-art{width:42px;height:42px}
@media(hover:hover){.well:hover img,.bookend:hover:not(:disabled) img{translate:0 -4px;rotate:-4deg}.side-well:hover{background:#fff7df;border-color:#dba450}.side-well:hover img{translate:0 -2px}}
@media(max-width:759px){
 :root{--tray-w:calc(100vw - 24px);--tray-h:124px;--sw:56px}
 .tray{padding:17px 18px 22px;gap:5px}
 .well span{font-size:11px;padding:3px 6px}
 .well img,.well.turn-well img{height:calc(100% - 22px);width:100%}
 .bookend{width:62px}
 .bookend span{font-size:12px;bottom:-12px}
 .drawer{bottom:calc(max(2px,env(safe-area-inset-bottom)) + var(--tray-h) + 56px);height:132px}
 .side-well{min-width:44px;min-height:48px}
 .side-well span{font-size:10px;padding:2px}
 .header-art,#clear .header-art{width:30px;height:30px}
 #ideas,#clear{height:44px;min-height:44px;padding:2px 8px 2px 3px;font-size:13px}
 .edit-tray{gap:5px}
}
@media(max-height:560px){
 :root{--tray-w:min(64vw,440px);--tray-h:108px;--sw:56px}
 .tray{padding:14px 22px 19px;gap:6px}
 .well span{font-size:11px;padding:2px 6px}
 .well img,.well.turn-well img{height:calc(100% - 20px)}
 .bookend{width:58px;top:50%;bottom:auto}
 #undo.bookend,#stopDance.bookend{left:0;transform:translate(calc(-100% - 12px),-58%)}
 #play.bookend{right:0;transform:translate(calc(100% + 12px),-58%)}
 .side-well{width:44px;height:48px;min-height:48px;aspect-ratio:auto}
 .side-well img{height:90%}
 .drawer{height:110px;bottom:calc(max(2px,env(safe-area-inset-bottom)) + var(--tray-h) - 5px);border-top-width:24px;border-bottom-width:22px;border-image-width:24px 44px 22px}
 .item img{width:42px;height:42px}.item span{font-size:10px}
 .header-art,#clear .header-art{width:30px;height:30px}
 #ideas,#clear{height:44px;min-height:44px;padding:2px 8px 2px 3px;font-size:13px}
 .hint{top:60px}
}
@media(prefers-reduced-motion:reduce){.well img,.bookend img,.side-well{transition:none}.well:hover img,.bookend:hover img,.side-well:hover img{translate:none;rotate:none}}
.less-motion .well img,.less-motion .bookend img,.less-motion .side-well{transition:none}
/* Short portrait phones need a shorter edit tray, with the same 48px controls. */
@media(max-width:759px) and (min-height:561px) and (max-height:780px){
 .edit-tray{grid-template-columns:1fr 1fr;width:calc(var(--sw) * 2.2);gap:6px}
 .edit-tray .side-well:last-child:nth-child(odd){grid-column:1 / -1}
}
@media(max-height:560px){
 .side-tray{top:64px;transform:none;max-height:calc(100dvh - 190px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;border-width:14px 10px;border-image-width:14px 10px}
 .edit-tray{align-content:start}
}

/* Two unmistakable modes: a bright play key, then a blue return-to-making key. */
#play.bookend{width:112px;height:106px;aspect-ratio:auto;border-radius:25px;background:linear-gradient(155deg,#69e775,#1cb55c 65%,#128845);border:3px solid #ecffd1;box-shadow:inset 0 3px 0 #c9ffae,0 5px 0 #17603f,0 9px 20px #143c383d;display:flex;flex-direction:column;justify-content:center;gap:0;animation:none;padding:3px 5px 8px}
#play.bookend img{width:84px;height:62px;filter:drop-shadow(0 2px 0 #16613b55)}
#play.bookend span{position:static;background:none;box-shadow:none;padding:0 2px;color:#fff;font-size:15px;font-weight:800;line-height:1.08;white-space:normal;text-align:center;text-shadow:0 2px 1px #10522f;max-width:100%}
.playing #play.bookend{background:linear-gradient(155deg,#5ecaff,#248edc 65%,#2765c0);box-shadow:inset 0 3px 0 #baedff,0 5px 0 #244b86,0 9px 20px #143c383d;border-color:#edfaff}
.playing #play.bookend span{text-shadow:0 2px 1px #1a4a81}
#play.ready::after{content:'';position:absolute;inset:-8px;border:3px dotted #ffe47f;border-radius:31px;pointer-events:none;animation:ready-halo 1.8s ease-in-out infinite}
#play.bookend:active{translate:0 3px;filter:brightness(1.08)}
#play.bookend:focus-visible{outline:4px solid #57369d;outline-offset:6px}
@keyframes ready-halo{50%{opacity:.45;scale:1.035}}
.guide-cue{position:fixed;z-index:6;left:50%;top:calc(50% + 100px);transform:translateX(-50%);max-width:calc(100vw - 32px);padding:7px 15px;border:2px dotted #9a680c;border-radius:20px;background:#fff6d8f2;color:#66460c;box-shadow:0 3px 12px #48372324;font-size:15px;font-weight:700;pointer-events:none;text-align:center}
.guide-nudge{outline:3px dotted #ffc940;outline-offset:4px;animation:guide-nudge 1.8s ease-in-out infinite}
@keyframes guide-nudge{50%{box-shadow:0 0 0 7px #ffe69b66,0 0 20px #ffd44c}}
@media(min-width:760px) and (max-width:1049px){#play.bookend{width:88px;height:96px}#play.bookend img{width:70px;height:52px}#play.bookend span{font-size:13px}}
@media(max-width:759px){#play.bookend{width:106px;height:68px;border-radius:20px;padding:2px 4px 5px;bottom:calc(100% - 3px)}#play.bookend img{width:59px;height:40px}#play.bookend span{font-size:12px}#play.ready::after{inset:-5px;border-radius:25px}.guide-cue{top:auto;bottom:calc(var(--tray-h) + 214px);font-size:12px;padding:5px 10px;max-width:calc(100vw - 42px)}}
@media(max-height:560px){#play.bookend{width:88px;height:78px;top:50%;bottom:auto;border-radius:20px}#play.bookend img{width:60px;height:43px}#play.bookend span{font-size:12px}.guide-cue{top:72px;bottom:auto;left:65%;max-width:45vw;font-size:12px;padding:4px 9px}}
.less-motion .guide-nudge,.less-motion #play.ready::after{animation:none}
@media(prefers-reduced-motion:reduce){.guide-nudge,#play.ready::after{animation:none}}

/* New imagination guides are easy to find among saved favourites. */
.choice{position:relative}
.choice .new-guide{position:absolute;top:13px;left:13px;padding:3px 9px;border-radius:999px;background:#355e81;color:#fff;font-size:12px;line-height:1.2;font-weight:700;box-shadow:0 2px 5px #173a5022;pointer-events:none}

/* Reclaim the footer space without moving the side editing trays. */
.tray{bottom:max(2px,env(safe-area-inset-bottom))}
.brand{transform:translateY(calc(max(4px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-top))))}
@media(max-height:560px){.brand{transform:translateY(calc(max(4px,env(safe-area-inset-top)) - max(6px,env(safe-area-inset-top))))}}

/* The stop control occupies Undo’s spot while the friends dance. */
#stopDance svg{width:68%;height:68%}
.playing #stopDance:not([hidden]){align-items:center;justify-content:center}

/* The cue belongs to the picker or selected-piece tools, never over an item. */
.drawer{display:grid;grid-template-rows:auto auto;height:auto;min-height:142px}
.drawer .guide-cue,.edit-tray .guide-cue{position:static;transform:none;max-width:100%;margin:0 0 7px;padding:5px 6px;font-size:12px;line-height:1.3;grid-column:1 / -1;overflow-wrap:anywhere;box-shadow:none}
.drawer .guide-cue{grid-row:1}
.drawer-items{grid-row:2;min-width:0;height:78px;margin:0;padding:3px}
.drawer-arrow{top:auto;bottom:14px;transform:none}
.edit-tray .guide-cue{font-size:11px;margin:0;padding:4px 2px}
@media(max-height:560px){.drawer{min-height:110px}.drawer-items{height:60px}.drawer .guide-cue{font-size:11px;padding:3px;margin-bottom:4px}}
@media(min-width:760px){
 .drawer{left:auto;right:max(12px,env(safe-area-inset-right));top:var(--picker-top,120px);bottom:calc(var(--tray-h) + 24px);transform:none;width:150px;min-height:0;grid-template-rows:auto 36px minmax(0,1fr) 36px;gap:6px;border-width:24px 14px;border-image:url(assets/planks/ui/paint-tray.webp) 245 170 245 190 fill / 24px 14px stretch}
 .drawer-head{top:-22px;font-size:11px;gap:4px;padding:0}
 .drawer .guide-cue{margin:0;font-size:12px;padding:5px 2px}
 .drawer-items{grid-row:3;height:auto;min-height:0;flex-direction:column;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y mandatory;gap:8px}
 .drawer .item{flex:0 0 82px;width:100%;min-height:82px}
 .drawer .item img{width:52px;height:52px}
 .drawer-arrow{position:static;justify-self:center;width:40px;height:36px;transform:none}
 #drawerPrev{grid-row:2}#drawerNext{grid-row:4}
 .drawer-arrow svg{transform:rotate(90deg)}
 .carry-demo.from-right{rotate:-90deg;transform-origin:50% 100%}
}

@media(min-width:760px) and (max-height:599px){
 .drawer{width:128px;bottom:calc(var(--tray-h) + 16px);grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr) 28px;gap:4px;border-width:16px 10px;border-image-width:16px 10px}
 .drawer-head{top:-15px;font-size:10px}
 .drawer .guide-cue{font-size:11px;padding:2px;line-height:1.2}
 .drawer-items{grid-row:2;grid-column:1 / -1}
 .drawer .item{flex-basis:62px;min-height:62px}.drawer .item img{width:40px;height:40px}
 .drawer-arrow{height:28px;width:38px}#drawerPrev{grid-row:3;grid-column:1}#drawerNext{grid-row:3;grid-column:2}
}


/* Five usable choices at once; shorter sidebars use three rows of two. */
@media(min-width:760px){
 .drawer .item{flex:0 0 clamp(52px,calc((100% - 38px)/5),100px);min-height:52px}
 .drawer .item img{width:clamp(32px,4vh,52px);height:clamp(32px,4vh,52px)}
}
@media(min-width:760px) and (max-height:820px){
 .drawer{width:180px;bottom:max(12px,env(safe-area-inset-bottom));grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr) 32px;gap:6px;border-width:22px 12px;border-image-width:22px 12px}
 .drawer-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(52px,calc((100% - 22px)/3),82px);align-content:start;grid-row:2;grid-column:1 / -1;gap:8px}
 .drawer .item{width:100%;min-width:0;min-height:52px;padding:2px}
 .drawer .item img{width:34px;height:34px}
 .drawer .item span{font-size:11px}
 .drawer-arrow{width:40px;height:32px}#drawerPrev{grid-row:3;grid-column:1}#drawerNext{grid-row:3;grid-column:2}
}
@media(max-width:759px){
 .drawer{width:calc(100vw - 8px);border-left-width:28px;border-right-width:28px;border-image-width:28px 28px}
 .drawer-items{gap:4px;padding:2px}
 .drawer .item{flex:0 0 calc((100% - 16px)/5);min-width:44px;padding:2px}
 .drawer .item img{width:40px;height:40px}
 .drawer .item span{font-size:10px}
 .drawer-arrow{width:30px;height:38px}.drawer-arrow.left{left:-29px}.drawer-arrow.right{right:-29px}
}
@media(min-width:760px) and (max-height:560px){
 .drawer{top:72px}
}
@media(min-width:760px) and (max-height:560px){
 body:has(#drawer:not([hidden])) .tray{--tray-w:min(50vw,400px);left:calc(50% - 108px)}
}

/* In play, reclaim the unused header space reserved for making guides. */
.playing .top{min-height:0}
.playing .mascot{display:none}
