/* Real paper and walnut surfaces shared by the existing activity renderers. */
body[data-workshop]{--paper:#f7f6f0;--sage:#e2e7da;--deep:#405745;--clay:#7b4439;--accent:#7b4439;--work-paper:url('game-materials/quiet-paper.webp');--work-table:url('game-materials/quiet-worktable.webp');background-color:var(--paper);scrollbar-color:#87917f var(--paper)}
body[data-workshop] h1,body[data-workshop] h2,body[data-workshop] h3{font-weight:400}
body[data-workshop] button{transition:background-color .15s ease,box-shadow .15s ease,transform .15s ease}
body[data-workshop] button:active:not(:disabled){transform:translateY(1px)}
body[data-workshop] input,body[data-workshop] select{caret-color:var(--clay)}
body[data-workshop] select,body[data-workshop] input[type=text]{background-color:#fffcf4;background-image:var(--work-paper);background-size:400px}
/* Word boards are a working sheet; controls remain in their existing reading order. */
body[data-workshop=words] #gameArea{background:#faf7ed;border:20px solid transparent;border-image:var(--work-table) 7% fill stretch;padding:22px;min-width:0;min-height:0;box-shadow:none}
body[data-workshop=words] .board-clue{font-family:Georgia,serif;font-size:21px;line-height:1.45}
body[data-workshop=words] :is(.letter-slot,.letter-rack button,.clue-row,.slot-button,.compound-list button,.group-tile,.fixed-letter,.vowel-slot,.cipher-letter,.search-cell,.search-words span,.guess-tile,.word-options button,.ladder span){background-color:#fffaf0;background-image:var(--work-paper);background-size:320px;box-shadow:0 2px 4px #503d2525;border-radius:3px}
body[data-workshop=words] :is(.letter-slot,.letter-rack button,.fixed-letter,.vowel-slot,.cipher-letter,.guess-tile,.word-options button,.ladder span){font-family:Georgia,serif;font-weight:400}
body[data-workshop=words] .letter-rack button{background-color:#ead9b5;box-shadow:inset 0 -3px 0 #886c4533,0 3px 5px #503d2525}
body[data-workshop=words] :is(.slot-button,.compound-list button,.group-tile)[aria-pressed=true]{background-image:none;background-color:var(--deep);color:#fff}
body[data-workshop=words] .search-cell{box-shadow:none;border-radius:0}
body[data-workshop=words] .search-cell.found{background-image:none;background-color:#b9cfa6}
body[data-workshop=words] .search-cell.start{background-image:none;background-color:var(--clay);color:white}
body[data-workshop=words] .guess-tile.G{background-image:none;background-color:var(--correct)}
body[data-workshop=words] .guess-tile.Y{background-image:none;background-color:var(--present)}
body[data-workshop=words] .guess-tile.X{background-image:none;background-color:var(--absent)}
body[data-workshop=words] .key-row button{box-shadow:inset 0 -2px 0 #40574524;border-radius:3px}
/* Picture surfaces use a material rim without covering the art or its hit regions. */
body[data-workshop=puzzle] .board-frame,body[data-workshop=coloring] .studio{background:#d7c3a1 var(--work-table) center/100% 100%;padding:clamp(8px,1.4vw,18px);box-shadow:0 6px 18px #47332320}
body[data-workshop=puzzle] .piece-tray{background:#efe7d5 var(--work-paper) center/500px;padding:12px;border-radius:3px}
body[data-workshop=puzzle] .piece{background-color:#fffcf5;background-image:var(--work-paper);box-shadow:0 2px 5px #47332320}
body[data-workshop=puzzle] .piece[aria-pressed=true]{border-color:var(--clay);background-color:var(--sage)}
body[data-workshop=coloring] .studio footer{color:#28332d;background:#f8f1e4;padding:10px 8px 0}
body[data-workshop=seek] .scene-viewport,body[data-workshop=differences] .viewport{outline:7px solid #c9b393;box-shadow:0 8px 20px #47332320}
body[data-workshop=seek] .clues-section{background:#f5eddd var(--work-paper) center/500px;padding:20px}
body[data-workshop=seek] .target{background-color:#ece8db;box-shadow:0 1px 3px #47332318}
body[data-workshop=seek] .target[aria-pressed=true]{background-color:var(--deep)}
/* Case evidence reads as a set of paper notes laid on the same quiet desk. */
body[data-workshop=detective] .evidence-cards{background:#e8dcc6 var(--work-table) center/100% 100%;padding:clamp(20px,3.8vw,48px);gap:18px}
body[data-workshop=detective] .evidence-card{background:#fffbf2 var(--work-paper) center/500px;box-shadow:0 3px 7px #47332325}
body[data-workshop=detective] .evidence-card.is-proof{background-color:var(--sage);outline-color:var(--deep)}
body[data-workshop=detective] .options button{background:#fffaf0 var(--work-paper) center/500px}
body[data-workshop=detective] .options button.correct{background:var(--deep);color:white}
body[data-workshop=flowers] .composition canvas{outline:8px solid #c9b393;box-shadow:0 8px 20px #47332320}
body[data-workshop=flowers] .stem{background:#f3ecd9 var(--work-paper) center/400px;box-shadow:0 2px 4px #47332318}
body[data-workshop=mosaics] .board-viewport{background:#c9b393 var(--work-table) center/100% 100%;padding:10px;box-shadow:0 6px 18px #47332320}
body[data-workshop=mosaics] .tile:not(.placed){background-image:var(--work-paper);background-size:150px}
body[data-workshop=mosaics] .tile.placed{box-shadow:inset 1px 1px 1px #ffffff55,inset -1px -1px 1px #28332d20}
body[data-workshop=sorting] .table{background:#eee4cf var(--work-table) center/100% 100%;padding:clamp(22px,5vw,64px);box-shadow:0 6px 18px #47332318}
body[data-workshop=sorting] .object{background:#fffaf0 var(--work-paper) center/400px;box-shadow:0 2px 5px #47332320}
body[data-workshop=sorting] .destination{background:#f8f0df var(--work-paper) center/400px;border:1px dashed #9c8666;box-shadow:inset 0 2px 5px #47332312}
body[data-workshop=sorting] .destination.filled{border-style:solid;background-color:#f9f7ed}
body[data-workshop=paths] .map{background-color:#e9dfc9;background-image:var(--work-table);background-size:100% 100%;padding:clamp(18px,3.2vw,36px);box-shadow:0 6px 18px #47332320}
body[data-workshop=paths] .tile:not(.obstacle){background-color:#fffbf0;background-image:var(--work-paper);background-size:240px;box-shadow:0 2px 3px #47332328}
body[data-workshop=paths] .tile.obstacle{box-shadow:inset 0 1px 3px #40574520}
body[data-workshop=paths] aside img{box-shadow:0 5px 14px #47332320}
@media(max-width:760px){
 body[data-workshop=words] #gameArea{padding:18px 14px;border-width:12px}
 body[data-workshop=words] .board-clue{font-size:17px}
 body[data-workshop=seek] .clues-section{padding:16px 12px;margin-top:18px}
 body[data-workshop=detective] .evidence-cards{padding:18px 14px}
 body[data-workshop=sorting] .table{padding:24px 14px;background-image:var(--work-paper);background-size:500px;outline:5px solid #c9b393}
 body[data-workshop=paths] .map{padding:18px 12px}
 body[data-workshop=flowers] .composition canvas{width:100%;margin-left:0;outline-width:5px}
 body[data-workshop=mosaics] .board-viewport{padding:6px}
}
@media(prefers-reduced-motion:reduce){body[data-workshop] button{transition:none}}

/* Each word activity keeps its own illustrated setting beside a compact working sheet. */
body[data-workshop=words] .word-workspace{display:grid;grid-template-columns:minmax(230px,.65fr) minmax(0,1.35fr);gap:30px;align-items:start}
body[data-workshop=words] .word-scene{margin:0;position:sticky;top:24px;min-width:0;grid-column:1;grid-row:1;overflow:hidden}
body[data-workshop=words] .word-scene img{display:block;width:100%;height:clamp(380px,45vw,620px);object-fit:cover;object-position:center}
body[data-workshop=words][data-game=river] .word-scene img{object-position:left center}
body[data-workshop=words] :is(#gameArea,#wordEnding){grid-column:2;grid-row:1}
body[data-workshop=words] #wordEnding{margin:0;padding:28px}
body[data-workshop=words] .board-clue{font-size:20px;margin-bottom:18px;max-width:42ch;text-wrap:pretty}
body[data-workshop=words] .board-note{line-height:1.6}
body[data-workshop=words] .word-actions{gap:8px;clear:both}
body[data-workshop=words] .letter-slot{min-width:42px;height:54px}
body[data-workshop=words] .letter-rack{gap:7px;max-width:500px}
body[data-workshop=words] .letter-rack button{min-width:42px;min-height:50px;padding:6px 11px}
body[data-workshop=words] .slot-list{gap:8px}
body[data-workshop=words] .slot-button{padding:12px;align-items:start;min-height:75px;gap:8px}
body[data-workshop=words] .slot-button span{min-width:0}body[data-workshop=words] .slot-button small{font-size:11px}
body[data-workshop=words] .clue-row{padding:14px;box-shadow:none}
body[data-workshop=words] .spine-line{grid-template-columns:repeat(10,minmax(0,1fr));overflow:visible;max-width:390px}
body[data-workshop=words] .clue-row form input{flex:1;width:100%;min-width:0}
body[data-workshop=words] .clue-row form button{flex-shrink:0}
body[data-workshop=words] .secret-panel{padding:18px}body[data-workshop=words] .secret-panel p{font-size:15px}
body[data-workshop=words] .compound-layout{gap:16px}
body[data-workshop=words] .compound-list button{font-size:19px;padding:11px 13px}
body[data-workshop=words] .group-grid{gap:8px}
body[data-workshop=words] .group-tile{padding:8px 5px;font-size:15px;min-height:68px}
body[data-workshop=words] .cipher-line{gap:15px}
body[data-workshop=words] .cipher-letter{min-width:34px;padding:7px 4px}
body[data-workshop=words] .search-layout{grid-template-columns:minmax(0,1fr);gap:18px}
body[data-workshop=words] .search-grid{min-width:0;width:100%;max-width:550px}
body[data-workshop=words] .search-cell{font-size:18px}
body[data-workshop=words] .search-words{margin-top:12px}
body[data-workshop=words] .search-words span{font-size:14px;padding:6px 9px}
body[data-workshop=words][data-game=detective] #gameArea{align-items:center;text-align:center}
body[data-workshop=words] .wordle-board{grid-template-columns:repeat(5,48px);gap:6px;margin:14px auto}
body[data-workshop=words] .guess-tile{width:48px;height:51px}
body[data-workshop=words] .wordle-keyboard{width:100%;max-width:450px;margin:16px auto 4px}
body[data-workshop=words] .key-row button{min-width:0;flex:1;max-width:42px;padding:6px 3px}
body[data-workshop=words] .key-row button.wide{flex:0 1 auto;max-width:none;padding:8px 14px}
body[data-workshop=words] .legend{max-width:45ch;font-size:12px}
body[data-workshop=words] .wordle-entry{flex-wrap:wrap;justify-content:center}
@media(max-width:900px) and (min-width:761px){
 body[data-workshop=words] .word-workspace{grid-template-columns:220px minmax(0,1fr);gap:20px}
 body[data-workshop=words] #gameArea{padding:16px;border-width:15px}
 body[data-workshop=words] .slot-list{grid-template-columns:1fr}
 body[data-workshop=words] .slot-button{min-height:54px}
 body[data-workshop=words] .group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 body[data-workshop=words] .word-workspace{display:flex;flex-direction:column;gap:20px}
 body[data-workshop=words] .word-scene{position:static;width:100%}
 body[data-workshop=words] .word-scene img{height:180px;width:100%;object-position:center 48%}
 body[data-workshop=words][data-game=river] .word-scene img{object-position:left center;object-fit:cover;width:200%;max-width:none}
 body[data-workshop=words] :is(#gameArea,#wordEnding){width:100%}
 body[data-workshop=words] .word-toolbar{margin-top:20px}
 body[data-workshop=words] #wordMessage{min-height:34px}
 body[data-workshop=words] .board-clue{font-size:18px}
 body[data-workshop=words] .letter-slot{min-width:34px;height:47px;font-size:25px}
 body[data-workshop=words] .letter-rack{gap:6px}body[data-workshop=words] .letter-rack button{font-size:23px}
 body[data-workshop=words] .slot-list{grid-template-columns:1fr}
 body[data-workshop=words] .slot-button{min-height:54px;font-size:14px}
 body[data-workshop=words] .clue-row{padding:11px}
 body[data-workshop=words] .clue-row form{flex-wrap:wrap}
 body[data-workshop=words] .clue-row form input{flex:1 1 120px}
 body[data-workshop=words] .clue-row form button{font-size:12px;padding:10px}
 body[data-workshop=words] .spine-line{gap:2px}
 body[data-workshop=words] .spine-line span{height:29px;font-size:17px}
 body[data-workshop=words] .group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-workshop=words] .compound-layout{gap:10px}
 body[data-workshop=words] .compound-list button{font-size:17px;padding:11px 9px}
 body[data-workshop=words] .vowel-line{gap:4px}
 body[data-workshop=words] :is(.fixed-letter,.vowel-slot){width:33px;height:46px;font-size:23px}
 body[data-workshop=words] .cipher-word{gap:3px;max-width:100%;flex-wrap:wrap}
 body[data-workshop=words] .cipher-letter{min-width:29px;font-size:21px}
 body[data-workshop=words] .search-cell{font-size:15px}
 body[data-workshop=words] .wordle-board{grid-template-columns:repeat(5,44px);gap:4px}
 body[data-workshop=words] .guess-tile{width:44px;height:44px}
 body[data-workshop=words] .key-row{gap:3px}
 body[data-workshop=words] .key-row button{font-size:12px;min-height:44px}
}
