/* Load after redesign.css. Scoped classes avoid changing other games. */
.wg-shell{width:100%;max-width:860px;margin:0 auto;min-height:0;display:flex;flex-direction:column;color:var(--ink,#2b2420)}
.wg-shell .wg-heading{flex-shrink:0;gap:10px}
.wg-shell .wg-badge{white-space:nowrap}
.wg-workspace{display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0;width:100%;padding:20px;background:var(--paper,#fffdf8);border-radius:26px;box-sizing:border-box;box-shadow:0 9px 25px #61462c0a}
.wg-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;align-items:center;flex:0 0 auto}
.wg-meta p{margin:0;font-size:12px;line-height:1.3}
.wg-instruction{color:var(--muted,#746d63)}
.wg-mistakes{font-weight:650;white-space:nowrap}
.wg-board{display:grid;grid-template-rows:repeat(4,minmax(48px,1fr));gap:8px;width:100%;height:320px;min-height:216px;flex:1 1 auto;min-width:0}
.wg-tile-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-height:0}
.wg-shell .wg-tile{position:relative;display:flex;align-items:center;justify-content:center;border:2px solid transparent;border-radius:12px;background:#eee7dc;color:var(--ink,#2b2420);padding:6px 7px;min-width:0;min-height:0;font-family:inherit;font-size:clamp(11px,1.7vw,16px);line-height:1.1;font-weight:700;touch-action:manipulation;transition:background-color .12s,border-color .12s}
.wg-shell .wg-tile:hover{background:#e3d8c9}
.wg-shell .wg-tile[aria-pressed=true]{background:#3f4739;color:#fffdf8;border-color:#25331e;padding-bottom:13px}
.wg-tile-word{display:block;max-width:100%;overflow-wrap:anywhere;text-align:center}
.wg-tile-check{position:absolute;right:6px;bottom:3px;font-size:10px;line-height:1}
.wg-shell .wg-tile[data-long=true]{font-size:clamp(10px,1.55vw,14px);letter-spacing:-.15px}
.wg-shell button:focus-visible{outline:3px solid #a95738;outline-offset:2px;z-index:1}
.wg-group{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px 9px;border-radius:12px;min-width:0;min-height:0;text-align:center;box-sizing:border-box}
.wg-group-1{background:#f2dea3}.wg-group-2{background:#cfe0c3}.wg-group-3{background:#cfddeb}.wg-group-4{background:#dcd1ee}
.wg-group-label{display:block;font-size:14px;line-height:1.15;font-weight:700}
.wg-group-words{display:block;font-size:12px;line-height:1.15;overflow-wrap:anywhere}
.wg-revealed{background:#eee8df;border:1px dashed #b4a38e}
.wg-status{margin:0;min-height:32px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:13px;line-height:1.25;flex:0 0 auto}
.wg-status[data-result=one-away],.wg-status[data-result=incorrect]{color:#943f2d}
.wg-status[data-result=correct],.wg-status[data-result=won]{color:#405e32;font-weight:600}
.wg-controls{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:8px;width:100%;max-width:430px;align-self:center;flex:0 0 auto}
.wg-controls button{border:1px solid #ddd3c5;border-radius:12px;background:#f2ece3;color:var(--ink,#2b2420);padding:9px;min-height:44px;font-family:inherit;font-size:13px;font-weight:600;touch-action:manipulation}
.wg-controls button.primary{background:var(--ink,#2b2420);color:#fffdf8;border-color:var(--ink,#2b2420)}
.wg-controls button:disabled{opacity:.4;cursor:default}
.wg-keyboard-hint{margin:0;font-size:10px;line-height:1.4;color:var(--muted,#746d63);text-align:center;flex:0 0 auto}
.wg-finished .wg-controls,.wg-finished .wg-keyboard-hint{display:none}
.wg-reduced-motion *{transition:none!important;animation:none!important}
@media(max-width:1400px){
 .wg-shell{height:100%;max-width:740px}
 .wg-shell .wg-heading{min-height:52px;padding:3px 2px 9px}
 .wg-workspace{flex:1;gap:7px;padding:12px;justify-content:center}
 .wg-board{height:auto;max-height:360px;gap:6px;grid-template-rows:repeat(4,minmax(48px,1fr));min-height:210px}
 .wg-tile-row{gap:6px}
 .wg-shell .wg-tile{font-size:clamp(10px,2.8vw,15px);border-radius:10px;padding-left:3px;padding-right:3px}
 .wg-shell .wg-tile[data-long=true]{font-size:clamp(9px,2.6vw,13px)}
 .wg-group{border-radius:10px;gap:3px;padding:4px 7px}
 .wg-group-label{font-size:12px}.wg-group-words{font-size:10px}
 .wg-status{font-size:12px;min-height:30px}
 .wg-keyboard-hint{display:none}
 .wg-shell .wg-subtitle{display:none}
}
@media(max-width:420px){
 .wg-workspace{padding:10px;gap:6px;border-radius:20px}
 .wg-meta{gap:3px 8px}.wg-meta p{font-size:10px}
 .wg-controls{gap:6px}.wg-controls button{padding:8px 4px;font-size:12px}
 .wg-group-label{font-size:11px}.wg-group-words{font-size:9.5px}
 .wg-status{font-size:11px;min-height:28px}
}
@media(max-height:620px) and (max-width:1400px){
 .wg-shell .wg-heading{min-height:43px;padding-bottom:6px}
 .wg-workspace{gap:5px;padding:9px 10px}
 .wg-board{min-height:192px;grid-template-rows:repeat(4,minmax(43px,1fr));gap:5px}
 .wg-tile-row{gap:5px}.wg-status{min-height:26px;font-size:11px}
 .wg-group{gap:2px;padding:3px 6px}.wg-group-label{font-size:10.5px}.wg-group-words{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.wg-shell *{transition:none!important;animation:none!important}}
/* Word Groups has its own soft sea-glass accent across its card and play area. */
.game-tab[data-game="wordgroups"],.game-tab[data-game="wordgroups"][aria-current=true]{background:#dce9e4;border-color:#c5d9d0}
.game-tab[data-game="wordgroups"] .tab-icon{background:#bdd6ca}
.wg-workspace{background:#edf4ef;border:1px solid #d6e4da}
.wg-shell .wg-badge:not(.solved){background:#d4e6dc;color:#426651}

.wg-back{align-self:center;flex:0 0 auto;min-height:36px;padding:7px 14px;font-size:12px;background:#fffdf8;color:var(--ink,#2b2420)}
