.gamehead,.actions,#inventory{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}.gamehead{justify-content:space-between;margin-bottom:.8rem}.gamehead span{color:var(--text-2)}
.workspace{grid-template-columns:minmax(0,1.25fr) minmax(250px,.75fr);align-items:start}
.controls label{display:grid;gap:.3rem;margin-bottom:.8rem}.controls h2{margin-top:.9rem}.actions{margin:1rem 0 0}.preview{min-width:0}
#board{display:grid;grid-template-columns:repeat(var(--w),minmax(0,1fr));gap:0;background:#31534a;padding:clamp(5px,1.8vw,15px);border-radius:12px;max-width:520px;margin:auto}
#board.done{box-shadow:0 0 0 3px var(--accent)}
#board button{position:relative;display:grid;place-items:center;border:0;margin:3px;padding:0;border-radius:5px;background:#d9dccb;color:#263e36;aspect-ratio:1;min-width:0;min-height:0;line-height:1;font:bold clamp(1.2rem,4.2vw,2.15rem) Georgia,serif;box-shadow:none}
#board button:hover:not(:disabled){background:#e6e8d9}
#board button.paired{background:#e3bb73;color:#493925}#board button.paired:hover{background:#e9c584}
#board button.east{margin-right:0;border-radius:7px 0 0 7px}#board button.west{margin-left:0;border-radius:0 7px 7px 0}#board button.south{margin-bottom:0;border-radius:7px 7px 0 0}#board button.north{margin-top:0;border-radius:0 0 7px 7px}
#board button.east:after,#board button.south:after{content:"";position:absolute;z-index:1;background:#ba914c}#board button.east:after{right:-1px;width:2px;height:55%}#board button.south:after{bottom:-1px;height:2px;width:55%}
#board button.selected,#board button:focus-visible{outline:3px solid #277896;outline-offset:-4px}
#board button.selected{background:#bfe0ea}
.invhead{font-size:.9rem;color:var(--text-2);font-weight:600;margin:.4rem 0 .5rem}
#inventory span{padding:.3rem .55rem;border-radius:6px;border:1px solid #8886;font:600 .95rem Outfit,sans-serif;font-variant-numeric:tabular-nums}
#inventory span.used{opacity:.45;text-decoration:line-through}
#status{min-height:2.8em;margin:.7rem 0 .2rem;color:var(--text)}
.controls p{font-size:.9rem}
@media(max-width:680px){.workspace{grid-template-columns:1fr}}
[data-theme="light"] select{background:#fff;color:var(--text)}
[data-theme="light"] button.primary { color:#fff; }
