/* Stronger SwipingCards coupling: each resting card carries its own artwork and glass information panel. */
#painting-stack .stack-card{bottom:46px!important;transform:var(--deck-transform)!important;opacity:var(--deck-opacity,1)!important;transition:transform .42s cubic-bezier(.16,1.02,.25,1),opacity .3s ease!important}
#painting-stack .deck-depth-1{--deck-transform:translate3d(0,20px,0) scale(.94) rotateZ(-.85deg);--deck-opacity:.79;z-index:17!important}
#painting-stack .deck-depth-2{--deck-transform:translate3d(0,40px,0) scale(.88) rotateZ(1.7deg);--deck-opacity:.64;z-index:16!important}
#painting-stack .deck-depth-3{--deck-transform:translate3d(0,60px,0) scale(.82) rotateZ(-2.55deg);--deck-opacity:.49;z-index:15!important}
#painting-stack .stack-card img{filter:brightness(.66) saturate(.8)!important}
#painting-stack .deck-info{position:absolute!important;z-index:3!important;left:10px!important;right:10px!important;bottom:9px!important;min-height:67px!important;padding:9px 12px!important;box-sizing:border-box!important;border:1px solid #f1e4c06b!important;border-radius:13px!important;background:linear-gradient(125deg,#183329e9,#5b7566d6)!important;backdrop-filter:blur(11px)!important;color:#fbf7ec!important;box-shadow:0 5px 15px #06130d70!important}
#painting-stack .deck-info em{display:block!important;color:#f0dcaa!important;font-size:8px!important;font-style:italic!important;letter-spacing:.4px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#painting-stack .deck-info b{display:block!important;margin-top:2px!important;font-family:"Songti SC","SimSun",serif!important;font-size:16px!important;font-weight:500!important;line-height:1.05!important}
#painting-stack .deck-info small{display:block!important;margin-top:4px!important;color:#dae1d8!important;font-size:9px!important}.deck-info strong{position:absolute!important;right:11px!important;bottom:9px!important;color:#efd398!important;font-size:8px!important;font-weight:500!important}
#painting-stack.is-deck-dragging .stack-card{transition:none!important}
/* Keep the active card above the three resting cards despite older compatibility rules. */
#painting-stack #painting-card{z-index:100!important}
#painting-stack .deck-depth-1{z-index:90!important}#painting-stack .deck-depth-2{z-index:80!important}#painting-stack .deck-depth-3{z-index:70!important}
/* Reserve a stable reveal band so the bound information panels of resting cards are readable before dragging. */
#painting-stack #painting-card{bottom:160px!important}
#painting-stack .stack-card{bottom:48px!important}
@media (max-height:670px){#painting-stack #painting-card{bottom:132px!important}}
/* Resting cards use their own compact card ratio instead of the hero's full-height canvas. */
#painting-stack .stack-card{left:10%!important;width:80%!important;top:auto!important;bottom:18px!important;height:184px!important;aspect-ratio:auto!important;transform-origin:50% 100%!important}
#painting-stack .deck-depth-1{--deck-transform:translate3d(0,12px,0) scale(.95) rotateZ(-.65deg);--deck-opacity:.84}
#painting-stack .deck-depth-2{--deck-transform:translate3d(0,29px,0) scale(.89) rotateZ(1.3deg);--deck-opacity:.66}
#painting-stack .deck-depth-3{--deck-transform:translate3d(0,46px,0) scale(.83) rotateZ(-1.95deg);--deck-opacity:.48}
#painting-stack .stack-card img{height:100%!important;object-position:center!important}
#painting-stack .deck-info{min-height:60px!important;padding:8px 11px!important}
#painting-stack .deck-info b{font-size:14px!important}
/* Resting cards are scaled copies of the hero card: same portrait ratio, only their outer edges are visible. */
#painting-stack .stack-card{left:13%!important;width:74%!important;top:96px!important;bottom:auto!important;height:auto!important;aspect-ratio:68 / 100!important;border-radius:20px!important;transform-origin:50% 100%!important}
#painting-stack .stack-card .deck-info{display:none!important}
#painting-stack .deck-depth-1{--deck-transform:translate3d(0,10px,0) scale(.96) rotateZ(-.55deg);--deck-opacity:.70}
#painting-stack .deck-depth-2{--deck-transform:translate3d(0,23px,0) scale(.90) rotateZ(1.1deg);--deck-opacity:.48}
#painting-stack .deck-depth-3{--deck-transform:translate3d(0,36px,0) scale(.84) rotateZ(-1.65deg);--deck-opacity:.30}
/* Local deck debugger — enable with ?debug=1. */
#painting-stack #painting-card{left:calc((100% - var(--hero-width,86%))/2)!important;width:var(--hero-width,86%)!important;bottom:var(--hero-bottom,160px)!important;border-radius:var(--card-radius,22px)!important}
#painting-stack .stack-card{left:calc((100% - var(--back-width,74%))/2)!important;width:var(--back-width,74%)!important;top:var(--back-top,96px)!important;border-radius:calc(var(--card-radius,22px) - 2px)!important}
#deck-debugger{position:absolute;z-index:500!important;right:9px;top:max(8px,env(safe-area-inset-top));width:min(292px,calc(100% - 18px));max-height:calc(100% - 18px);overflow:auto;border:1px solid #f1dfaf80;border-radius:16px;background:#10271bf2;color:#f7f3e8;box-shadow:0 18px 42px #000a;backdrop-filter:blur(20px);font-family:system-ui,-apple-system,"Microsoft Yahei",sans-serif}
.debug-toggle{display:flex!important;align-items:center;justify-content:space-between;width:100%;padding:12px 14px;border:0;background:#294b3b;color:#f7e8bc;font-size:13px;font-weight:700}.debug-toggle span{font-size:11px;color:#bcd0c2}.debug-body{padding:10px 13px 14px}.debug-body>p{margin:0 0 10px;color:#cbd8cd;font-size:10px;line-height:1.4}.debug-body label{display:grid;grid-template-columns:1fr 16px;gap:3px 7px;align-items:center;margin:8px 0}.debug-body label span{font-size:11px;color:#edf0e8}.debug-body output{float:right;color:#f2ce87;font-variant-numeric:tabular-nums}.debug-body input{grid-column:1;width:100%;accent-color:#efcf82}.debug-body small{grid-column:2;grid-row:2;color:#aebeb0;font-size:9px}.debug-actions{display:flex;gap:8px;margin-top:12px}.debug-actions button{flex:1;padding:8px;border:1px solid #eacb8a69;border-radius:9px;background:#234334;color:#f9f3e5;font-size:11px}.debug-actions button:last-child{background:#dfba6a;color:#183127}.collapsed .debug-body{display:none}.collapsed{width:auto}.collapsed .debug-toggle{border-radius:15px;padding:9px 12px}@media(max-height:700px){#deck-debugger{transform:scale(.83);transform-origin:top right;right:2px;top:2px}}
/* The debugger is outside the phone canvas: a desktop side dock, or a collapsed mobile trigger. */
#deck-debugger{position:fixed!important;z-index:1000!important;left:calc(50% + 216px)!important;right:auto!important;top:50%!important;width:292px!important;max-height:calc(100svh - 30px)!important;transform:translateY(-50%)!important}
@media(max-width:760px){#deck-debugger{left:auto!important;right:10px!important;top:auto!important;bottom:12px!important;transform:none!important;max-height:calc(100svh - 24px)!important}#deck-debugger.collapsed{width:auto!important}.collapsed .debug-toggle{padding:10px 12px!important;border-radius:15px!important}.collapsed .debug-toggle span{display:none!important}}
@media(min-width:761px) and (max-width:1030px){#deck-debugger{left:auto!important;right:14px!important;top:14px!important;transform:none!important}}
