/* La Belle Lucie — a daylight plum-and-lilac salon. */
*{box-sizing:border-box}
:root{color-scheme:light;--u:min(calc(100vw / 390),calc(100svh / 844));--ink:#3f1839;--cream:#fff6e9;--plum:#69214f}
body{margin:0;background:#321b31;color:#f8eaf4;font:15px/1.5 system-ui,sans-serif;display:flex;flex-direction:column}
main{order:0;width:100%;margin:auto}
header{order:1;padding:18px;text-align:center;font-size:13px;background:#281624}
a{color:#f1c8e8;text-underline-offset:3px}
.ll-scene{position:relative;width:calc(390 * var(--u));height:calc(844 * var(--u));margin:auto;isolation:isolate;background:url('../assets/play/labellelucie/salon.webp') center/100% 100% no-repeat;box-shadow:0 0 65px #130b1899}
h1{position:absolute;top:calc(3 * var(--u));left:calc(30 * var(--u));width:calc(330 * var(--u));height:calc(118 * var(--u));margin:0;display:flex;align-items:center;justify-content:center}
h1 img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 calc(3 * var(--u)) calc(3 * var(--u)) #54214955)}
.hud{position:absolute;top:calc(124 * var(--u));left:calc(18 * var(--u));width:calc(354 * var(--u));height:calc(31 * var(--u));display:flex;gap:calc(4 * var(--u))}
.chip{flex:1;white-space:nowrap;text-align:center;align-content:center;background:url('../assets/play/labellelucie/button-plum.webp') center/100% 100% no-repeat;color:var(--cream);font:700 calc(12 * var(--u))/1 Georgia,serif;text-shadow:0 1px 2px #421135}
.chip b{font-variant-numeric:tabular-nums}
#ll-status{position:absolute;z-index:3;left:calc(32 * var(--u));top:calc(699 * var(--u));width:calc(326 * var(--u));height:calc(43 * var(--u));display:flex;align-items:center;justify-content:center;text-align:center;padding:calc(5 * var(--u)) calc(19 * var(--u));background:url('../assets/play/labellelucie/button-plum.webp') center/100% 100% no-repeat;color:var(--cream);font:600 calc(11 * var(--u))/1.2 Georgia,serif;text-shadow:0 1px 1px #37122c;pointer-events:none}
.stage{position:absolute;left:0;top:calc(158 * var(--u));width:100%;height:calc(633 * var(--u));touch-action:none}
.stage *{touch-action:none}
.foundations{position:absolute;top:calc(2 * var(--u));left:calc(65 * var(--u));width:calc(260 * var(--u));height:calc(75 * var(--u));display:grid;grid-template-columns:repeat(4,1fr);gap:calc(12 * var(--u))}
button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.foundation{padding:calc(5 * var(--u)) 0 calc(4 * var(--u));border:calc(2 * var(--u)) solid #b67ea9;border-radius:calc(7 * var(--u));background:linear-gradient(#fff4ecd9,#e9d5e0ed);box-shadow:0 calc(2 * var(--u)) calc(4 * var(--u)) #49193c66,inset 0 0 0 calc(2 * var(--u)) #ffeff9;color:#352231;font:700 calc(23 * var(--u))/1 Georgia,serif}
.foundation-rank,.foundation-suit{display:block}
.foundation-suit{font-size:calc(25 * var(--u));line-height:1.05}
.foundation small{display:block;margin-top:calc(3 * var(--u));font:calc(8 * var(--u))/1 system-ui,sans-serif;color:#704461}
.foundation.filled{background:url('../assets/play/labellelucie/card-face.webp') center/100% 100% no-repeat;color:#251c25;border-color:#f8e7d7;box-shadow:0 calc(3 * var(--u)) calc(5 * var(--u)) #3a143a80}
.foundation.red{color:#9c1748}
.fans{position:absolute;top:calc(105 * var(--u));left:calc(29 * var(--u));width:calc(332 * var(--u));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:calc(64 * var(--u));column-gap:calc(10 * var(--u));row-gap:calc(8 * var(--u))}
.fan{position:relative;min-width:0;padding:0;border:0;background:transparent;color:var(--cream);font:inherit;border-radius:calc(6 * var(--u))}
.fan-number{position:absolute;right:calc(2 * var(--u));bottom:calc(-6 * var(--u));font:calc(8 * var(--u))/1 system-ui;color:#edbedc;opacity:.75}
.cards{display:block;position:relative;margin:auto;width:calc(var(--pile-width) * var(--u));height:100%;pointer-events:none}
.card{display:block;position:absolute;top:0;left:calc(var(--card-x) * var(--u));width:calc(45 * var(--u));height:calc(62 * var(--u));border-radius:calc(5 * var(--u));background:url('../assets/play/labellelucie/card-face.webp') center/100% 100% no-repeat;color:#251c25;filter:drop-shadow(calc(-1 * var(--u)) calc(2 * var(--u)) calc(2 * var(--u)) #30102488);transform:rotate(-3deg);transform-origin:50% 100%;font:700 calc(15 * var(--u))/1 Georgia,serif}
.card.top{width:calc(57 * var(--u));height:calc(64 * var(--u));transform:rotate(2deg)}
.card.red{color:#ab1241}
.card-index{position:absolute;left:calc(3 * var(--u));top:calc(4 * var(--u));display:flex;flex-direction:column;align-items:center;line-height:.95;font-size:calc(17 * var(--u));letter-spacing:calc(-1 * var(--u))}
.card-index .suit{font-size:calc(13 * var(--u));line-height:1.05}
.card.top .card-index{font-size:calc(20 * var(--u))}
.card.top .card-index .suit{font-size:calc(16 * var(--u))}
.pips{position:absolute;left:calc(24 * var(--u));right:calc(6 * var(--u));top:calc(8 * var(--u));bottom:calc(8 * var(--u))}
.pip{position:absolute;transform:translate(-50%,-50%);font:calc(15 * var(--u))/1 Georgia,serif}
.pips.ace .pip{font-size:calc(25 * var(--u))}
.court{position:absolute;left:calc(23 * var(--u));top:calc(4 * var(--u));width:calc(31 * var(--u));height:calc(56 * var(--u));object-fit:fill}
.empty{display:flex;align-items:center;justify-content:center;height:100%;border:1px dashed #d3a0c25c;border-radius:calc(7 * var(--u));font-size:calc(11 * var(--u));color:#e9bed9;background:#6b234a24}
.fan.can:after{content:'';position:absolute;left:0;bottom:calc(-3 * var(--u));width:calc(5 * var(--u));height:calc(5 * var(--u));border-radius:50%;background:#b9efab;box-shadow:0 0 calc(4 * var(--u)) #acfa96;pointer-events:none}
.fan.sel{outline:calc(2 * var(--u)) solid #ffedb0;outline-offset:calc(3 * var(--u));background:#eebfd92b}
.tgt{outline:calc(2 * var(--u)) solid #8fe1ff;outline-offset:calc(3 * var(--u));box-shadow:0 0 calc(9 * var(--u)) #8fe1ff99}
.controls{display:flex;gap:calc(5 * var(--u))}
.stage>.controls{position:absolute;left:calc(14 * var(--u));right:calc(14 * var(--u));bottom:0;height:calc(51 * var(--u))}
.controls button{flex:1;min-width:0}
.stage>.controls button{display:flex;align-items:center;justify-content:center;gap:calc(5 * var(--u));font-size:calc(18 * var(--u))}
.stage>.controls button::before{content:'';width:calc(18 * var(--u));height:calc(22 * var(--u));flex-shrink:0;background:#fff3e8;mask:var(--icon) center/contain no-repeat}
#ll-hint{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'%3E%3Cpath d='M7 21c0-6-5-7-5-12a10 8 0 0 1 20 0c0 5-5 6-5 12zM7 25h10M9 29h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
#ll-undo{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3L2 9l7 6V3zM7 9h8a7 7 0 0 1 0 14h-4' fill='none' stroke='black' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E")}
#ll-redeal{font-size:calc(16 * var(--u));--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Crect x='2' y='2' width='13' height='21' rx='2' fill='none' stroke='black' stroke-width='2' transform='rotate(-10 8 12)'/%3E%3Crect x='9' y='5' width='13' height='21' rx='2' fill='black' transform='rotate(10 15 15)'/%3E%3C/svg%3E")}
.controls button,.toolbar button{border:0;padding:0 calc(8 * var(--u));color:var(--cream);background:url('../assets/play/labellelucie/button-plum.webp') center/100% 100% no-repeat;filter:drop-shadow(0 calc(3 * var(--u)) calc(2 * var(--u)) #4e1b4b70);font:700 calc(19 * var(--u))/1 Georgia,serif;text-shadow:0 calc(1 * var(--u)) calc(2 * var(--u)) #421134;white-space:nowrap;border-radius:calc(24 * var(--u))}
#ll-undo,#ll-over-undo{background-image:url('../assets/play/labellelucie/button-mauve.webp')}
button:disabled{cursor:default;filter:saturate(.6);color:#ead9e4}
button:focus-visible{outline:calc(3 * var(--u)) solid #8de8ff;outline-offset:calc(3 * var(--u));z-index:4}
.toolbar{position:absolute;left:calc(72 * var(--u));right:calc(72 * var(--u));bottom:calc(9 * var(--u));height:calc(37 * var(--u));display:flex;gap:calc(14 * var(--u))}
.toolbar button{flex:1;font-size:calc(13 * var(--u))}
#ll-over[hidden]{display:none}
#ll-over{position:absolute;z-index:5;left:calc(15 * var(--u));right:calc(15 * var(--u));top:calc(82 * var(--u));bottom:calc(92 * var(--u));display:flex;flex-direction:column;align-items:center;justify-content:center;border:calc(4 * var(--u)) double #dfb9d9;border-radius:calc(30 * var(--u));padding:calc(26 * var(--u));background:linear-gradient(#4e173dea,#742459f5);color:#fff0e9;text-align:center;box-shadow:0 calc(6 * var(--u)) calc(16 * var(--u)) #2c102a99}
#ll-over h2{font:700 calc(30 * var(--u))/1.1 Georgia,serif;margin:0 0 calc(16 * var(--u))}
#ll-over p{font-size:calc(15 * var(--u));line-height:1.5}
#ll-over .controls{width:100%;height:calc(49 * var(--u));margin-top:calc(15 * var(--u))}
#ll-over .controls button{font-size:calc(17 * var(--u))}
#ll-over.win{background:linear-gradient(#fff3e8f5,#dfbeddf5);color:#61264f;border-color:#fff3e8}
.ll-help{max-width:720px;padding:26px 22px 32px;margin:auto;color:#eadbe5}
.ll-help h2{font:700 27px Georgia,serif;color:#f8dcf1;margin:24px 0 12px}
.ll-help p{line-height:1.6;margin:10px 0}
.intro{font-size:17px;color:#f8eaf4}
.legend,.section-label,.fine{font-size:13px;color:#dbc4d4}
.section-label{display:inline-block;margin-right:18px!important}
.howto{padding-left:22px;line-height:1.65}
.howto li{margin:10px 0}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
