.foundation-puzzle-card .puzzle-workbench{min-height:360px;background:linear-gradient(145deg,#f0fbf8,#fffaf0)}
.foundation-items,.foundation-choice-row,.foundation-number-row{display:flex;flex-wrap:wrap;justify-content:center;gap:14px}
.foundation-piece,.foundation-choice-row button,.foundation-number-row button,.foundation-direction-pad button{display:grid;place-items:center;min-width:82px;min-height:72px;padding:12px;border:2px solid #c9ddd7;border-radius:18px;background:#fff;font:inherit;font-size:2rem;cursor:pointer;box-shadow:0 6px 14px rgba(21,54,83,.08)}
.foundation-piece.selected{border-color:#0e9271;background:#e5faf2;transform:translateY(-3px)}
.foundation-sort-stage,.foundation-pack-stage,.foundation-pattern-stage,.foundation-spatial-stage,.foundation-balance-stage,.foundation-order-stage,.foundation-nim-stage{display:grid;gap:24px;align-content:center;min-height:320px;padding:24px}
.foundation-bins{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.foundation-bins button{display:grid;place-items:center;gap:5px;min-height:150px;border:3px dashed #8fcfbc;border-radius:24px;background:#fff;color:#173653;font:inherit;cursor:pointer}.foundation-bins span{font-size:3rem}.foundation-bins b{font-size:1rem}.foundation-bins small{color:#648074}
.foundation-pattern-line{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.foundation-pattern-line span{display:grid;place-items:center;width:72px;height:72px;border-radius:18px;background:#fff;font-size:2.25rem;box-shadow:0 5px 14px rgba(21,54,83,.08)}.foundation-pattern-line .blank{border:3px dashed #978ce0;background:#f2f0ff;color:#675bb9}
.foundation-clue-row{display:flex;justify-content:center;gap:9px}.foundation-clue-row span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#e8eef2;color:#617687;font-size:1.5rem;font-weight:900}.foundation-clue-row span.active{background:#ffe4a6;color:#925d00;box-shadow:0 0 0 4px rgba(245,176,46,.2)}.foundation-clue-row span.done{background:#dff7ee;color:#08795e}
.foundation-mini-grid{display:grid;grid-template-columns:repeat(var(--foundation-size),64px);justify-content:center;gap:5px}.foundation-mini-grid span{display:grid;place-items:center;width:64px;height:64px;border:2px solid #d4e2dd;border-radius:12px;background:#fff;font-size:1.8rem}.foundation-mini-grid span.here{border-color:#159577;background:#e4faf2}.foundation-mini-grid span.goal{background:#fff4ca}.foundation-direction-pad{display:grid;grid-template-columns:repeat(4,64px);justify-content:center;gap:9px}.foundation-direction-pad button{min-width:64px;min-height:58px;font-size:1.5rem}
.foundation-pack-slots{display:flex;flex-wrap:wrap;justify-content:center;gap:16px}.foundation-pack-slots button{display:grid;place-items:center;width:105px;height:105px;border:3px dashed #93b8ad;border-radius:24px;background:#fff;color:#8ba39b;font:inherit;font-size:2.5rem;cursor:pointer}.foundation-pack-slots button.filled{border-style:solid;border-color:#18a47e;background:#e4faf2}
.foundation-scale{display:grid;grid-template-columns:1fr 80px 1fr;align-items:end;gap:12px;text-align:center}.foundation-scale>div{display:grid;align-content:center;min-height:145px;padding:20px;border:2px solid #efd27f;border-radius:22px;background:#fff9e7;font-size:1.8rem}.foundation-scale i{font-size:3.2rem;font-style:normal}.foundation-scale small{display:block;margin-top:10px;color:#6a7b88;font-size:.75rem}.foundation-number-row button{font-size:1.4rem;font-weight:900}
.foundation-order-result{display:flex;justify-content:center;gap:12px;min-height:100px;padding:16px;border:2px dashed #b9d8ce;border-radius:22px;background:#fff}.foundation-order-result span{display:grid;place-items:center;position:relative;width:78px;border-radius:16px;background:#eefaf6;font-size:2rem}.foundation-order-result span b{position:absolute;left:6px;top:5px;font-size:.65rem;color:#08795e}.foundation-order-result small{align-self:center;color:#718594}
.foundation-nim-stage{text-align:center}.foundation-shells{min-height:95px;font-size:3rem;letter-spacing:8px}.foundation-nim-stage p{margin:0;color:#496579;font-weight:800}
@media(max-width:600px){.foundation-puzzle-card .puzzle-workbench{min-height:300px}.foundation-sort-stage,.foundation-pack-stage,.foundation-pattern-stage,.foundation-spatial-stage,.foundation-balance-stage,.foundation-order-stage,.foundation-nim-stage{padding:16px}.foundation-piece,.foundation-choice-row button{min-width:66px;min-height:62px;font-size:1.65rem}.foundation-bins button{min-height:125px}.foundation-pattern-line span{width:52px;height:52px;font-size:1.65rem}.foundation-mini-grid{grid-template-columns:repeat(var(--foundation-size),52px)}.foundation-mini-grid span{width:52px;height:52px}.foundation-scale{grid-template-columns:1fr 50px 1fr}.foundation-scale>div{padding:10px;font-size:1.3rem}}
