.selection-dialog{width:min(940px,calc(100% - 24px));max-height:94dvh;padding:28px;border:1px solid #bb9251;border-radius:18px;color:#f5e3bf;background:radial-gradient(ellipse at 0 0,#624026,#1c120c 75%);box-sizing:border-box}.selection-dialog::backdrop{background:#070402d9}.selection-dialog header{display:flex;justify-content:space-between;align-items:center;gap:14px}.selection-dialog h1{font:30px Georgia;color:#edc77e;margin:0}.selection-dialog h2{font:22px Georgia;color:#edc77e}.selection-dialog p{font:14px/1.6 system-ui}.selection-dialog button{min-height:44px;min-width:44px;border:1px solid #ae874b;border-radius:9px;padding:9px 16px;background:linear-gradient(#513820,#2d1d11);color:#ffe8ba;font:14px system-ui;cursor:pointer}.selection-dialog button.primary{background:linear-gradient(#efcc7f,#b8863e);color:#251709;font-weight:bold}.selection-dialog button:disabled{opacity:.45;cursor:default}.selection-dialog button:focus-visible{outline:3px solid #ffe3a0;outline-offset:3px}.selection-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.selection-card{padding:20px;background:#160e0999;border:1px solid #b78a4255;border-radius:12px;margin:16px 0}.selection-card h2{margin:0 0 12px}.selection-wallet{display:flex;flex-wrap:wrap;gap:12px}.selection-wallet span{padding:10px 15px;background:#22170e;border:1px solid #aa854d;border-radius:8px;font:600 16px system-ui}.selection-kicker{letter-spacing:1px;color:#d2ab68}.selection-note{font-size:12px!important;color:#c7b18d}.selection-status{color:#ffdc98;min-height:20px;margin:8px 0}.selection-structure{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;border-top:1px solid #b78a4233;padding:12px 0}.selection-structure small{width:100%;color:#c4ad86}.selection-confirm{padding:16px;border:1px solid #b78a42;margin-top:16px;border-radius:10px}.selection-confirm button{margin-right:10px}.memory-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;max-width:440px;margin:24px auto}.memory-grid button{aspect-ratio:1;min-height:100px;font:60px Georgia;background:radial-gradient(#68502d,#24180f);box-shadow:inset 0 0 20px #0008;transition:filter .12s,box-shadow .12s}.memory-grid button:nth-child(2){color:#c1dbe9}.memory-grid button:nth-child(3){color:#ffc65a}.memory-grid button:nth-child(4){color:#6ee2dd}.memory-grid button.lit{filter:brightness(1.8);box-shadow:0 0 25px #ffd78a99,inset 0 0 20px #ffe6af55;outline:3px solid #ffe7ac}.selection-result{font-size:22px!important;color:#ffe2a3}@media(max-width:650px){.selection-dialog{padding:18px;width:calc(100% - 16px)}.selection-dialog h1{font-size:25px}.selection-grid{grid-template-columns:1fr;gap:0}.selection-card{padding:16px}.selection-wallet{gap:7px}.selection-wallet span{font-size:13px;padding:9px 11px}}@media(prefers-reduced-motion:reduce){.memory-grid button{transition:none}}
/* The puzzle leads; the construction preview is an optional lower section. */
.sheba-stage{display:flex;flex-direction:column;max-width:940px;gap:24px;align-items:stretch}.sheba-stage #sheba-game{order:0}.sheba-stage .sheba-viewer{order:1;width:100%;border-radius:12px}.sheba-stage .sheba-viewer:before{display:none}.sheba-stage .sheba-viewer canvas{height:240px}.sheba-board{gap:18px}.sheba-row{height:46px;min-height:46px}.sheba-cell{height:40px;min-height:40px}.sheba-crate .sheba-stone,.sheba-empty{height:27px}.sheba-stage .sheba-viewer{margin-top:8px}.sheba-flying svg{filter:drop-shadow(0 5px 6px #0009)}
@media(max-width:650px){.sheba-dialog{padding:12px 14px}.sheba-stage{gap:18px}.sheba-row{height:44px;min-height:44px}.sheba-cell{height:38px;min-height:38px}.sheba-crates{gap:6px}.sheba-crate .sheba-stone,.sheba-empty{height:29px}.sheba-stage .sheba-viewer,.sheba-stage .sheba-viewer canvas{height:180px}.sheba-save{display:block}}
@media(min-width:651px){.sheba-crates{grid-template-columns:repeat(var(--crate-count,7),minmax(0,1fr))}}
.sheba-place{display:block;width:100%;min-height:46px;margin:0 0 12px;border:1px solid #f3d18a;border-bottom:3px solid #976223;border-radius:9px;background:linear-gradient(#f0d18c,#b98840);color:#26170b;font:700 14px system-ui}

.memory-royal-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border:3px double #b59355;border-radius:12px;background:linear-gradient(110deg,#49301c,#21160e)}.memory-royal-header h1{font:700 clamp(24px,5vw,36px) Georgia;margin:0}.memory-royal-tools{display:flex;gap:7px}.memory-royal-tools button{min-width:42px;min-height:42px;padding:7px 11px;border:2px double #c2a36c;border-radius:9px;background:linear-gradient(#563b24,#281a10);color:#f6dfaa}.memory-rules{max-width:430px}
