/* First order. A pearl cushion and a raspberry enamel counter on one bench.
   The existing green tray and hit grid retain their own surface and sizing. */
main:has(> #bench:not([hidden]) .clip-study){background:#302a29;padding-block:max(3px,env(safe-area-inset-top)) max(3px,env(safe-area-inset-bottom));}
#bench .clip-study{
 --ink:#393329;--ribbon:#345342;--bench-gap:0;--paper:#f3ead2;--rule:#bfac86;
 column-gap:0;row-gap:0;align-content:center;isolation:isolate;border:0;border-radius:0;
 grid-template-areas:'head' 'order' 'tray' 'sample' 'summary' 'actions';
 grid-template-rows:auto auto minmax(0,max-content) auto auto auto;
 padding:4px clamp(6px,2vw,14px);background:radial-gradient(ellipse at 35% 20%,#78655b 0,transparent 67%),linear-gradient(100deg,#51403a,#40322f 80%,#58443a);
}
#bench .clip-study::before,#bench .clip-study::after{content:none;}
#bench .clip-study .mb-head{display:grid;grid-template-columns:minmax(0,1fr) clamp(56px,19vw,80px);align-items:center;gap:0 8px;padding:0 7px 5px;border:1px solid #c5ac83;border-bottom:0;border-radius:13px 13px 0 0;background:linear-gradient(125deg,#ead9c4,#e6d5c3 63%,#c7ad94);box-shadow:inset 0 1px #fffbef;}
#bench .clip-study .mb-head-top{display:none;}
#bench .clip-study h2{margin:0;padding-left:4px;color:#463630;font:500 clamp(19px,5.4vw,25px)/1.08 Georgia,serif;}
#bench .clip-study .mb-head-actions{justify-self:end;}
#bench .clip-study #benchBack{min-width:54px;min-height:44px;padding:0 3px;border:0;background:none;color:#523d35;box-shadow:none;font:650 12px/1.15 system-ui,sans-serif;}
#bench .clip-study .clip-pillow{position:relative;display:grid;place-items:center;min-width:0;height:clamp(70px,calc(20vw + .3125px),106px);border:1px solid #ad9681;border-radius:18% 13% 15% 11% / 24% 27% 28% 29%;background:repeating-linear-gradient(102deg,#fff8ee1a 0 1px,transparent 1px 3px),radial-gradient(ellipse at 40% 35%,#fffdf0,#f4e8d9 60%,#d4bfaa 87%,#baa08a);box-shadow:inset 0 2px 3px #fff9e8,inset 0 -3px 5px #98786348,0 2px 3px #745a484a;}
.clip-pillow::before{content:'';position:absolute;inset:3px;border:1px solid #ba9e816b;border-radius:inherit;pointer-events:none;}
#bench .clip-study .clip-plate{position:relative;display:block;height:100%;width:auto;max-width:100%;min-height:0;aspect-ratio:200/118;}
#bench .clip-study .mb-turns{justify-self:center;align-self:center;display:flex;flex-direction:column-reverse;justify-content:center;align-items:center;gap:1px;width:clamp(48px,14vw,59px);aspect-ratio:1;min-width:0;padding:0;border:2px solid #c8a66f;border-radius:50%;background:radial-gradient(ellipse at 36% 11%,#d593a2 0,transparent 36%),linear-gradient(145deg,#a74868,#792742 58%,#64243c 88%,#a45769);box-shadow:inset 0 0 0 1px #60233c,inset 0 0 0 2px #d39494,0 2px 3px #694d414d;color:#fff8e6;}
#bench .clip-study .mb-turns small{font:700 9px/1.1 system-ui,sans-serif;letter-spacing:.06em;color:inherit;}
#bench .clip-study .mb-turns strong{font:600 clamp(22px,6.2vw,27px)/.94 Georgia,serif;color:inherit;font-variant-numeric:tabular-nums;}
#bench .clip-study .mb-order{display:block;padding:5px 6px 6px;margin:0 0 5px;border:1px solid #c5ac83;border-top:0;border-radius:0 0 8px 8px;background:#ebdccb;box-shadow:0 2px 3px #2c211f45;}
#bench .clip-study #recipe{display:flex;align-items:stretch;flex-wrap:nowrap;gap:5px;}
#bench .clip-study #recipe>span{flex:1 1 auto;position:relative;display:block;white-space:nowrap;align-content:center;text-align:center;min-width:0;padding:3px 2px;color:#40362d;border:1px solid #bba48c;border-radius:8px;background:linear-gradient(#fff8e9,#f1e5d2);box-shadow:inset 0 1px #fff9f3;}
#bench .clip-study #recipe :is(img,canvas){display:inline-block;vertical-align:middle;margin-inline-end:3px;width:clamp(23px,7vw,30px);height:auto;max-height:none;}
#bench .clip-study .clip-color{font:650 clamp(11px,3.4vw,14px)/1.15 system-ui,sans-serif;color:inherit;}
/* Enamel inlay runs along the bottom seam, outside the text and touch grid. */
.clip-study .clip-inlay{position:absolute;bottom:1px;left:27%;right:9%;height:3px;display:flex;gap:2px;pointer-events:none;}
.clip-study .clip-inlay i{flex:1;border-radius:1px;background:#d9c9b6;box-shadow:inset 0 1px #bbab98;}
.clip-study [data-form=R01] .clip-inlay [data-set=true]{background:#356b55;box-shadow:inset 0 1px #759784;}
.clip-study [data-form=R02] .clip-inlay [data-set=true]{background:#923953;box-shadow:inset 0 1px #b96980;}
#bench .clip-study .clip-prefix{font:500 clamp(10px,2.8vw,12px)/1 system-ui,sans-serif;color:#5f553d;}
#bench .clip-study .clip-tally{font:700 clamp(15px,4.3vw,18px)/1.2 system-ui,sans-serif;color:inherit;}
#bench .clip-study #recipe>[data-filled=true]{border-color:#73866c;color:#294f37;}
#bench .clip-study .mb-tray{border:0;border-radius:5px;background:url('vitrine-art/nap.svg'),radial-gradient(ellipse at 23% 15%,#255049,#193e38 57%,#13312e);box-shadow:0 0 0 1px #a38a62,inset 2px 3px 7px #071d1b73;}
#bench .clip-study .mb-grid .mb-cell{border:0;border-radius:0;background:transparent;box-shadow:inset -1px -1px 0 #bddbc615;}
#bench .clip-study .mb-cell::before{content:none;}
#bench .clip-study .mb-cell[data-hint=yes],#bench .clip-study .mb-cell[data-idle-hint=yes]{outline:2px dashed #f6db9a;outline-offset:-4px;border-radius:8px;}
#bench .clip-study.clip-ids .clip-id::after,#bench .clip-study.clip-ids #recipe>span::after{content:attr(data-form);display:block;position:absolute;bottom:0;right:0;padding:1px 2px;background:#15332b;color:#fff3d6;font:700 10px/1 system-ui,sans-serif;letter-spacing:.02em;pointer-events:none;}
#bench .clip-study.clip-ids .clip-id::after{left:1px;right:auto;border-radius:2px;}
#bench .clip-study .lesson-swipe,#bench .clip-study .lesson-end{outline-color:#ffe9ae;border-radius:6px;}
#bench .clip-study.clip-ids #recipe>span::after{position:static;grid-column:1/-1;justify-self:start;border-radius:2px;}
#bench .clip-study :is(button,summary):focus-visible{outline:3px solid #f8d17c;outline-offset:-3px;box-shadow:inset 0 0 0 5px #3c422c;}
#bench .clip-study .mb-grid .mb-cell:focus-visible{border-radius:5px;outline:3px solid white;outline-offset:-4px;box-shadow:inset 0 0 0 6px #4a553b;}
#bench .clip-study .clip-sample{grid-area:sample;display:flex;align-items:center;justify-content:center;gap:clamp(4px,1.6vw,10px);background:linear-gradient(120deg,#f6ead9,#e9d8c4);color:#46382f;margin:6px 0 0;min-height:clamp(51px,calc(15vw - .046875px),66px);padding:2px 5px;border:1px solid #c1a485;border-radius:8px 8px 0 0;}
.clip-example{display:inline-flex;align-items:center;gap:3px;font:500 clamp(13px,3.7vw,16px)/1.12 Georgia,serif;white-space:nowrap;}
.clip-example :is(img,canvas){display:block;width:clamp(35px,11vw,48px);height:auto;aspect-ratio:1;}
.clip-arrow{color:#81475a;font:500 22px/1 Georgia,serif;}
#bench .clip-study .mb-status{color:#433a32;min-height:32px;padding:5px 9px;border:0;border-bottom:1px solid #e8d8c5;border-radius:0;background:#f8eddf;box-shadow:none;font:500 12px/1.25 system-ui,sans-serif;}
#bench .clip-study .mb-actions{padding:0 4px;background:#393e35;gap:5px;border-radius:0 0 8px 8px;}
#bench .clip-study .mb-actions button,#bench .clip-study #benchFinish{min-height:44px;color:#fbf3dd;background:#304b3e;border:1px solid #627463;border-radius:3px;box-shadow:none;font:650 14px/1.2 system-ui,sans-serif;}
#bench .clip-study .mb-actions button{border:0;background:transparent;}
#bench .clip-study #benchGuide::before,#bench .clip-study [data-loupe]::before{content:'◇';background:none;color:#d9c58e;vertical-align:0;}
#bench .clip-study #mineralEnd,#bench .clip-study #benchMoreDialog{background:#f4ebd6;color:#3b372d;border:1px solid #ad9873;border-top:3px double #95805e;border-radius:5px;box-shadow:0 5px 12px #1c271f66;}
#bench .clip-study #setting,#bench .clip-study #resultMount{background:#24453c url('vitrine-art/nap.svg');border:1px solid #af996c;border-radius:50%;}
#bench .clip-study .mb-actions button:disabled,#bench .clip-study #benchBack:disabled{color:#e0dbca;opacity:.76;}
body:has(#bench:not([hidden]) .clip-study) .atelier-glint{display:none;}
@media(max-height:620px){#bench .clip-study{padding-block:0;}#bench .clip-study .clip-pillow{height:63.375px;}#bench .clip-study .mb-head{padding-bottom:2px;}#bench .clip-study .clip-sample{margin-top:3px;min-height:45.203125px;padding-block:0;}#bench .clip-study .mb-status{min-height:26px;padding-block:3px;}#bench .clip-study .mb-order{padding-block:3px;margin-bottom:4px;}}
@media(orientation:landscape) and (max-height:450px) and (min-width:500px){#bench .clip-study{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'head tray' 'order tray' 'sample tray' 'summary tray' 'actions tray';grid-template-rows:auto auto auto auto auto;column-gap:10px;padding:5px 8px;}#bench .clip-study .mb-tray{align-self:center;width:100%;height:auto;}#bench .clip-study .mb-tray::before{width:100%;}}

/* Extend the vitrine material to every order without changing the tray's
   hit targets or the pre-existing small-phone booster layout. */
#bench .mineral-bench:not(.clip-study) .mb-tray{background:url('vitrine-art/nap.svg'),radial-gradient(ellipse at 23% 15%,#255049,#193e38 57%,#13312e);}
#bench .mineral-bench:not(.clip-study) .mb-cell{box-shadow:inset -1px -1px #bddbc61c;}
#bench .mineral-bench:not(.clip-study) #recipe>span{padding-bottom:5px;}
#bench .mineral-bench:not(.clip-study) #recipe canvas.volume-icon{position:absolute;left:3px;top:50%;transform:translateY(-50%);width:clamp(20px,6.3vw,29px);height:auto;}
#bench .mineral-bench:not(.clip-study) .clip-inlay{position:absolute;left:28%;right:7%;bottom:1px;height:2px;display:flex;gap:1px;pointer-events:none;}
#bench .mineral-bench:not(.clip-study) .clip-inlay i{flex:1;background:#baa991;border-radius:1px;}
#bench .clip-inlay i[data-set=true]{background:var(--stone-enamel,#356b55)!important;}
#recipe [data-color="2"]{--stone-enamel:#973653} #recipe [data-color="3"]{--stone-enamel:#325889} #recipe [data-color="4"]{--stone-enamel:#478349} #recipe [data-color="5"]{--stone-enamel:#197973} #recipe [data-color="6"]{--stone-enamel:#986631}
/* Inset photo card uses the former raw specimen space only. Its canvas has
   no border/padding: projected socket coordinates refer to the image itself. */
#bench .mb-art-slot{position:absolute;left:2px;inset-block:1px;display:grid;place-content:center;width:clamp(21px,7vw,30px);container-type:size;pointer-events:none;}
#bench .mb-art-slot .mb-earned-art{display:block;width:min(100cqw,100cqh);height:auto;aspect-ratio:1;padding:0;border:0;border-radius:3px;background:#29433d;pointer-events:none;}
#bench #recipe:is([data-goals="1"],[data-goals="2"])>.mb-has-art{padding-left:clamp(36px,10.5vw,47px);}
#bench #recipe:is([data-goals="1"],[data-goals="2"]) .mb-art-slot{width:clamp(32px,9.5vw,42px);}
#bench #recipe>.mb-has-art[data-pop=yes]{transform:none!important;}
#bench .mb-order:has(.bench-credit){z-index:12;}
#bench #recipe .mb-art-slot img.bench-credit{position:absolute;transform:none;max-width:none;max-height:none;}
.bench-credit{position:fixed;display:block;z-index:12;pointer-events:none;object-fit:contain;filter:drop-shadow(0 2px 2px #152a2466);}
@media(prefers-reduced-motion:reduce){.bench-credit{display:none;}}
