:root{--bg:#111b17;--panel:#1b2922;--panel2:#23342b;--border:#3e5345;--muted:#91a898;--ink:#f0f6ed;--accent:#a8df6e;--green:#4c9b64;--yellow:#c39a3e;--gray:#66736b;--slot:#344537;--outline:#677b68}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif;line-height:1.45}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #ceff9b;outline-offset:2px}.ambient{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 78% 5%,#46673c50,transparent 36%),radial-gradient(ellipse at 10% 50%,#325f3930,transparent 48%);z-index:-1}.shell{max-width:1340px;margin:auto;padding:20px 30px 28px}.topbar{display:flex;justify-content:space-between;align-items:center;padding:8px 0 22px;border-bottom:1px solid #435b47}.logo{display:flex;gap:14px;align-items:center}.logo-mark{background:linear-gradient(145deg,#98b953,#455c2e);box-shadow:5px 5px 0 #273e25;width:49px;height:49px;display:grid;place-items:center;color:#f8ffc8;font-size:30px;border:3px solid #b9e47a;transform:rotate(-5deg)}.eyebrow,.section-num,.micro-label{font-size:10px;letter-spacing:2.2px;font-weight:850;color:var(--accent)}h1,h2,h3,p{margin:0}h1{font-size:20px;letter-spacing:1.1px;font-weight:950;line-height:1.1}h1 span{color:var(--accent)}.top-actions{display:flex;gap:9px}.icon-button{background:#26392d;border:1px solid #6d8c64;color:#e7f4d9;width:39px;height:39px;font-weight:800;font-size:19px}.icon-button:hover,.secondary-btn:hover,.filter:hover{background:#3b513f}.hero{display:flex;justify-content:space-between;align-items:end;gap:30px;padding:44px 0 32px}.pill{font-size:10px;color:#c1f38e;border:1px solid #63915c;border-radius:30px;padding:7px 12px;background:#263e2c;font-weight:750;letter-spacing:1.5px}.pulse{display:inline-block;height:7px;width:7px;border-radius:50%;background:#b9e980;margin-right:6px;box-shadow:0 0 10px #a0f66b}h2{font-size:clamp(29px,4vw,49px);line-height:1.12;font-weight:900;letter-spacing:-1.5px;margin:20px 0 12px}h2 em{font-style:normal;color:var(--accent)}.hero p{color:#b2c5b5;max-width:580px;font-size:14px}.mode-panel{min-width:285px}.mode-buttons{display:flex;border:1px solid #597456;background:#1b3022;padding:5px;gap:3px}.mode{color:#a8c3a9;border:0;background:transparent;padding:11px 15px;flex:1;font-size:12px;font-weight:800;white-space:nowrap}.mode.active{color:#14230d;background:var(--accent)}.puzzle-meta{display:flex;justify-content:space-between;font-size:11px;color:#a4baaa;padding-top:9px}.game-layout{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);gap:18px;align-items:start}.panel{border:1px solid #49614d;background:linear-gradient(145deg,#203027,#19281f);padding:23px;box-shadow:5px 5px 0 #0b150e}.panel-heading{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:21px}.panel-heading h3,.guide-panel h3{font-size:21px;letter-spacing:-.4px;margin-top:3px}.attempt-pill,.count-pill{font-size:12px;border:1px solid #547053;padding:8px 10px;color:#d4e6cf;background:#263a2d;white-space:nowrap;font-weight:700}.craft-workspace{display:flex;align-items:center;justify-content:center;gap:19px;padding:16px 0 23px}.micro-label{font-size:9px;color:#97b3a0;margin:0 0 10px}.craft-grid{display:grid;grid-template-columns:repeat(3,69px);gap:5px}.craft-slot,.output-slot{width:69px;height:69px;background:linear-gradient(145deg,#4f6651,#344836);border:3px solid #819481;box-shadow:inset 3px 3px 0 #243b2c,inset -3px -3px 0 #688069;display:grid;place-items:center;position:relative}.craft-slot{padding:3px}.craft-slot:hover{border-color:#c4ed95}.craft-arrow{font-size:29px;color:#b7db9e}.output-slot{width:80px;height:80px;border-color:#a5c985}.output-question{font-weight:900;color:#d8e9d3;font-size:32px}.output-label{font-size:11px;color:#d8ebcf;margin-top:8px;text-align:center;max-width:112px;min-height:32px;overflow-wrap:anywhere}.item-icon{display:inline-grid;place-items:center;position:relative;width:41px;height:41px;flex:none;background:var(--tile,#658667);border:3px solid var(--tile-edge,#263d2d);box-shadow:inset 4px 4px 0 #ffffff2c,inset -5px -5px 0 #0000003e;image-rendering:pixelated;border-radius:2px}.item-icon::after{content:'';position:absolute;inset:6px 8px 11px 6px;background:#ffffff18;clip-path:polygon(0 0,100% 0,70% 100%,0 76%);pointer-events:none}.item-icon span{font-size:23px;line-height:1;text-shadow:1px 2px 0 #17271a;font-family:system-ui;z-index:1}.item-icon.small{width:34px;height:34px}.item-icon.small span{font-size:19px}.item-icon.tiny{width:26px;height:26px;border-width:2px}.item-icon.tiny span{font-size:14px}.item-icon.tiny::after{inset:3px}.message{min-height:42px;color:#b4cbb7;background:#15231c;border:1px solid #34503e;padding:11px 13px;font-size:12px;margin-bottom:12px}.message.error{color:#ffd3ba;border-color:#b36f43}.message.success{color:#c6f6a7;border-color:#66964a}.button-line{display:flex;gap:10px}.primary-btn{background:var(--accent);color:#17251a;border:0;font-weight:900;letter-spacing:.7px;padding:14px 17px;flex:1;display:flex;justify-content:space-between;align-items:center}.primary-btn:hover{background:#c0f88d}.primary-btn:disabled{cursor:default;opacity:.45}.secondary-btn{color:#d7edce;background:#2d4033;border:1px solid #71926a;padding:12px 18px;font-size:12px;font-weight:750}.hint-row{border-top:1px solid #3e5845;display:flex;align-items:center;gap:14px;margin-top:23px;padding-top:16px;color:#99b49f;font-size:11px}.hint-btn{border:0;color:#b7ed83;background:transparent;font-weight:750;white-space:nowrap;padding:0}.hint-btn:disabled{color:#b6c7af;cursor:default}.search-wrap{display:flex;align-items:center;gap:10px;background:#112018;border:1px solid #536f55;padding:0 12px}.search-wrap span{font-size:25px;color:#a6c49f}.search-wrap input{width:100%;border:0;outline:none;background:transparent;color:#f3fff0;height:46px;font-size:13px;min-width:0}.search-wrap input::placeholder{color:#819789}.search-wrap kbd{border:1px solid #4e6550;padding:3px 7px;color:#819789;font-size:12px}.filter-row{display:flex;gap:6px;flex-wrap:wrap;margin:15px 0}.filter{border:1px solid #526c56;color:#a9bea8;background:#293d2f;padding:7px 11px;font-size:11px}.filter.active{background:#557949;color:white;border-color:#86ab6c}.inventory-scroll{height:352px;overflow:auto;scrollbar-color:#657d65 #1b2b20;padding-right:4px}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(68px,1fr));gap:7px}.inv-item{border:1px solid #4a614c;background:#26382b;min-height:75px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px;padding:6px 3px;color:#d6e6d3}.inv-item:hover,.inv-item.selected{border-color:#b5ed7b;background:#426044}.inv-item.selected{outline:1px solid #b5ed7b}.inv-item span.item-name{font-size:9px;text-align:center;line-height:1.1;overflow-wrap:anywhere;max-width:100%}.inventory-footer{border-top:1px solid #405742;margin-top:16px;padding-top:12px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#c9dfc6;font-size:11px}.key-help{color:#8ba88d}.history-panel,.guide-panel{min-height:310px}.legend{display:flex;gap:13px;flex-wrap:wrap;color:#aec0ae;font-size:10px;margin-bottom:18px}.dot{display:inline-block;width:10px;height:10px;margin-right:4px}.green,.feedback.green{background:var(--green)}.yellow,.feedback.yellow{background:var(--yellow)}.gray,.feedback.gray{background:var(--gray)}.history-list{display:flex;flex-direction:column;gap:9px;max-height:420px;overflow:auto}.empty-history{color:#9cb4a0;border:1px dashed #4e6a52;padding:27px 12px;text-align:center;font-size:12px}.history-entry{display:flex;align-items:center;gap:10px;background:#25382b;border:1px solid #49664d;padding:9px}.history-grid{display:grid;grid-template-columns:repeat(3,34px);gap:3px}.feedback{width:34px;height:34px;display:grid;place-items:center}.feedback.empty .item-icon{opacity:.35}.history-desc{min-width:0;flex:1}.history-desc strong{display:block;font-size:13px}.history-desc small{display:block;font-size:10px;color:#a8bfa9}.history-number{color:#c1e29c;font-weight:850;font-size:14px}.guide-panel p{color:#acc1ae;font-size:12px;line-height:1.8;margin:14px 0}.guide-stat{display:flex;align-items:center;gap:13px;background:#2d4431;padding:18px;margin:20px 0}.guide-stat strong{font-size:34px;color:#c2ed83}.guide-stat span{font-size:12px;color:#d6e8d1}.wide{width:100%}.guide-panel .fineprint{font-size:10px;color:#849e86;margin-top:19px}footer{display:flex;justify-content:space-between;gap:15px;border-top:1px solid #3b533f;margin-top:30px;padding-top:18px;font-size:10px;letter-spacing:1px;color:#8aa18e}.status-line{padding:40px;text-align:center;color:#d4eeae}.overlay{position:fixed;inset:0;background:#070e0acd;display:flex;align-items:center;justify-content:center;z-index:20;padding:15px}.overlay[hidden],#game[hidden]{display:none}.dialog{background:#203429;border:2px solid #85aa72;color:#f1f9ed;padding:30px;max-width:440px;width:100%;max-height:90vh;overflow:auto;position:relative;box-shadow:10px 10px 0 #080f0a}.dialog h2{font-size:26px;margin:0 0 15px}.dialog p,.dialog li{color:#c2d5bf;font-size:13px;line-height:1.7}.dialog ul{padding-left:22px}.modal-close{position:absolute;right:12px;top:8px;background:transparent;color:white;border:0;font-size:27px}.dialog .primary-btn{width:100%;margin-top:15px}.solution-grid{display:grid;grid-template-columns:repeat(3,48px);gap:4px;justify-content:center;margin:16px 0}.solution-cell{height:48px;background:#435b47;border:2px solid #75916f;display:grid;place-items:center}.score-line{font-size:13px;margin:12px 0}.score-line strong{color:#c1ea87}.dialog .item-icon{transform:scale(.9)}@media(max-width:860px){.shell{padding:15px}.hero{align-items:start;flex-direction:column;gap:20px;padding:32px 0}.mode-panel{width:100%;min-width:0}.game-layout{grid-template-columns:1fr}.panel{padding:18px}.craft-workspace{gap:10px}.craft-grid{grid-template-columns:repeat(3,min(19vw,69px))}.craft-slot{width:min(19vw,69px);height:min(19vw,69px)}.inventory-scroll{height:320px}.guide-panel,.history-panel{min-height:auto}.hero h2{font-size:34px}}@media(max-width:450px){.logo-mark{width:36px;height:36px;font-size:22px}.logo{gap:9px}h1{font-size:15px}.eyebrow{font-size:8px}.craft-arrow{font-size:19px}.output-slot{width:62px;height:62px}.button-line{flex-wrap:wrap}.button-line .primary-btn{min-width:170px}.hint-row{flex-wrap:wrap}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.legend{gap:8px}}

/* Minecraft texture treatment: images fetched from the project-crafting texture CDN. */
body{background-color:#302d2b;background-image:linear-gradient(#10150dbb,#10150ddd),url('https://project-crafting.github.io/minecraft-auto-updated-textures-api/textures/block/cobblestone.png');background-size:auto,96px 96px;background-repeat:repeat;image-rendering:auto}
body[data-texture="dirt"]{background-image:linear-gradient(#16100ac2,#16100ade),url('https://project-crafting.github.io/minecraft-auto-updated-textures-api/textures/block/dirt.png')}
.ambient{background:none}
.panel{background:#19281ff0;backdrop-filter:blur(2px)}
.item-icon,.item-icon.small,.item-icon.tiny{background:none;box-shadow:none;border:none;width:42px;height:42px;display:inline-grid;place-items:center}
.item-icon.small{width:34px;height:34px}.item-icon.tiny{width:28px;height:28px}
.item-icon::after{display:none}.item-icon img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(1px 2px 0 #111a12b0)}
.item-icon .texture-fallback{display:grid;place-items:center;background:#455c43;border:2px solid #6e8a68;width:100%;height:100%;font-size:20px}
.solution-image{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}
.texture-btn{width:auto;padding:0 12px;font-size:12px;white-space:nowrap}
@media(max-width:450px){.texture-btn{padding:0 7px;font-size:10px}}

/* V3: grouped browser and distinctly half-height slab models */
.inventory-sections{display:flex;flex-direction:column;gap:17px}
.inventory-category-title{margin:0 0 8px;padding:5px 3px 7px;color:#bfe99c;font-size:11px;font-weight:850;letter-spacing:.4px;border-bottom:1px solid #526a51}
.inventory-empty{font-size:12px;color:#bbccb9;text-align:center;padding:24px 5px}
.inventory-scroll{height:400px}
.filter-row{gap:5px}
.filter{padding:7px 9px}

/* V4: consistent bounded Minecraft-style pixel art */
.item-icon,.item-icon.small,.item-icon.tiny{overflow:hidden;max-width:100%;max-height:100%;min-width:0;min-height:0;vertical-align:middle}
.item-icon img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;image-rendering:pixelated}
/* The submitted recipe stays in the editable crafting grid, with feedback. */
.craft-slot.feedback-green{background:#3f9355;border-color:#b6e7a0;box-shadow:inset 3px 3px 0 #2a6339,inset -3px -3px 0 #64ac71}
.craft-slot.feedback-yellow{background:#bb9738;border-color:#f2d875;box-shadow:inset 3px 3px 0 #87691e,inset -3px -3px 0 #dcc066}
.craft-slot.feedback-gray{background:#68726f;border-color:#a5ada8;box-shadow:inset 3px 3px 0 #414a46,inset -3px -3px 0 #89928a}
.craft-slot.feedback-green:hover,.craft-slot.feedback-yellow:hover,.craft-slot.feedback-gray:hover{filter:brightness(1.08)}


/* V5 — classic Java Edition-style stone GUI. No neon, glows or glass effects. */
:root{--bg:#444;--panel:#c6c6c6;--panel2:#b4b4b4;--border:#383838;--muted:#555;--ink:#303030;--accent:#fff;--green:#4c9851;--yellow:#c8a348;--gray:#7c7c7c;--slot:#8b8b8b;--outline:#343434}
*{border-radius:0!important}
body{background:#3a3835 url('assets/cobblestone-bg.png') repeat!important;background-size:128px 128px!important;color:#fff;font-family:'Trebuchet MS',Verdana,Arial,sans-serif;line-height:1.35}
body[data-texture="dirt"]{background-image:url('assets/dirt-bg.png')!important}
.ambient{display:none}.shell{max-width:1300px;padding:18px 24px 25px}
.topbar{padding:11px 15px;background:#c6c6c6;border:4px solid;border-color:#fff #444 #444 #fff;box-shadow:0 6px 0 #0008}
.logo-mark{transform:none;background:#777;border:3px solid;border-color:#fff #444 #444 #fff;box-shadow:none;color:#fff;font-size:25px}
h1{color:#303030;font-size:22px;letter-spacing:0;font-weight:900;text-shadow:1px 1px #fff}h1 span{color:#303030}
.eyebrow,.section-num,.micro-label{color:#555;letter-spacing:.65px;font-size:10px}
.icon-button,.secondary-btn,.primary-btn,.mode,.filter,.hint-btn{background:#ababab!important;color:#282828!important;border:3px solid!important;border-color:#fff #4e4e4e #4e4e4e #fff!important;box-shadow:inset -2px -2px #777,inset 2px 2px #dedede;letter-spacing:0;text-shadow:0 1px #ddd;font-weight:800}
.icon-button:hover,.secondary-btn:hover,.primary-btn:hover:not(:disabled),.mode:hover,.filter:hover,.hint-btn:hover{background:#c1c1c1!important}
.icon-button:active,.secondary-btn:active,.primary-btn:active,.mode:active,.filter:active,.hint-btn:active{border-color:#4e4e4e #fff #fff #4e4e4e!important;box-shadow:inset 2px 2px #777}
button:focus-visible,input:focus-visible{outline:3px solid #f6df5b;outline-offset:3px}
.hero{padding:32px 8px 22px;align-items:center}.hero h2{font-size:clamp(25px,3.3vw,42px);letter-spacing:0;font-weight:900;margin:10px 0;color:#fff;text-shadow:3px 3px #282828}.hero h2 em{color:#fff}.hero p{color:#f3f3f3;text-shadow:1px 1px #222}
.pill{background:#c6c6c6;color:#333;border:3px solid;border-color:#fff #555 #555 #fff;padding:5px 10px;letter-spacing:.5px}.pulse{background:#777;box-shadow:none}
.mode-panel{min-width:300px}.mode-buttons{background:#c6c6c6;border:3px solid;border-color:#fff #555 #555 #fff;padding:5px;gap:5px}.mode{font-size:13px;padding:11px 14px}.mode.active,.filter.active{background:#8e8e8e!important;color:#fff!important;text-shadow:1px 1px #333!important;border-color:#555 #eee #eee #555!important}
.puzzle-meta{color:#fff;text-shadow:1px 1px #222}
.game-layout{gap:18px}.panel{background:#c6c6c6;border:4px solid;border-color:#fff #404040 #404040 #fff;box-shadow:5px 6px 0 #0008;backdrop-filter:none;padding:19px;color:#303030}
.panel-heading{margin-bottom:16px}.panel-heading h3,.guide-panel h3{color:#353535;font-size:23px;letter-spacing:0}
.attempt-pill,.count-pill{background:#999;border:2px solid;border-color:#555 #fff #fff #555;color:#fff;text-shadow:1px 1px #333}
.craft-workspace{padding:14px 0 21px}.craft-slot,.output-slot,.solution-cell{background:#8b8b8b!important;border:3px solid!important;border-color:#373737 #f6f6f6 #f6f6f6 #373737!important;box-shadow:inset 2px 2px #676767!important}
.craft-slot:hover{background:#a1a1a1!important;filter:none}.craft-arrow{color:#555}.output-question{color:#eee;text-shadow:2px 2px #333}.output-label{color:#4b4b4b}
.craft-slot.feedback-green{background:#579a59!important;border-color:#315c37 #b8e1b7 #b8e1b7 #315c37!important}.craft-slot.feedback-yellow{background:#d7af48!important;border-color:#886b22 #fae7a0 #fae7a0 #886b22!important}.craft-slot.feedback-gray{background:#838383!important;border-color:#424242 #d6d6d6 #d6d6d6 #424242!important}
.message{background:#a5a5a5;border:2px solid;border-color:#777 #f6f6f6 #f6f6f6 #777;color:#272727;font-size:13px}.message.error{color:#75251b}.message.success{color:#225a29}
.button-line{gap:8px}.primary-btn{flex:1;padding:12px 13px;justify-content:center;gap:12px}.primary-btn:disabled{opacity:.6}.secondary-btn{padding:10px 15px}.hint-row{border-top:2px solid #777;color:#444;padding-top:12px;gap:10px}.hint-btn{padding:8px 10px;font-size:12px}
.search-wrap{background:#898989;border:3px solid;border-color:#474747 #eee #eee #474747;padding:0 8px}.search-wrap span{color:#ddd}.search-wrap input{color:#fff;background:transparent;outline:none!important;height:40px}.search-wrap input::placeholder{color:#ededed}.search-wrap kbd{color:#eee;border-color:#ddd}
.filter-row{margin:12px 0;gap:5px}.filter{padding:6px 9px;font-size:11px}.inventory-scroll{height:405px;scrollbar-color:#777 #bfbfbf}
.inventory-category-title{color:#343434;border-bottom:2px solid #888;font-size:12px}.inventory-category-title::before{color:#555}
.inv-item{background:#999;color:#171717;border:3px solid;border-color:#555 #eee #eee #555;min-height:77px;box-shadow:none}.inv-item:hover{background:#b5b5b5;border-color:#555 #fff #fff #555}.inv-item.selected{background:#868686;outline:2px solid #fff;border-color:#3d3d3d #ddd #ddd #3d3d3d}.inv-item span.item-name{font-size:10px;font-weight:700}
.item-icon,.item-icon.small,.item-icon.tiny{background:none;border:0;box-shadow:none;overflow:hidden;max-width:100%;max-height:100%}.item-icon::after{display:none}.item-icon img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:none}.item-icon .texture-fallback{background:#888;border:1px solid #444}
.inventory-footer{border-top:2px solid #888;color:#343434}.key-help{color:#444}
.legend{color:#333}.history-entry{background:#aaa;border:3px solid;border-color:#eee #555 #555 #eee}.history-desc small{color:#444}.history-number{color:#333}.empty-history{color:#444;border:2px dashed #777}.guide-panel p{color:#333}.guide-stat{background:#a5a5a5;border:2px solid;border-color:#555 #eee #eee #555}.guide-stat strong,.guide-stat span{color:#242424}.guide-panel .fineprint{color:#4a4a4a}
footer{color:#fff;border-top:2px solid #aaa;text-shadow:1px 1px #333}
.overlay{background:#121212b8}.dialog{background:#c6c6c6;border:4px solid;border-color:#fff #444 #444 #fff;box-shadow:8px 8px #0009;color:#303030;padding:26px}.dialog h2,.dialog p,.dialog li{color:#303030}.dialog .section-num{color:#555}.dialog .score-line strong{color:#373737}.modal-close{background:#aaa;border:2px solid;border-color:#fff #555 #555 #fff;color:#333;font-size:23px;right:9px;top:8px;width:32px;height:32px}.solution-cell{background:#929292!important}.score-line{color:#303030}
@media(max-width:860px){.shell{padding:12px}.hero{gap:15px}.panel{padding:15px}}
@media(max-width:450px){.hero h2{font-size:29px}.topbar{padding:7px}.logo-mark{width:34px;height:34px}.craft-workspace{gap:8px}.craft-grid{grid-template-columns:repeat(3,min(18vw,69px))}.craft-slot{width:min(18vw,69px);height:min(18vw,69px)}.output-slot{width:60px;height:60px}.icon-button{width:auto;min-width:34px}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* V6: pixel-perfect vanilla item model icons; never blur or apply image filters. */
.item-icon img,.history-grid img,.output-slot img,.solution-grid img,.inv-item img{image-rendering:pixelated!important;image-rendering:crisp-edges!important;filter:none!important;object-fit:contain!important}
.item-icon img{image-rendering:pixelated!important}
.missing-icon{display:grid;place-items:center;height:100%;width:100%;font-family:monospace;font-weight:bold;font-size:20px;color:#351b20;background:repeating-linear-gradient(45deg,#c78d8d,#c78d8d 5px,#d3a4a4 5px,#d3a4a4 10px);border:2px solid #6e4b4b}

/* The bundled Java cobblestone tile is scaled to 96px with nearest-neighbor sampling. */
body{background-color:#343434!important;background-image:linear-gradient(#0006,#0006),url('assets/cobblestone-bg.png')!important;background-size:auto,96px 96px!important;background-repeat:repeat!important}
body[data-texture="dirt"]{background-image:linear-gradient(#0009,#0009),url('assets/dirt-bg.png')!important}
.texture-btn{min-width:124px!important;width:auto!important;white-space:nowrap}
.category-hint{display:grid;max-width:360px;margin-inline:auto}
.category-hint .hint-btn,.category-hint .hint-value{grid-area:1/1;min-height:56px;font-size:16px}
.hint-row{display:flex;flex-wrap:wrap}
.hint-row .hint-btn{white-space:normal}
.hint-value{display:flex;align-items:center;justify-content:center;gap:8px;background:#999;border:3px solid;border-color:#555 #eee #eee #555;color:#242424;padding:8px 12px;font-weight:800;text-align:center}
.hint-value[hidden],.hint-btn[hidden],.daily-solution[hidden]{display:none}
.hint-btn:disabled{opacity:.6;cursor:default}
.daily-solution{margin-top:20px;padding:14px;background:#aaa;border:3px solid;border-color:#eee #555 #555 #eee;text-align:center}
.daily-solution h4{margin:0 0 6px;font-size:17px}
.solution-output{display:flex;align-items:center;justify-content:center;gap:8px}
.daily-solution .solution-grid{margin:8px 0 0}
.daily-archive{margin-top:18px}
.daily-archive details{margin-top:10px;padding:10px;border:1px solid #777}
.daily-archive summary{cursor:pointer;font-weight:700}
.logo-mark{flex:none;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:2px;padding:3px}
.logo-mark span{width:100%;height:100%;background:#bfbfbf;box-shadow:inset 1px 1px #eee,inset -1px -1px #505050}
#statsBtn{width:auto;padding-inline:8px;font-size:13px}
.button-line button[hidden]{display:none}
.difficulty-picker{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;padding:5px 8px;background:#c6c6c6;color:#282828;border:3px solid;border-color:#fff #555 #555 #fff;font-size:13px;font-weight:800}
.difficulty-picker select{min-width:110px;padding:7px;background:#ababab;color:#282828;border:2px solid;border-color:#555 #eee #eee #555;font:inherit}
.difficulty-picker select:focus-visible{outline:3px solid #fff;outline-offset:2px}
.dialog .example-guesses{display:grid;gap:14px;padding-left:24px;margin:0}
.example-guesses li{padding-left:4px}
.example-guesses .history-grid{margin:5px 0}
.item-icon.atlas-icon{background-repeat:no-repeat;image-rendering:pixelated}
.touch-help,.mobile-label,.mobile-filter{display:none}

@media(max-width:600px),(max-height:500px) and (orientation:landscape) and (pointer:coarse){
  .shell{padding:6px 7px 16px}
  .topbar{padding:3px 5px;gap:4px}
  .logo{gap:4px;min-width:0}
  .logo-mark{width:24px;height:24px;padding:2px;gap:1px}
  .logo .eyebrow,.hero-intro,#recipeCount{display:none}
  .logo h1{font-size:clamp(10px,3vw,14px)}
  .top-actions{gap:3px}
  .top-actions .icon-button{width:auto;height:34px;min-width:28px;padding-inline:3px;font-size:11px}
  .top-actions .texture-btn{min-width:0!important}
  .hero{padding:6px 0;gap:0}
  .mode-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 4px;min-width:0}
  .mode-buttons,.difficulty-picker{padding:2px;margin:0;gap:2px}
  .mode{font-size:11px;padding:4px 3px;min-height:34px}
  .difficulty-picker{font-size:11px}
  .difficulty-picker select{min-width:0;font-size:12px;padding:4px 0;min-height:34px}
  .puzzle-meta{grid-column:1/-1;padding:0 2px;font-size:10px}
  .game-layout{grid-template-columns:minmax(0,1fr) minmax(0,1.06fr);gap:6px}
  .game-layout .panel{min-width:0}
  .history-panel,.guide-panel{grid-column:1/-1}
  .crafting-panel,.inventory-panel{padding:5px 7px}
  .crafting-panel .panel-heading,.inventory-panel .panel-heading{margin-bottom:4px;align-items:center}
  .crafting-panel .panel-heading h3,.inventory-panel .panel-heading h3{font-size:15px;margin:0}
  .attempt-pill,.inventory-panel .count-pill{font-size:10px;padding:2px 5px}
  .category-hint .hint-btn,.category-hint .hint-value{min-height:32px;font-size:13px;padding:3px 8px;white-space:normal;overflow-wrap:anywhere}
  .craft-workspace{--mobile-slot:clamp(36px,12vw,51px);display:grid;justify-items:center;padding:4px 0 5px;gap:4px}
  .craft-workspace .micro-label{font-size:8px;margin-bottom:3px}
  .craft-arrow,.output-wrap .micro-label{display:none}
  .craft-grid{grid-template-columns:repeat(3,var(--mobile-slot));gap:3px}
  .craft-slot{width:var(--mobile-slot);height:var(--mobile-slot)}
  .output-wrap{display:flex;align-items:center;gap:4px}
  .output-slot{width:32px;height:32px;flex:none}
  .output-question{font-size:19px}
  .output-slot .item-icon{width:24px;height:24px}
  .craft-slot .item-icon{width:29px;height:29px}
  .output-label{min-height:0;margin:0;max-width:86px;font-size:10px}
  .message{min-height:0;margin-bottom:4px;padding:3px 5px;font-size:11px}
  .button-line{gap:4px}
  .button-line .primary-btn,.button-line .secondary-btn{min-width:0;min-height:36px;padding:3px 4px;font-size:11px;overflow-wrap:anywhere}
  .hint-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin-top:4px;padding-top:4px}
  .hint-row .hint-btn,.hint-row .hint-value{width:100%;min-height:34px;padding:2px 3px;font-size:10px;line-height:1.1}
  .hint-row .hint-value{flex-wrap:wrap;gap:2px;overflow-wrap:anywhere}
  .hint-row .hint-value .item-icon{width:18px;height:18px}
  .search-wrap input{height:30px;font-size:16px}
  .search-wrap kbd{display:none}
  .filter-row{display:none}
  .mobile-filter{display:block;width:100%;min-width:0;min-height:32px;margin:3px 0;padding:2px 4px;background:#ababab;color:#282828;border:2px solid;border-color:#555 #eee #eee #555;font:700 13px 'Trebuchet MS',Verdana,Arial,sans-serif}
  .mobile-filter:focus-visible{outline:3px solid #f6df5b;outline-offset:1px}
  .inventory-scroll{height:clamp(136px,40svh,360px);overscroll-behavior-y:contain}
  .inventory-category-title{font-size:10px;margin:0 0 3px;padding-bottom:2px}
  .inventory-grid{grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:3px}
  .inv-item{min-height:52px;padding:2px;gap:2px}
  .inv-item .item-icon{width:26px;height:26px}
  .inv-item span.item-name{font-size:9px}
  .inventory-footer{margin-top:4px;padding-top:3px;gap:2px 5px;font-size:10px}
  .inventory-footer,.inventory-category-title,.dialog h2,.history-desc{overflow-wrap:anywhere}
  .inventory-footer .key-help{display:none}
  .inventory-footer .touch-help{display:inline}
  .desktop-label{display:none}
  .mobile-label{display:inline}
  .daily-solution{padding:4px}
  .daily-solution .solution-grid{grid-template-columns:repeat(3,minmax(0,34px))}
  .daily-solution .solution-cell{height:34px}
  .dialog h2{padding-inline-end:24px}
}

@media(max-height:500px) and (orientation:landscape) and (pointer:coarse){
  .craft-workspace{--mobile-slot:40px}
  .inventory-scroll{height:max(100px,calc(100svh - 247px))}
}
