/* Craft first; the ingredient backpack opens only when requested. */
.workbench-intro{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:22px 28px 0}.workbench-intro p{font-size:18px}.workbench-intro>span{font-size:13px;color:var(--muted)}
.workbench-body{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);align-items:start;gap:40px;padding:24px 28px 28px}.workbench-body .craft-panel{min-width:0}.workbench-body .craft-grid{max-width:360px;margin:auto;gap:7px;padding:9px}.workbench-body .slot{aspect-ratio:1;min-width:0;height:auto;padding:5px 3px;gap:3px}.workbench-body .slot img{width:48px;height:48px;flex-shrink:0}.workbench-body .slot.filled span{display:block;font-size:12px;line-height:1.4;overflow-wrap:anywhere;max-width:100%;text-align:center}.workbench-body .slot.vacant span{font-size:30px;color:#766342}.workbench-body .slot.vacant:hover{background:#d4c6a7}.workbench-body .slot-help{font-size:12px;line-height:1.6;margin:14px 0}.workbench-body .craft-actions{max-width:none;flex-direction:row;gap:12px}.workbench-body .craft-actions button{min-height:46px;padding:10px;font-size:15px}.workbench-body #craft-output{min-height:300px;max-height:none;overflow:visible;padding:22px}.workbench-body .output-panel h3{margin:0}.workbench-body .output-panel p{font-size:15px}.workbench-body .output-panel small{font-size:12px}.workbench-body .fusion-result{flex-direction:row;text-align:left;align-items:center;padding:12px;gap:14px}.workbench-body .fusion-result img{width:72px;height:72px}.workbench-body .fusion-result em{font-size:12px;overflow-wrap:anywhere}.workbench-body .fusion-result strong{font-size:18px}.workbench .window-foot{align-items:baseline;overflow-wrap:anywhere}.workbench .window-foot>span{min-width:0}.workbench .window-foot>span:last-child{flex-shrink:0}

.backpack-open{overflow:hidden}.backpack{max-width:940px;width:calc(100% - 40px);padding:0;max-height:92dvh;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a7656 #e2d7bd;background:#ddcfb2}.backpack-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;background:var(--wood);color:var(--paper);padding:16px 22px;position:sticky;top:0;z-index:2;border-bottom:3px solid var(--wood-dark)}.backpack-heading h2{font-size:23px;margin-top:5px}.backpack-heading .pixel-en{font-size:8px;color:#e5d3aa}.backpack-heading button{flex:0 0 44px;width:44px;font-size:26px;padding:0;min-height:44px;color:var(--paper);background:var(--wood-dark)}.backpack-body{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:24px;padding:22px}.backpack-browser,.material-inspect{min-width:0}.backpack-filters{display:grid;grid-template-columns:1fr;gap:12px}.backpack-filters label{min-width:0;font-size:12px;color:var(--muted)}.backpack-filters select,.backpack-filters input{margin-top:5px;min-height:44px;font-size:14px}.backpack-count{font-size:12px;color:var(--muted);padding:13px 0 10px}.backpack-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.backpack-item{display:flex;align-items:center;justify-content:flex-start;flex-direction:column;min-width:0;min-height:125px;padding:10px 5px 8px;gap:5px;background:#efe4c9;border-color:#8b7555;box-shadow:inset 2px 2px #fff8,inset -2px -2px #0002,1px 1px #4a3014}.backpack-item img{width:48px;height:48px;flex-shrink:0}.backpack-item>span{font-size:13px;line-height:1.4;overflow-wrap:anywhere;max-width:100%}.backpack-item small{font-size:10px;color:var(--muted);margin-top:auto;line-height:1.3}.backpack-item[aria-pressed=true]{border-color:var(--green-deep);background:#c6d6ad;box-shadow:inset 2px 2px #66844d,1px 1px #4a3014}.backpack-pages{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}.backpack-pages button{font-size:12px;padding:8px;min-height:44px}.backpack-pages>span{font-size:12px;white-space:nowrap}.backpack-empty{grid-column:1/-1;padding:28px 10px;text-align:center;line-height:1.7}.backpack-empty button{margin-top:18px;font-size:13px}
.material-inspect{background:var(--paper);border:2px solid #b3a07e;padding:20px;align-self:stretch;overflow-wrap:anywhere}.inspect-placeholder{display:flex;flex-direction:column;justify-content:center;text-align:center;min-height:390px;color:var(--muted);gap:14px}.inspect-placeholder>span{font-size:45px}.inspect-placeholder h3{font-size:20px;color:var(--wood-dark)}.inspect-placeholder p{font-size:14px}.material-title{display:flex;gap:14px;align-items:center;margin-bottom:23px}.material-title>div:last-child{min-width:0}.material-title h3{font-size:24px;line-height:1.4;margin:7px 0}.material-title p,.material-title small{font-size:12px;color:var(--muted)}.material-portrait{width:100px;height:108px;flex-shrink:0;background:#e7dec5;box-shadow:inset 2px 2px #c9b895,inset -2px -2px #fff8;display:grid;place-items:center}.material-portrait img{width:96px;height:96px}.material-description{margin:0}.material-description dt{font-size:12px;color:var(--wood-light);margin-bottom:7px}.material-description dd{margin:0 0 18px;font-size:15px;line-height:1.8}.material-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.material-actions button{font-size:14px;min-height:46px;flex:1;padding:10px}.material-actions+.small{margin-top:15px}.material-references{margin-top:20px;font-size:12px;color:var(--muted);line-height:1.7}.material-references summary{min-height:36px;cursor:pointer}.material-references a{display:block;margin:8px 0}.backpack-back{display:none}
.story-jump{display:inline-block;margin:0 0 18px;font-size:13px}.drink-story{scroll-margin-top:55px}.story-sources ol{padding-left:22px;margin:9px 0}.story-sources li{padding:4px 0;line-height:1.8}.story-sources cite{font-style:normal}.story-marker{font-size:10px;color:var(--green-deep);padding:0 14px 12px}
@media(max-width:900px){.workbench-body{gap:24px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:22px}.workbench-intro{padding:20px 22px 0;flex-wrap:wrap;gap:4px}.backpack-body{gap:16px;padding:18px}.material-inspect{padding:16px}.material-title{flex-direction:column;align-items:flex-start}}
@media(max-width:640px){.workbench-body{grid-template-columns:minmax(0,1fr);padding:18px 14px;gap:26px}.workbench-body .craft-grid{max-width:330px}.workbench-body .craft-actions{max-width:330px}.workbench-intro{padding:18px 14px 0}.workbench-intro p{font-size:16px}.workbench-intro>span{font-size:12px}.workbench-body #craft-output{min-height:200px;padding:16px}.workbench-body .unknown-item{margin:12px auto 18px}.workbench-body .output-panel p{font-size:14px}.workbench .window-foot{flex-direction:column;gap:6px}.workbench .window-foot>span:last-child{flex-shrink:1}.backpack{width:calc(100% - 20px);max-height:94dvh}.backpack-heading{padding:12px 14px}.backpack-heading h2{font-size:21px}.backpack-body{display:block;padding:14px}.backpack-grid{gap:8px}.backpack-item{min-height:119px;padding:9px 4px}.backpack-item>span{font-size:12px}.backpack-count{font-size:11px}.backpack .material-inspect{display:none}.backpack[data-inspect] .backpack-browser{display:none}.backpack[data-inspect] .material-inspect{display:block}.backpack-back{display:inline-block;font-size:12px;min-height:44px;padding:8px 12px;margin-bottom:20px}.material-title{flex-direction:row;align-items:center;gap:13px}.material-title h3{font-size:23px}.material-description dd{font-size:14px}.material-actions button{font-size:13px}.material-inspect{padding:15px}.backpack-pages{margin-top:14px}.story-marker{font-size:10px;padding:0 9px 10px}}
@media(max-width:360px){.workbench-body .slot img{width:40px;height:40px}.workbench-body .slot.filled span{font-size:11px}.workbench-body .craft-grid{gap:5px;padding:6px}.material-title{flex-wrap:wrap}.backpack-item{min-height:125px}.workbench-body .fusion-result{gap:8px;padding:8px}.workbench-body .fusion-result img{width:48px;height:48px}}

/* Category entrance and explicit navigation at every level. */
.backpack[data-level="groups"] .backpack-body{display:block}.backpack-top{padding:18px 22px 0;display:flex;align-items:end;gap:16px}.backpack-top label{display:block;max-width:420px;flex:1;min-width:0;font-size:12px;color:var(--muted)}.backpack-top input{font-size:14px}.backpack-top button{font-size:13px;padding:10px;flex-shrink:0}.backpack-heading button[data-close]{flex:0 0 auto;width:auto;min-height:44px;font-size:13px;padding:10px}.backpack-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.category-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;padding:14px 12px;min-width:0;background:#efe4c9;border-color:#8b7555}.category-card img{width:48px;height:48px}.category-card strong{font-size:16px;font-weight:400;line-height:1.4}.category-card>span{font-size:12px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}.category-card small{font-size:11px;color:var(--green-deep);margin-top:auto}.backpack-back{display:inline-block;font-size:12px;min-height:44px;padding:8px 12px;margin-bottom:20px}.backpack-list-title{font-size:19px}.collection-more{display:block;margin:26px auto 0;min-height:48px;font-size:14px}.quiz-exclusions{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a7656 #e2d7bd}.quiz-actions{scroll-margin-top:16px}#quiz-content{scroll-margin-top:12px}#detail>.close{width:auto;min-width:108px;min-height:44px;font-size:13px;padding:10px 12px;margin:-12px -12px 8px 8px;float:right}.reading-links{border-top:1px solid var(--line);padding-top:16px;margin-top:20px;font-size:13px;line-height:1.8}.reading-links h3{margin-bottom:10px}.reading-links article+article{margin-top:16px}.reading-links p{font-size:13px;margin-top:5px;color:var(--muted)}
@media(max-width:640px){.backpack-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.category-card{padding:12px 8px}.category-card strong{font-size:14px}.category-card>span{font-size:11px}.backpack-top{padding:14px 14px 0;flex-direction:column;align-items:stretch;gap:10px}.backpack-top label{max-width:none}.backpack-top button{align-self:start}.backpack[data-inspect] .backpack-top{display:none}.backpack-heading button[data-close]{font-size:12px;padding:8px}.backpack-heading h2{font-size:20px}.collection-more{width:100%;font-size:13px}#detail>.close{margin:-12px -8px 10px 8px}.quiz-actions{position:sticky;bottom:0;background:var(--paper);padding:12px 0 6px;border-top:1px solid var(--line);z-index:1}.quiz-actions .primary{margin-left:auto}.quiz-exclusions{max-height:240px}}

.collection-context{text-align:right;font-size:13px;color:var(--muted)}.collection-context a{display:inline-block;margin-top:9px;font-size:12px}.book-shelf{padding-top:42px;scroll-margin-top:20px}.book-shelf>.collection-heading>a{font-size:13px}.book-shelf>p{font-size:14px;color:var(--muted);max-width:65ch}.book-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin-top:24px}.book-list article{padding:20px 0;border-top:3px solid var(--wood);min-width:0}.book-list h3{font-size:20px;overflow-wrap:anywhere}.book-list p{font-size:14px;margin-top:12px;line-height:1.8}.book-list p:first-of-type{font-size:12px;color:var(--muted)}.book-list a{display:block;font-size:13px;margin-top:15px}@media(max-width:700px){.book-list{grid-template-columns:1fr;gap:8px}.collection-context{font-size:11px;max-width:115px}.book-shelf>.collection-heading>a{font-size:12px}.book-list h3{font-size:21px}}

.new-drinks{font-size:13px;margin:0 0 14px;min-height:44px}.new-drinks[aria-pressed=true]{background:var(--green-deep);color:var(--paper)}

@media(max-width:640px){input[type=search],select,.backpack-top input{font-size:16px}}

#detail>.close{float:none;display:block;margin:-8px 0 15px auto}#detail .recipe-head{clear:both}


/* Keep instructions close to their controls. */
.hud .home-link{margin-left:auto}.scene{height:150px}.scene-copy{padding-top:24px}.scene h1{margin:0 0 10px}.workbench-intro p{font-size:14px}.notice-board{padding:18px 22px}.notice-board p{color:var(--ink)}@media(max-width:540px){.scene{height:140px}.scene-copy{padding-top:24px}.scene h1{font-size:25px}.scene-copy>p:last-child{max-width:240px}.workbench-intro p{font-size:13px}}

.filter-sections{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:22px}.filter-sections fieldset{border:0;padding:0;margin:0;min-width:0}.filter-sections legend{font-size:17px;margin-bottom:12px}.filter-sections legend small{font-size:11px;color:var(--muted);margin-left:8px}.filter-sections .chips{max-height:none;overflow:visible}.filter-sections .chips button[aria-pressed=true]{background:var(--green-deep);color:var(--paper)}.card-types{font-size:11px;line-height:1.6;padding:8px 14px 0;color:var(--green-deep)}@media(max-width:640px){.filter-sections{grid-template-columns:1fr;gap:22px}.filter-sections .chips button{min-height:40px}.card-types{padding:7px 9px 0;font-size:10px}}
