/* Fun Room kit, round 3: the workbench chooser (fr-bench.js). In the Edit view the scene is the spot at the top (the
   stage and the row of your picks) and this fixed band below it; nothing slides over the spot. The band is about
   300 px on the smallest phone (360 x 692) and grows a little on tall phones; the reel's middle card is about 150 px. */
.k-bench{display:none;flex:none;flex-direction:column;height:clamp(296px,41cqh,350px);padding:6px 0 calc(4px + env(safe-area-inset-bottom));gap:4px;position:relative;z-index:6;
  background:linear-gradient(#3a2412,#1e1208 55%,#160c04);border-top:1.5px solid rgba(216,178,92,.75);box-shadow:0 -8px 22px rgba(0,0,0,.55)}
.k-edit.k-benched .k-bench{display:flex}
/* in the Edit view the chooser replaces the dock and the "Add" card; your picks become a slimmer row under the object */
.k-edit.k-benched .k-dock{display:none}
/* your picks: one slim row of pictures under the object (the picture is the label; tap one to show it on the object) */
.k-edit.k-benched .k-tray{height:clamp(96px,13.5cqh,120px);padding-top:2px}
.k-edit.k-benched .k-tray>h3{height:16px;line-height:16px}
.k-edit.k-benched .k-addcard,.k-edit.k-benched .k-cap,.k-edit.k-benched .k-dots{display:none}
.k-edit.k-benched .k-row{padding-top:12px;padding-bottom:6px}
.k-edit.k-benched .k-x{top:-12px;right:-12px}
.k-edit.k-benched .k-more{top:calc(50% - 18px)}

/* the strip: the dial, or the typed letters */
.kb-strip{flex:none;height:48px;position:relative;padding:0 12px}
.kb-dialwrap{height:100%}
.kb-strip .dial3{height:46px}
.kb-strip .dial3 .dn{font-size:13px}
.kb-typed{position:absolute;inset:0 12px;display:none;align-items:center;justify-content:center;gap:10px}
.kb-strip.lettered .kb-dialwrap{visibility:hidden}
.kb-strip.lettered .kb-typed{display:flex}
.kb-boxes{display:flex;gap:6px}
.kb-box{width:44px;height:44px;border-radius:10px;border:2px solid rgba(216,178,92,.45);background:rgba(0,0,0,.35);display:grid;place-items:center;font:700 24px var(--display);color:#ffe9a8;box-shadow:inset 0 2px 6px rgba(0,0,0,.6)}
.kb-box.cur{border-color:var(--lamp);box-shadow:0 0 10px rgba(255,217,138,.5),inset 0 2px 6px rgba(0,0,0,.6)}
.kb-box.drop b{display:inline-block;animation:drop .3s cubic-bezier(.2,1.4,.4,1)}
.kb-erase,.kb-clear{flex:none;width:48px;height:44px;border-radius:10px;display:grid;place-items:center;color:var(--cream);background:rgba(0,0,0,.3);border:1px solid rgba(216,178,92,.35)}
.kb-erase:disabled{opacity:.35}
.kb-clear{position:absolute;left:0;top:2px}
.kb-erase{position:absolute;right:0;top:2px}

/* the reel: three at a time, the middle one big */
.kb-reelwrap{position:relative;flex:1;min-height:110px;-webkit-mask:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);mask:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent)}
.kb-reel{height:100%;display:flex;align-items:center;gap:10px;padding:13px 0 4px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x}
.kb-reel::-webkit-scrollbar{display:none}
/* the ends pad the reel so the first and last cards can sit in the middle (--half: half the middle card plus the gap, set by fr-bench.js) */
.kb-reel::before,.kb-reel::after{content:"";flex:none;width:max(0px,calc(50% - var(--half,80px)))}
.kb-card{position:relative;flex:none;height:74%;aspect-ratio:var(--rar,.92);scroll-snap-align:center;padding:0;border-radius:12px;border:2px solid rgba(216,178,92,.35);background:#0b1a2e;opacity:.55;filter:saturate(.75) brightness(.85);transition:height .2s,opacity .2s,filter .2s,border-color .2s,box-shadow .2s}
.kb-card .k-pic{width:100%;height:100%;border-radius:10px}
.kb-card.mid{height:100%;opacity:1;filter:none;border-color:var(--lamp);box-shadow:0 0 0 2px rgba(255,217,138,.35),0 0 22px rgba(255,200,100,.5)}
.kb-card.lifted .k-pic{visibility:hidden}
.kb-badge{position:absolute;right:-9px;top:-9px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font:700 22px/1 var(--display);font-style:normal;color:#3a2408;background:radial-gradient(circle at 35% 30%,#fff3c4,#e0b858 55%,#9a6e22);border:1.5px solid #3a2408;box-shadow:0 2px 6px rgba(0,0,0,.6);opacity:0;transform:scale(.6);transition:all .2s;pointer-events:none}
.kb-badge::before{content:attr(data-b)}
.kb-card.mid .kb-badge{opacity:1;transform:none}
/* a card is its painted ground until its picture arrives; the lettered title shows only when there is no picture at all */
.kb-card .k-ttl{visibility:hidden}
.kb-card .k-img.fav-none~.k-ttl,.kb-card .k-pic:not(:has(.k-img)) .k-ttl{visibility:visible;display:block}
.kb-card .k-img{opacity:0;transition:opacity .25s}.kb-card .k-img.fav-on{opacity:1}
.kb-card.have .kb-badge{background:radial-gradient(circle at 35% 30%,#d9ffd9,#5fbf6a 55%,#2a6a30);color:#fff}
.kb-card.nope{animation:nope .35s}
.kb-more,.kb-none{flex:none;align-self:center;max-width:150px;padding:10px 12px;font:600 14px/1.3 var(--display);letter-spacing:.03em;color:rgba(243,234,214,.75);text-align:center}
.kb-none{max-width:none;width:100%}
.kb-name{flex:none;height:24px;display:flex;align-items:baseline;justify-content:center;gap:6px;font:700 16px/24px var(--display);letter-spacing:.05em;text-transform:uppercase;color:#fff4d8;white-space:nowrap;padding:0 12px;text-shadow:0 2px 6px rgba(0,0,0,.7)}
.kb-name b{min-width:0;overflow:hidden;text-overflow:ellipsis}
.kb-name small{flex:none}
.kb-name small{font-size:13px;color:var(--gold);letter-spacing:.1em}

/* the letter row: one sliding row of brass keys, the pencil first */
.kb-keysw{flex:none;height:56px;position:relative;border-top:1px solid rgba(216,178,92,.22)}
.kb-keys{height:100%;display:flex;gap:6px;align-items:center;overflow-x:auto;scrollbar-width:none;padding:0 10px;touch-action:pan-x}
.kb-keys::-webkit-scrollbar{display:none}
.kb-key{flex:none;width:44px;height:46px;border-radius:9px;font:700 24px/1 'EB Garamond',Georgia,serif;color:#3a2408;background:var(--brass);border:1px solid #5a3a10;box-shadow:0 4px 0 #6b4a12,0 6px 8px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.7);transition:transform .1s,opacity .2s}
.kb-key:active{transform:translateY(3px);box-shadow:0 1px 0 #6b4a12,0 2px 4px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.7)}
.kb-key.no{opacity:.22;box-shadow:none;transform:translateY(3px);background:#6b5534;pointer-events:none}
.kb-pencil{width:54px;display:grid;place-items:center;background:linear-gradient(#fff6d6,#f0dca0 45%,#c99a3a);margin-right:4px}
.k-bench.noletters .kb-keysw{height:52px}
.k-bench.noletters .kb-keys{justify-content:center}

/* typing: the band shrinks to the reel and rides just above the writing bar; the spot stays visible above it */
.k-typing .k-bench{position:absolute;left:0;right:0;height:auto;padding:6px 0 4px;border-radius:18px 18px 0 0;z-index:60}
.k-typing .kb-strip,.k-typing .kb-keysw{display:none}
.k-typing .kb-reelwrap{flex:none;height:clamp(96px,16vh,132px)}
.k-typing .k-tray{visibility:hidden}

/* the landing: the spot glows gold for a moment */
.k-landed{animation:kland 1.25s ease-out}
@keyframes kland{0%{box-shadow:0 0 0 0 rgba(255,210,90,0)}25%{box-shadow:0 0 0 4px #ffd25a,0 0 34px 8px rgba(255,200,90,.75)}100%{box-shadow:0 0 0 0 rgba(255,210,90,0)}}

/* a place of the flat row whose poster is not drawn now (fr-bench.js windowed): the same width, nothing in it */
.k-slim .kb-flat .kb-card.away{width:var(--cw,96px);box-shadow:none;background:none}
