.desk-scene {
  position:relative; container-type:inline-size; max-width:1370px; margin:auto;
  background: #ead9c3 url(field-desk.jpg) center top/100% auto no-repeat;
}
.spread { max-width:none; grid-template-columns:53.5% 46.5%; min-height:53.5cqw; }
.cover img { opacity:0; }
.cover { height:1px; overflow:hidden; }
.stage { padding:1.5cqw 1.4cqw 0 0; }
.game { gap:.5cqw; }
.board-scroll { max-height:39cqw; }
.board[data-level=easy] .cell,.board[data-level=daily] .cell { aspect-ratio:1.18; }
.scorebar { margin-bottom:.45cqw; }
.game-controls,.game-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px 14px; }
.game-controls { order:0; }
.game-top { order:1; }
.game-voice { order:2; }
.game-controls button,.game-top button,.game-top select {
  font:600 clamp(13px,1.15vw,18px)/1.2 Georgia,serif; color:#3a3021; background:transparent;
  border:0; border-radius:0; padding:3px 6px; min-height:34px;
}
.game-top select { padding-right:25px; }
.game-controls button:hover,.game-top button:hover { background:#f8e8cd; }
#flag,#flag[aria-pressed=true] { color:#392c1e; background:transparent; }
.lever { width:55px; height:28px; display:inline-flex; align-items:center; padding:2px; position:relative; border:3px ridge #d9cdb5; border-radius:20px; background:#746e54; box-shadow:0 1px 3px #5c472f88; }
.lever::before { content:""; width:18px; height:18px; border-radius:50%; background:#fff1dd; box-shadow:0 1px 3px #352d21; }
#flag[aria-pressed=true] .lever { background:#5c652a; justify-content:flex-end; }
#flag[aria-pressed=true] .lever::after { content:"⚑"; color:#ff5f40; position:absolute; left:4px; }
#hint { font-style:italic; border-bottom:1px dashed #84694a; }
.game-voice .keys { font-size:12px; }
.logic { position:relative; width:73%; min-height:11.4cqw; margin:0 3% 0 auto; padding:.8cqw 1.6cqw 1.6cqw; border:0; box-shadow:none; transform:rotate(-1deg); background:transparent; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
.logic h3 { font:italic bold clamp(21px,2.5vw,38px)/1.05 Georgia,serif; text-decoration:underline #ac3a29; text-underline-offset:.17em; }
.logic p { font:clamp(12px,1vw,16px)/1.25 Georgia,serif; margin-top:5px; }
.logic-demo { display:flex; gap:10px; align-items:center; }
.logic-grid { grid-template-columns:repeat(3,clamp(28px,2.8vw,42px)); gap:0; border:1px solid #615341; background:none; transform:rotate(.6deg); }
.logic-grid .example-cell,.logic-grid button { width:100%; aspect-ratio:1; background:transparent; color:#403425; border:1px solid #72614c; border-radius:1px; font:italic bold 20px Georgia,serif; }
.logic-grid button { background:#d6bd965e; }
.logic-grid button:hover { background:#f3dfbb; }
#logic-reset { background:none; border:0; color:#5e4430; padding:5px; font:italic 14px Georgia,serif; }
@media(min-width:761px) and (max-width:1050px){.logic-demo{gap:3px}.game{gap:3px}.keys{display:none}.logic{background:#f5e2c9d9}}
@media(max-width:760px){
 .desk-scene{max-width:480px;background:#efdec7 url(notebook-paper.jpg)}
 .spread{display:block;min-height:0}
 .cover{height:98px;background:transparent}.cover img{opacity:1}
 .stage{padding:9px 0 8px}.game{gap:6px}
 .board-scroll{max-height:65svh}.board[data-level=easy] .cell,.board[data-level=daily] .cell{aspect-ratio:1}
 .game-controls,.game-top{display:flex;gap:5px 18px}.game-controls button,.game-top button,.game-top select{width:auto;min-height:44px}
 .game-voice{text-align:center}.logic{width:100%;margin:0;padding:24px 22px 18px 37px;transform:none;min-height:0;grid-template-columns:1fr;gap:9px;background:#f4e2c8 url(field-desk.jpg) 91% 99%/150% 650% no-repeat}
 .logic-demo{justify-self:start}.logic p{font-size:14px}.logic h3{font-size:25px}.logic-grid{grid-template-columns:repeat(3,38px)}
}
.logic:not(:has([data-example][aria-pressed=true])) #logic-response { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
@media(min-width:1051px){.logic{column-gap:2cqw;grid-template-columns:1fr 1fr}.logic-demo{justify-self:start}.logic-grid{grid-template-columns:repeat(3,3.15cqw)}}
