/* Accordion — a sunlit cafe table. All dimensions inside the scene share one responsive unit. */
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at top,#fff0d0,#d9b58f);color:#4c2c1c;font-family:system-ui,sans-serif}
main{max-width:none;margin:0;padding:0;min-height:100vh}
a{color:#85402c}p{line-height:1.5}button{font:inherit;cursor:pointer}button:disabled{cursor:default}
.cafe-scene{--u:min(100vw / 390,100svh / 844);position:relative;width:calc(390 * var(--u));height:calc(844 * var(--u));margin:0 auto;background:#c77750 url('../assets/play/accordion/cafe-backdrop.webp') center/100% 100% no-repeat;isolation:isolate;overflow:hidden;box-shadow:0 16px 60px #68402c44}
h1{position:absolute;top:calc(3 * var(--u));left:calc(27 * var(--u));width:calc(336 * var(--u));height:calc(164 * var(--u));margin:0;line-height:1}
h1 img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 calc(4 * var(--u)) calc(3 * var(--u)) #663a2b55)}
.hud{position:absolute;top:calc(171 * var(--u));left:calc(17 * var(--u));right:calc(17 * var(--u));height:calc(32 * var(--u));display:grid;grid-template-columns:repeat(4,1fr);gap:calc(6 * var(--u));margin:0}
.hud div{display:flex;align-items:center;justify-content:center;gap:calc(5 * var(--u));background:#ffe6bc;border:1px solid #fff1d5;border-radius:calc(17 * var(--u));box-shadow:0 calc(3 * var(--u)) calc(3 * var(--u)) #6c3a2d55,inset 0 -2px 2px #c18c5488;color:#54311e;text-transform:uppercase;font:700 calc(11.5 * var(--u))/1 Georgia,serif}
.hud b{font-size:calc(18 * var(--u));font-variant-numeric:tabular-nums}
#ac-status{position:absolute;top:calc(210 * var(--u));left:calc(23 * var(--u));width:calc(344 * var(--u));height:calc(66 * var(--u));display:flex;align-items:center;justify-content:center;margin:0;padding:calc(8 * var(--u)) calc(15 * var(--u));background:url('../assets/play/accordion/status-plaque.webp') center/100% 100% no-repeat;color:#fff9e7;text-shadow:0 1px 1px #315a70;font:600 calc(12.5 * var(--u))/1.26 system-ui,sans-serif;text-align:center;filter:drop-shadow(0 3px 2px #68332155)}
.stage{position:absolute;top:calc(285 * var(--u));left:calc(14 * var(--u));width:calc(362 * var(--u));height:calc(480 * var(--u));touch-action:none;border-radius:calc(12 * var(--u));background:url('../assets/play/accordion/linen-mat.webp') center/100% 100% no-repeat;box-shadow:0 3px 5px #68401b88}
.grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:calc(51 * var(--u));gap:calc(7 * var(--u));padding:calc(10 * var(--u)) calc(7 * var(--u));align-content:start;min-height:100%;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.pile{position:relative;min-width:0;min-height:0;width:100%;height:100%;padding:0;border:0;border-radius:calc(6 * var(--u));background:transparent url('../assets/play/accordion/card-face.webp') center/100% 100% no-repeat;color:#201a14;font:inherit;filter:drop-shadow(0 calc(2 * var(--u)) calc(1 * var(--u)) #69482199);touch-action:none}
.pile.red{color:#a3201b}
.pile .r{position:absolute;left:calc(5 * var(--u));top:calc(3 * var(--u));font:700 calc(20 * var(--u))/1 Georgia,serif;letter-spacing:calc(-1 * var(--u))}
.pile .s{position:absolute;left:50%;top:calc(25 * var(--u));transform:translateX(-50%);width:calc(23 * var(--u));height:calc(22 * var(--u))}
.pile .s img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.pile .n{position:absolute;right:calc(-4 * var(--u));top:calc(-4 * var(--u));min-width:calc(17 * var(--u));height:calc(17 * var(--u));padding:0 calc(3 * var(--u));border-radius:50%;background:#754632;color:#fff5df;border:1px solid #fff0c8;font:700 calc(10 * var(--u))/calc(15 * var(--u)) system-ui,sans-serif;text-align:center;z-index:3}
.pile .ix{position:absolute;right:calc(4 * var(--u));bottom:calc(4 * var(--u));font:600 calc(8 * var(--u))/1 system-ui,sans-serif;color:#765b3b}
.pile.stack{box-shadow:calc(1 * var(--u)) calc(2 * var(--u)) 0 #fff2d0,calc(2 * var(--u)) calc(4 * var(--u)) 0 #b78d60}
.pile.cur{outline:calc(2 * var(--u)) solid #45a4d0;outline-offset:calc(1 * var(--u))}
.pile.sel{transform:translateY(calc(-4 * var(--u)));outline:calc(3 * var(--u)) solid #b65f36;outline-offset:calc(1 * var(--u));z-index:2}
.pile.tgt{box-shadow:0 0 0 calc(3 * var(--u)) #579c40,0 0 calc(11 * var(--u)) #ecffb5}
.pile.hintf{outline:calc(3 * var(--u)) dashed #91462d;outline-offset:calc(1 * var(--u))}.pile.hintt{box-shadow:0 0 0 calc(3 * var(--u)) #4a94ba,0 0 calc(12 * var(--u)) #d9f5ff}
.pile.can::after{content:'';position:absolute;left:calc(4 * var(--u));bottom:calc(4 * var(--u));width:calc(5 * var(--u));height:calc(5 * var(--u));border-radius:50%;background:#238721;box-shadow:0 0 0 1px #ffffd2}
.ctrls{position:absolute;left:calc(12 * var(--u));right:calc(12 * var(--u));top:calc(779 * var(--u));height:calc(55 * var(--u));display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:calc(7 * var(--u))}
.ctrls button,#ac-over button{min-height:0;border:0;padding:0 calc(7 * var(--u)) calc(5 * var(--u));border-radius:calc(25 * var(--u));background:transparent url('../assets/play/accordion/button-ivory.webp') center/100% 100% no-repeat;filter:drop-shadow(0 3px 2px #6a321f88);color:#5b301a;font:700 calc(21 * var(--u))/1 Georgia,serif;text-transform:uppercase;white-space:nowrap}
.ctrls #ac-hint{background-image:url('../assets/play/accordion/button-blue.webp');color:#fff8e3;text-shadow:0 2px 1px #315469}
.ctrls #ac-new,#ac-over #ac-over-btn{background-image:url('../assets/play/accordion/button-clay.webp');color:#fff8e3;text-shadow:0 2px 1px #843421;font-size:calc(19 * var(--u))}
.ctrls button:disabled{opacity:.78;filter:saturate(.5) drop-shadow(0 2px 1px #65382488)}
.toolbar{position:absolute;top:calc(9 * var(--u));right:calc(8 * var(--u));margin:0}
#ac-tools button{min-height:calc(28 * var(--u))!important;padding:calc(4 * var(--u)) calc(8 * var(--u))!important;border:1px solid #fff3ce!important;border-radius:calc(18 * var(--u))!important;background:#ffedca!important;color:#613a23!important;box-shadow:0 2px 3px #733c2677;font:700 calc(10 * var(--u))/1.2 Georgia,serif!important}
button:focus-visible,.pile:focus-visible{outline:3px solid #275f90;outline-offset:3px}
#ac-over{position:absolute;inset:calc(100 * var(--u)) calc(9 * var(--u)) auto;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(24 * var(--u));padding:calc(28 * var(--u)) calc(18 * var(--u));border:calc(4 * var(--u)) solid #fff0ca;border-radius:calc(24 * var(--u));background:#f6dfb8;box-shadow:0 10px 35px #75412f88;text-align:center;color:#6c3826}
#ac-over[hidden]{display:none}#ac-over p{margin:0;font:700 calc(20 * var(--u))/1.4 Georgia,serif}#ac-over .row{display:flex;gap:calc(12 * var(--u));justify-content:center;width:100%}#ac-over button{height:calc(48 * var(--u));min-width:calc(110 * var(--u));font-size:calc(16 * var(--u))}
.stage[data-state=won] #ac-over{background:#cce9ee;border-color:#fff4d7;color:#234c5c}
.game-notes{max-width:780px;margin:20px auto;padding:24px;background:#fff4df;border:1px solid #c99d77;border-radius:20px;font-size:15px;line-height:1.6}
.game-notes header{font-size:13px;padding-bottom:12px;border-bottom:1px solid #dbb897}.game-notes .intro{font-size:16px}.game-notes .legend{padding:14px;background:#e6edf0;border-radius:12px;color:#334c58}.game-notes h2{font:700 25px Georgia,serif;margin:24px 0 12px}.howto{padding-left:22px}.howto li{margin:9px 0}
@media(max-width:560px){.pile .ix{display:none}.game-notes{margin:12px 10px;padding:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
