/* President's sunlit civic club. Art is decorative; cards and labels are live. */
*{box-sizing:border-box}
html{background:#261034}
body.pr-page{margin:0;background:radial-gradient(ellipse at 50% 25%,#713a80,#261034 65%);color:#fff9e8;font-family:Georgia,'Times New Roman',serif}
.pr-main{max-width:none;margin:0;padding:0;min-height:0}
.pr-scene{--u:min(calc(100vw / 390),calc(100svh / 844),1.25px);position:relative;width:calc(390 * var(--u));height:calc(844 * var(--u));margin:0 auto;background:#5a0871 url('../assets/play/president/club-room.webp') center/100% 100% no-repeat;isolation:isolate;box-shadow:0 0 70px #10001888}
.pr-scene h1{position:absolute;left:calc(5 * var(--u));top:calc(5 * var(--u));width:calc(380 * var(--u));height:calc(99 * var(--u));margin:0;z-index:2}
.pr-scene h1 img{display:block;width:100%;height:100%;max-width:none;object-fit:fill;pointer-events:none}
.hud{position:absolute;left:calc(12 * var(--u));top:calc(108 * var(--u));width:calc(366 * var(--u));height:calc(40 * var(--u));display:grid;grid-template-columns:.75fr 1fr 1fr 1fr .65fr;align-items:center;margin:0;padding:calc(4 * var(--u));border:calc(2 * var(--u)) solid #d9a0ed;border-radius:calc(12 * var(--u));background:linear-gradient(#6d1b86,#390345);box-shadow:0 calc(3 * var(--u)) calc(4 * var(--u)) #3b17466e;color:#fff8e6}
.hud div{text-align:center;font-size:calc(12 * var(--u));line-height:1.05;border-right:1px solid #e7c46588}
.hud div:last-child{border:0}
.hud b{display:block;font-size:calc(17 * var(--u));line-height:1.05;color:#fff9dd;font-variant-numeric:tabular-nums}
#pr-turn{position:absolute;top:calc(153 * var(--u));left:calc(61 * var(--u));width:calc(268 * var(--u));height:calc(44 * var(--u));display:grid;place-items:center;padding:0 calc(12 * var(--u)) calc(4 * var(--u));background:url('../assets/play/president/button-yellow.webp') center/100% 100% no-repeat;color:#3d064b;font-size:calc(23 * var(--u));line-height:1;font-weight:900;text-align:center;text-transform:uppercase;filter:drop-shadow(0 3px 3px #35003e55)}
#pr-status{position:absolute;top:calc(244 * var(--u));left:calc(15 * var(--u));width:calc(360 * var(--u));height:calc(42 * var(--u));margin:0;padding:calc(3 * var(--u)) calc(7 * var(--u));border:1px solid #e1b6f266;border-radius:calc(14 * var(--u));background:linear-gradient(#4e0b62e8,#340641e8);color:#fff6e1;font:600 calc(11 * var(--u))/1.25 system-ui,sans-serif;display:flex;align-items:center;justify-content:center;text-align:center;z-index:3}
#pr-board{position:absolute;left:0;top:calc(211 * var(--u));width:100%;height:calc(576 * var(--u));touch-action:none}
#pr-board *{touch-action:none}
.seats{position:absolute;top:0;left:calc(10 * var(--u));right:calc(10 * var(--u));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(7 * var(--u))}
.seat{position:relative;min-width:0;text-align:center;color:#fff9e8;line-height:1.15;font-size:calc(11 * var(--u));height:calc(105 * var(--u));border-radius:calc(12 * var(--u));transition:filter .15s}
.seat b{display:block;white-space:nowrap;padding:calc(4 * var(--u)) 0;border:calc(1.5 * var(--u)) solid #f8eaa5;border-radius:calc(20 * var(--u));background:linear-gradient(#65117e,#390445);box-shadow:0 2px 4px #19002866;font-size:calc(13 * var(--u));font-weight:bold}
.seat.turn b{background:linear-gradient(#fff985,#f4e700);color:#43044c;border-color:#fffbd7;box-shadow:0 0 calc(10 * var(--u)) #fff759}
.seat.out .fan{opacity:.45}
.title{display:inline-block;padding:calc(1 * var(--u)) calc(5 * var(--u));border-radius:calc(7 * var(--u));font:600 calc(9 * var(--u))/1.2 system-ui,sans-serif;background:#340641dc;color:#fff6de}
.title.t0{background:#fff156;color:#43024b}.title.t1{background:#f7e5ff;color:#43024b}.title.t3{background:#e6c8b5;color:#492a32}
.seat>.title{position:relative;z-index:1;margin-top:calc(2 * var(--u))}
.fan{position:relative;height:calc(48 * var(--u));margin-top:calc(4 * var(--u));display:flex;justify-content:center;align-items:flex-end}
.fan i{display:block;flex:none;width:calc(31 * var(--u));height:calc(47 * var(--u));margin-left:calc(-25 * var(--u));background:url('../assets/play/president/card-back.webp') center/100% 100% no-repeat;filter:drop-shadow(0 1px 1px #20052a);transform-origin:center 110%}
.fan i:first-child{margin-left:0}
.seat .count{display:inline-block;position:relative;margin-top:calc(1 * var(--u));padding:calc(2 * var(--u)) calc(8 * var(--u));border:1px solid #f4e58c;border-radius:calc(12 * var(--u));background:#450953;font-size:calc(12 * var(--u));font-weight:bold}
.act{position:relative;margin:calc(3 * var(--u)) calc(-2 * var(--u)) 0;font:600 calc(9 * var(--u))/1.15 system-ui,sans-serif;color:#fff5dc;text-shadow:0 1px 2px #20002d;overflow-wrap:anywhere}
.felt{position:absolute;left:calc(18 * var(--u));right:calc(18 * var(--u));top:calc(123 * var(--u));height:calc(119 * var(--u));display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:calc(6 * var(--u))}
#pr-pile{display:flex;justify-content:center;align-items:center;gap:calc(9 * var(--u));min-height:calc(88 * var(--u))}
#pr-pilenote{max-width:100%;min-height:calc(25 * var(--u));padding:calc(4 * var(--u)) calc(12 * var(--u));border:1px solid #ecd477;border-radius:calc(16 * var(--u));background:#3e084ee8;color:#fff7e5;text-align:center;font-size:calc(11 * var(--u));line-height:1.2;box-shadow:0 2px 3px #28003477}
.mine{position:absolute;top:calc(289 * var(--u));left:calc(12 * var(--u));width:calc(366 * var(--u));text-align:center}
.hand-label{width:max-content;max-width:100%;margin:0 auto;padding:calc(3 * var(--u)) calc(24 * var(--u));border:calc(2 * var(--u)) solid #f8e88e;border-radius:calc(20 * var(--u));background:linear-gradient(#65117e,#390445);font-weight:900;font-size:calc(20 * var(--u));line-height:1.1;text-transform:uppercase;box-shadow:0 2px 4px #24002f88}
.who{height:calc(17 * var(--u));padding-top:calc(4 * var(--u));font:500 calc(10 * var(--u))/1.2 system-ui,sans-serif;color:#fff6df}
.who b{font-weight:800;margin-right:calc(5 * var(--u))}
.hand{position:absolute;left:calc(14 * var(--u));width:calc(362 * var(--u));top:calc(339 * var(--u));height:calc(155 * var(--u));display:flex;flex-wrap:wrap;align-content:flex-start;justify-content:center;gap:calc(10 * var(--u)) calc(5 * var(--u));padding-top:calc(7 * var(--u))}
.card{position:relative;flex:none;width:calc(46 * var(--u));height:calc(74 * var(--u));min-height:0;border:0;border-radius:calc(6 * var(--u));padding:0;background:transparent url('../assets/play/president/card-face.webp') center/100% 100% no-repeat;color:#19131a;font-family:Georgia,'Times New Roman',serif;filter:drop-shadow(0 calc(3 * var(--u)) calc(2 * var(--u)) #1b002d88);transition:transform .12s;user-select:none}
.card.red{color:#bd1931}
.card .r{position:absolute;left:10%;top:6%;font-size:calc(19 * var(--u));font-weight:bold;line-height:1;letter-spacing:calc(-.7 * var(--u))}
.card .s{position:absolute;left:10%;top:29%;font-size:calc(11 * var(--u));line-height:1}
.card .bottom{position:absolute;right:9%;bottom:6%;transform:rotate(180deg);font-size:calc(15 * var(--u));line-height:1;font-weight:bold}
.pips{position:absolute;left:29%;right:11%;top:26%;bottom:23%}
.pip{position:absolute;transform:translate(-50%,-50%);font-size:calc(13 * var(--u));line-height:1}
.pip.flip{transform:translate(-50%,-50%) rotate(180deg)}
.pips.ace .pip{font-size:calc(30 * var(--u))}
.court{position:absolute;inset:22% 17% 23% 29%;display:flex;flex-direction:column;align-items:center;justify-content:center;border-top:1px solid currentColor;border-bottom:1px solid currentColor;background:linear-gradient(135deg,#ebd6ef88,transparent,#e7d4b866);font-size:calc(23 * var(--u));line-height:.9;font-weight:bold}
.court small{font-size:calc(15 * var(--u));margin-top:calc(4 * var(--u))}
#pr-pile .card{width:calc(59 * var(--u));height:calc(88 * var(--u));--card-scale:1.35}
#pr-pile .r{font-size:calc(24 * var(--u))}#pr-pile .s{font-size:calc(14 * var(--u))}#pr-pile .pip{font-size:calc(17 * var(--u))}#pr-pile .bottom{font-size:calc(19 * var(--u))}#pr-pile .pips.ace .pip{font-size:calc(39 * var(--u))}#pr-pile .court{font-size:calc(31 * var(--u))}#pr-pile .court small{font-size:calc(20 * var(--u))}
.hand.large{column-gap:calc(4 * var(--u))}.hand.large .card{width:calc(41 * var(--u));height:calc(74 * var(--u))}
.pr-scene button{cursor:pointer;-webkit-tap-highlight-color:transparent}
.pr-scene button:focus-visible{outline:calc(3 * var(--u)) solid #fff77a;outline-offset:calc(3 * var(--u))}
button.card:hover:not(:disabled){transform:translateY(calc(-3 * var(--u)))}
.card.sel,button.card.sel:hover{transform:translateY(calc(-7 * var(--u)));outline:calc(3 * var(--u)) solid #fff000;outline-offset:calc(1 * var(--u));filter:drop-shadow(0 0 calc(4 * var(--u)) #fff039)}
.card.cur{outline:calc(3 * var(--u)) dashed #fff4a0;outline-offset:calc(2 * var(--u))}
.card.got{box-shadow:0 0 0 calc(2 * var(--u)) #f4b9ff}
.card:disabled{cursor:default}
.actions{position:absolute;top:calc(520 * var(--u));left:calc(14 * var(--u));width:calc(362 * var(--u));display:grid;grid-template-columns:1.55fr 1fr 1fr;gap:calc(7 * var(--u))}
.pr-scene button:not(.card){min-width:0;height:calc(53 * var(--u));padding:calc(4 * var(--u)) calc(10 * var(--u)) calc(8 * var(--u));border:0;border-radius:calc(25 * var(--u));background:transparent url('../assets/play/president/button-violet.webp') center/100% 100% no-repeat;color:#fff6de;font:900 calc(18 * var(--u))/1.05 Georgia,'Times New Roman',serif;text-shadow:0 2px 1px #33003d;text-transform:uppercase;filter:drop-shadow(0 3px 2px #24002d70)}
.pr-scene button.gold{background-image:url('../assets/play/president/button-yellow.webp');color:#44054d;text-shadow:none}
.pr-scene button:not(.card):disabled{filter:saturate(.65) brightness(.8);cursor:default}
.pr-scene #pr-go{font-size:calc(18 * var(--u))}
.toolbar{position:absolute;bottom:calc(9 * var(--u));left:calc(55 * var(--u));width:calc(280 * var(--u));display:flex;gap:calc(10 * var(--u));align-items:center}
.pr-scene .toolbar button{flex:1;height:calc(44 * var(--u));font-size:calc(13 * var(--u));padding:calc(4 * var(--u)) calc(8 * var(--u)) calc(7 * var(--u));background-image:url('../assets/play/president/button-violet.webp');color:#fff6de;text-shadow:0 2px 1px #33003d}
#pr-over{position:absolute;inset:calc(-1 * var(--u)) calc(12 * var(--u)) calc(4 * var(--u));z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(20 * var(--u));padding:calc(20 * var(--u));border:calc(3 * var(--u)) solid #e5b4ef;border-radius:calc(28 * var(--u));background:linear-gradient(160deg,#6a187beF,#2f043ded),url('../assets/play/president/club-room.webp') center/cover;box-shadow:0 8px 20px #16002299;text-align:center}
#pr-over[hidden]{display:none}
#pr-over p{margin:0;color:#fff4c3;font-size:calc(25 * var(--u));line-height:1.2;font-weight:900}
#pr-over[data-outcome="win"]{border-color:#fff44b}#pr-over[data-outcome="loss"] p{color:#f1d4ff}
.tally{width:100%;border-collapse:collapse;font:500 calc(12 * var(--u))/1.3 system-ui,sans-serif;color:#fff5e5}
.tally th,.tally td{padding:calc(9 * var(--u)) calc(4 * var(--u));border-bottom:1px solid #d79dea55;text-align:center}
.tally th:first-child,.tally td:first-child{text-align:left}.tally th{font-size:calc(10 * var(--u));text-transform:uppercase;color:#e9c4ef}
.pr-scene #pr-over-btn{width:calc(220 * var(--u));height:calc(58 * var(--u));font-size:calc(21 * var(--u))}
.pr-guide{max-width:780px;margin:24px auto;padding:24px;color:#eee0f0;font:16px/1.65 system-ui,sans-serif}
.pr-guide h2{color:#fff3be;font:800 24px/1.2 Georgia,serif;margin:24px 0 12px}.pr-guide p{margin:14px 0}.pr-guide li{margin:10px 0}.pr-guide ul{padding-left:22px}
.pr-page>header{max-width:780px;margin:0 auto;padding:12px 24px 32px;font:14px/1.5 system-ui,sans-serif}.pr-page a{color:#fff09d}
@media(prefers-reduced-motion:reduce){.pr-scene *{transition:none!important;animation:none!important}}
