/* All scene coordinates remain on the supplied 1672 × 941 canvas. */
.homeward-layout{display:block;max-width:768px;margin:12px auto}
.homeward-answer{display:flex;align-items:center;justify-content:center;gap:12px;max-width:760px;margin:8px auto;min-height:128px}
.homeward-answer img.spelling-clue{width:128px;height:128px;min-height:0;max-height:none;object-fit:contain;flex:0 0 128px}
.game-panel[data-game="spelling"] .homeward-answer .spelling-word{margin:0;min-width:0}
.homeward-layout .spelling-play{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;gap:4px;align-items:center;min-width:0;position:relative}
.homeward-trail{width:100%;max-width:680px;aspect-ratio:1672/941;overflow:hidden;border-radius:18px;border:2px solid #97a67d;background:#dce1ca;box-shadow:0 3px 12px #203c2524}
.homeward-canvas{display:block;width:100%;height:100%;object-fit:contain}
.homeward-trail{grid-column:2;grid-row:1;justify-self:center}
.trail-chances{grid-column:3;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;margin:0;min-width:0}
.chance-token{width:clamp(23px,3.5vw,34px);height:clamp(23px,3.5vw,34px);object-fit:contain;transition:opacity 150ms}
.chance-token.spent{opacity:.18;filter:grayscale(.65)}
.trail-lock{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);font-size:12px;text-align:center;margin:0;padding:4px 8px;background:#fffef5e8;border-radius:8px;color:#405b3c;max-width:75%}
.trail-lock:empty{display:none}
.homeward-layout .spelling-attempts{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.game-panel[data-game="spelling"] .keyboard{display:grid;margin:8px auto 0;width:min(620px,100%);gap:4px;grid-template-columns:repeat(13,minmax(0,1fr))}
.game-panel[data-game="spelling"] .letter-key{width:100%;min-width:0;min-height:44px}
.game-panel[data-game="spelling"] .spelling-word{margin:12px auto 8px}
@media(min-width:800px) and (max-height:750px){
 .game-panel[data-game="spelling"]{position:relative;padding:12px 20px}
 .game-screen:has(.homeward-layout){padding-bottom:0}
 .game-panel[data-game="spelling"] .game-heading{position:absolute;top:18px;left:50%;transform:translateX(-50%);margin:0;max-width:50%;white-space:nowrap}
 .game-panel[data-game="spelling"] .game-heading h1{font-size:28px}
 .homeward-layout{margin:6px auto}
 .homeward-trail{max-width:min(680px,calc((100svh - 452px)*1672/941))}
 .homeward-layout .spelling-play{grid-template-columns:88px minmax(0,1fr) 88px}
 .game-panel[data-game="spelling"] .feedback{min-height:44px}
 .game-panel[data-game="spelling"] .spelling-word{margin:6px auto}
 .chance-token{width:26px;height:26px}.trail-chances{display:grid;grid-template-columns:repeat(3,26px);gap:3px}
}
@media(max-width:700px){
 .homeward-layout{margin:8px auto}
 .homeward-answer{gap:8px;min-height:96px;margin:8px auto}
 .homeward-answer img.spelling-clue{width:96px;height:96px;flex-basis:96px}
 .homeward-layout .spelling-play{grid-template-columns:22px minmax(0,1fr) 22px;gap:4px}
 .homeward-trail{max-width:600px;border-radius:12px}
 .trail-chances{gap:2px}.chance-token{width:16px;height:16px}
 .game-panel[data-game="spelling"] .keyboard{gap:5px;grid-template-columns:repeat(7,minmax(0,1fr));width:100%}
 .game-panel[data-game="spelling"] .letter-key{min-width:0;height:44px}
}
@media(prefers-reduced-motion:reduce){.chance-token{transition:none}}
