/* My squishies dock: one look on Town, Trade and Room (see squish-dock.js). Matches the phone town shelf. */
.sq-dock{position:fixed;z-index:40;box-sizing:border-box;display:flex;flex-direction:column;gap:5px;
 padding:6px 10px 8px;border:1px solid #fffdf5;border-radius:22px;background:#fffaf0ed;
 box-shadow:0 3px 12px #66513d14;container-type:inline-size}
.sq-dock[hidden]{display:none}
.sq-dock-head{display:flex;align-items:center;justify-content:space-between;gap:4px;height:34px;padding:0 2px 0 4px}
.sq-dock-head h2{margin:0;font-size:16px;line-height:20px;color:#5b3784}
.sq-dock-all{display:flex;align-items:center;justify-content:flex-end;min-width:88px;height:44px;padding:0 2px 0 8px;
 border:0;background:none;box-shadow:none;cursor:pointer;font-family:ui-rounded,system-ui,sans-serif;font-size:12px;font-weight:650;white-space:nowrap;color:#82658f}
.sq-dock-rail{display:flex;align-items:flex-start;gap:8px;padding:2px 2px 6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain}
.sq-dock-rail::-webkit-scrollbar{display:none}
.sq-dock-rail:focus-visible{outline:none;box-shadow:inset 0 -3px #dcbf76}
/* tiles: square cream cards, picture only; sideways swipe scrolls, drag up picks the toy up */
#sq-dock .sq-dock-rail>button,#sq-dock .sq-dock-rail>.tr-waiting{
 position:relative;--sq-t:calc((100cqw - 44px)/4);flex:0 0 var(--sq-t);width:var(--sq-t)!important;height:var(--sq-t)!important;min-width:0!important;min-height:0!important;
 aspect-ratio:1;margin:0!important;padding:0!important;display:grid!important;place-items:center;
 border:2px solid #fffdf8!important;border-radius:17px!important;background:#fff6e5!important;box-shadow:0 2px 4px #7e65571c!important;
 overflow:hidden;cursor:pointer;touch-action:pan-x!important;transform:none}
#sq-dock .sq-dock-rail>button>.toy{width:88%!important;height:88%!important;margin:0!important}
#sq-dock .sq-dock-rail>button>span:last-child:not(.toy):not(.favorite-badge):not(.town-new){display:none!important}
#sq-dock .sq-dock-rail>button.selected{border-color:#9fd9c9!important;background:#e9f8f1!important;box-shadow:0 0 0 3px #7fcfb8!important}
.sq-dock-rail .sq-fav{color:#c25b8a;position:absolute;top:5px;left:7px;z-index:2;font-size:13px}
.sq-dock-rail>.btn,.sq-dock-rail>.town-empty{flex:1 1 auto;aspect-ratio:auto!important;min-height:64px!important;font-weight:700;color:#5b3784}
@media(min-width:761px){
 .sq-dock{padding:10px 14px 14px;gap:8px;border-radius:26px}
 .sq-dock-head{height:40px}
 .sq-dock-head h2{font-size:22px;line-height:26px}
 .sq-dock-all{font-size:15px;min-width:96px}
 .sq-dock-rail{gap:12px;padding:2px 2px 4px}
 #sq-dock .sq-dock-rail>button,#sq-dock .sq-dock-rail>.tr-waiting{--sq-t:min(calc((100cqw - 88px)/6),150px,15dvh);border-radius:20px!important}
}
/* the screens' own trays are now in the dock */
body.sq-docked #main .town-collection,
body.sq-docked #main .trade-tray,
body.sq-docked #main .room-collection{display:none!important}
/* give the freed tray space back to each screen */
html body.ui2.sq-docked[data-mode][data-place=trade] .trade-mat{grid-template-rows:minmax(0,1fr) 0 auto!important}
@media(max-width:760px){html body.ui2.sq-docked[data-mode][data-place=home]:not(.gm-open) #main{grid-template-rows:50px minmax(0,1fr) 0!important}}
@media(min-width:700px) and (min-height:950px) and (orientation:portrait){html body.ui2.sq-docked[data-mode][data-place=home]:not(.gm-open) #main{grid-template-rows:48px 72px minmax(0,1fr) 0!important}}
/* treasure egg's "✨ new / 💤 waiting" tag: inside the tile's top-right corner (the tile clips anything outside) */
#sq-dock .sq-dock-rail>.tr-waiting small{position:absolute!important;top:6px!important;right:6px!important;bottom:auto!important;left:auto!important;transform:none!important;
 max-width:calc(100% - 12px);z-index:3;padding:2px 8px!important;border-radius:999px!important;background:#fff!important;box-shadow:0 1px 4px #7e65572e;
 font-size:clamp(10px,calc(var(--sq-t) * .11),15px)!important;line-height:1.3!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#sq-dock .sq-dock-rail>.tr-waiting>.toy{width:76%!important;height:76%!important;margin-top:16%!important}

/* One open wooden shelf across Town, Trade and Room. */
html body #sq-dock{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;padding:0 8px 44px!important;gap:0;isolation:isolate}
html body #sq-dock:before{content:'';position:absolute;z-index:-1;pointer-events:none;left:0;right:0;bottom:0;height:72px;background:url('./assets/onboarding/display-shelf-v2.webp') center/100% 100% no-repeat}
html body #sq-dock .sq-dock-head{height:38px;padding:0 8px;position:relative;z-index:2}
html body #sq-dock .sq-dock-all{margin-left:auto}
html body #sq-dock .sq-dock-all{min-width:48px;width:48px;height:44px;padding:0}
html body #sq-dock .sq-dock-rail{position:relative;gap:10px;padding:0 3px 2px;align-items:flex-end;overflow-y:hidden}
html body #sq-dock .sq-dock-rail>button,html body #sq-dock .sq-dock-rail>.tr-waiting{--sq-t:calc((100cqw - 38px)/4.35);border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;place-items:end center;overflow:visible}
html body #sq-dock .sq-dock-rail>button>.toy{width:96%!important;height:96%!important;transform:translateY(5%);filter:drop-shadow(0 2px 1px #61432133)}
html body #sq-dock .sq-dock-rail>button>.toy.toy-lavender{transform:translateY(10%)}
html body #sq-dock .sq-dock-rail>button:before{content:'';position:absolute;bottom:0;left:18%;right:18%;height:5px;background:#613e272e;border-radius:50%;filter:blur(2px);pointer-events:none}
html body #sq-dock .sq-dock-rail>button.selected:after{content:'✓';position:absolute;right:1px;top:2px;width:24px;height:24px;border-radius:50%;background:#94dfc9;color:#175e53;font-size:18px;line-height:24px;text-align:center;border:2px solid white}
html body #sq-dock .sq-dock-rail>button:focus-visible{outline:3px solid #8056a5!important;outline-offset:-3px;border-radius:12px!important}
@media(min-width:761px){html body #sq-dock .sq-dock-rail>button,html body #sq-dock .sq-dock-rail>.tr-waiting{--sq-t:min(calc((100cqw - 70px)/6.35),150px,15dvh)}html body #sq-dock .sq-dock-head{height:40px}}
html body #sq-dock .sq-dock-all{padding:0!important}
html body #sq-dock .sq-dock-all svg{flex:none;width:40px;height:36px}

/* Device-specific art keeps its native 3:1 canvas; never flatten the supports. */
html body #sq-dock{--ledge:7cqw;padding:0 0 var(--ledge)!important}
html body #sq-dock:before{top:calc(100% - var(--ledge));bottom:auto;height:auto;aspect-ratio:3/1;transform:translateY(-46%);background-image:url('./assets/onboarding/collection-shelf-phone.webp');background-size:contain}
html body #sq-dock .sq-dock-rail{margin:0;padding:0 8px 2px}
@media(min-width:761px){
 html body #sq-dock{--ledge:5cqw}
 html body #sq-dock:before{background-image:url('./assets/onboarding/collection-shelf-tablet.webp');transform:translateY(-47%)}
}

/* Contact is measured from the actual rail; cqw on the dock itself refers to
   its ancestor, so it must not be used to calculate this padding. */
html body #sq-dock:before{top:var(--shelf-contact)}
html body #sq-dock .sq-dock-rail>button>.toy,
html body #sq-dock .sq-dock-rail>button>.toy.toy-lavender{transform:translateY(var(--footing,0px))}

html body #sq-dock:before{left:0;right:0}
/* Auto margins center short collections without hiding the start of overflowing ones. */
html body #sq-dock .sq-dock-rail>:first-child{margin-left:auto!important}
html body #sq-dock .sq-dock-rail>:last-child{margin-right:auto!important}

/* Soften scenery behind the collection without outlining or blurring the toys. */
html body #sq-dock:before{filter:brightness(.94) drop-shadow(0 4px 3px #69412b40)}
html body #sq-dock .sq-dock-rail>button>.toy,html body #sq-dock .sq-dock-rail>.tr-waiting>.toy{filter:drop-shadow(0 2px 1px #61432130)!important}
html body #sq-dock .sq-dock-rail>button:before{bottom:0;left:23%;right:23%;height:4px;background:#51341f45;filter:blur(2px)}

/* The album rests at the shelf end; only the toys scroll. */
html body #sq-dock{--album-width:76px;gap:0}
html body #sq-dock .sq-dock-head{position:absolute;right:10px;bottom:var(--ledge);top:auto;width:var(--album-width);height:72px;padding:0;z-index:3}
html body #sq-dock .sq-dock-all{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:100%;min-width:0;height:100%;padding:5px!important;border:2px solid #fffdf5;border-radius:16px;background:linear-gradient(#fffdf2,#f1e4fb);box-shadow:0 3px 0 #bea0cb,0 4px 9px #533a6340;color:#674288;font-size:13px;font-weight:850;line-height:1.1;white-space:nowrap;touch-action:manipulation}
html body #sq-dock .sq-dock-all img{width:100%;height:43px;object-fit:contain;pointer-events:none}
html body #sq-dock .sq-dock-all:active{transform:translateY(2px)}
html body #sq-dock .sq-dock-all:focus-visible{outline:3px solid #7954a2;outline-offset:3px}
html body #sq-dock .sq-dock-rail{margin-right:calc(var(--album-width) + 20px);min-height:76px}
html body #sq-dock .sq-dock-rail>button,html body #sq-dock .sq-dock-rail>.tr-waiting{--sq-t:calc((100cqw - 120px)/3.6)}
@media(min-width:761px){
 html body #sq-dock{--album-width:98px}
 html body #sq-dock .sq-dock-head{height:88px;right:14px}
 html body #sq-dock .sq-dock-all{font-size:16px;border-radius:19px}
 html body #sq-dock .sq-dock-all img{height:56px}
 html body #sq-dock .sq-dock-rail{min-height:92px}
 html body #sq-dock .sq-dock-rail>button,html body #sq-dock .sq-dock-rail>.tr-waiting{--sq-t:min(calc((100cqw - 180px)/6),150px,15dvh)}
}

/* 2026-10-16: the "My toys" album moved to the top bar (icon only); the shelf is just your squishies. */
html body #sq-dock .sq-dock-head{display:none!important}
html body #sq-dock{--album-width:-20px!important}
html body.ui2 .ui2-bar .sq-top-collection{padding:0!important}
html body.ui2 .ui2-bar .sq-top-collection img{width:84%!important;height:84%!important;margin:auto!important;object-fit:contain!important;display:block;pointer-events:none}
@media(max-width:374px){html body.ui2 .ui2-bar.ui2-bar{gap:4px!important}html body.ui2 .ui2-bar.ui2-bar>.ui2-btn.ui2-btn{flex:0 0 38px!important;width:38px!important;height:38px!important;min-width:38px!important}html body.ui2 .ui2-bar.ui2-bar [data-ui2=me][data-ui2]{flex:0 0 42px!important;width:42px!important;height:42px!important;min-width:42px!important}html body.ui2 .ui2-bar.ui2-bar .ui2-coins.ui2-coins{min-width:0!important;padding-inline:8px!important}}
/* Give the shared collection a larger, consistent touch/visual scale on landscape tablets. */
@media (min-width:761px) and (min-aspect-ratio:1/1){
 html body #sq-dock .sq-dock-rail>button,html body #sq-dock .sq-dock-rail>.tr-waiting{--sq-t:min(calc((100cqw - 120px)/6),180px,18dvh)}
}
/* Room: only the shelf's toys catch touches, so furniture standing behind the shelf can still be dragged (iPad landscape) */
#sq-dock[data-place=home]{pointer-events:none}
/* the shelf row itself takes touches in the Room too, so a swipe that starts between two squishies still scrolls (Becca, 10/20) */
#sq-dock[data-place=home] .sq-dock-rail{pointer-events:auto}
#sq-dock[data-place=home] :is(button,.sq-dock-rail>*){pointer-events:auto}

/* empty shelf: ghost squishies (dark see-through silhouettes of real toys) and the Toy Shop with a tapping finger */
#sq-dock .sq-dock-rail>.sq-ghost,#sq-dock .sq-dock-rail>.sq-go-shop{background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible;touch-action:manipulation!important}
#sq-dock .sq-dock-rail>.sq-ghost img{width:66%;height:66%;object-fit:contain;align-self:end;margin-bottom:6%;filter:brightness(0) opacity(.13);animation:sq-ghost-bob 2.8s ease-in-out infinite;animation-delay:calc(var(--i)*-.9s);pointer-events:none}
#sq-dock .sq-dock-rail>.sq-ghost::after{content:"";position:absolute;left:24%;right:24%;bottom:5%;height:7%;border-radius:50%;background:#6b4a2a22}
@keyframes sq-ghost-bob{0%,100%{translate:0 0}50%{translate:0 -4%}}
#sq-dock .sq-dock-rail>.sq-go-shop img.sq-go-art{width:96%;height:96%;object-fit:contain;align-self:end;filter:drop-shadow(0 3px 3px #6b4a2a40);animation:sq-shop-call 2.2s ease-in-out infinite;transform-origin:50% 100%;pointer-events:none}
#sq-dock .sq-dock-rail>.sq-go-shop .sq-go-finger{position:absolute;right:-4%;bottom:-6%;width:46%;height:auto;pointer-events:none;filter:drop-shadow(0 3px 4px #0003);animation:sq-finger-tap 1.1s ease-in-out infinite}
@keyframes sq-shop-call{0%,70%,100%{scale:1}80%{scale:1.08 .94}90%{scale:.97 1.04}}
@keyframes sq-finger-tap{0%,100%{translate:0 0;scale:1}45%{translate:-8% -10%;scale:1}60%{translate:-10% -12%;scale:.9}}
#sq-dock .sq-dock-rail:has(>.sq-ghost){justify-content:center}
@media(prefers-reduced-motion:reduce){#sq-dock .sq-ghost img,#sq-dock .sq-go-shop img{animation:none!important}}

/* A short Room shelf has nothing to scroll. Let diagonal finger drags reach the room
   instead of the browser cancelling them as a horizontal pan (especially on tablets). */
html body #sq-dock[data-place="home"] .sq-dock-rail[data-scrollable="false"]>.sq-tile{touch-action:none!important}

/* Pending purchases occupy real shelf positions; the plank and its full width accept returns. */
html body #sq-dock .sq-gift-slot{position:relative;display:block;flex:0 0 var(--sq-t);--sq-t:calc((100cqw - 38px)/4.35);width:var(--sq-t);height:var(--sq-t);min-width:64px}
@media(min-width:761px){html body #sq-dock .sq-gift-slot{--sq-t:min(calc((100cqw - 88px)/6),150px,15dvh)}}
html body #sq-dock.room-drop-ready::before{filter:drop-shadow(0 0 8px #fff2b1) drop-shadow(0 0 4px #6acbb7)}

html body #sq-dock .sq-room-empty{display:grid;place-items:center;flex:1;min-height:62px;color:#69477e;font-size:14px;font-weight:800;text-align:center;pointer-events:none}

html body #sq-dock .sq-trade-return{padding:7px 12px;max-width:calc(100% - 16px);border:2px solid #fff;border-radius:22px;background:#fff8ed;color:#69477e;font-size:12px;line-height:1.25}

/* Room, every toy out on the floor (Mac, 10/22): no words on the empty shelf. Three soft empty spots wait on it, and a little
   arrow bobs down into the middle one, so kids see where toys go back (the text squeezed into a thin column on phones) */
html body #sq-dock .sq-dock-rail>.sq-room-spots.sq-room-spots{display:flex;flex:0 0 min(78%,340px)!important;align-items:flex-end;justify-content:center;gap:clamp(14px,5vw,30px);width:min(78%,340px)!important;max-width:none!important;margin:0 auto!important;padding-bottom:4px}
html body #sq-dock .sq-dock-rail>.sq-room-spots i{position:relative;flex:none!important;width:clamp(44px,13vw,64px)!important;height:auto!important;aspect-ratio:1.1;border-radius:50% 50% 44% 44%/58% 58% 42% 42%;border:3px dashed #fff3e0e6!important;background:#fff8ee38!important;box-shadow:none!important;opacity:1!important;filter:none!important}
html body #sq-dock .sq-dock-rail>.sq-room-spots i:nth-child(2)::before{content:"";position:absolute;left:50%;top:-36px;width:20px;height:26px;translate:-50% 0;background:#fff3e0;filter:drop-shadow(0 2px 2px #2a103455);clip-path:polygon(32% 0,68% 0,68% 52%,100% 52%,50% 100%,0 52%,32% 52%);animation:sq-spot-drop 1.6s ease-in-out infinite}
@keyframes sq-spot-drop{0%,100%{transform:translateY(-4px);opacity:.55}55%{transform:translateY(5px);opacity:1}}
@media (prefers-reduced-motion:reduce){html body #sq-dock .sq-dock-rail>.sq-room-spots i:nth-child(2)::before{animation:none}}
/* trade: "take it back" hint as a small picture pill instead of a squeezed sentence (Mac, 10/24) */
.sq-trade-return{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:99px;background:#fffaf2e8;border:2px solid #fff;box-shadow:0 3px 6px #0002;font-size:22px;line-height:1;white-space:nowrap;color:#69477e}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .sq-trade-return{background:#2c2347e8;border-color:#5b4b8a;color:#f3e8ff}
