:root{color-scheme:dark;font-family:"Baloo 2",system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}html,body{height:100%}body{margin:0;min-height:100vh;background:radial-gradient(ellipse 130% 100% at 50% 0%,#1b3a2b,#0c1a13);background-attachment:fixed;color:#e8f0ea}.app{width:100%;max-width:480px;margin:0 auto;padding:32px 20px}h1{text-align:center;letter-spacing:3px;margin:0 0 4px;font-family:Bungee,system-ui,sans-serif;font-weight:400;color:#ffd23f;text-shadow:0 2px 0 #b8842c,0 3px 8px rgba(0,0,0,.5)}.subtitle{text-align:center;color:#8fb3a0;margin:0 0 32px;font-size:14px}.card-panel{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:20px;margin-bottom:16px}label{display:block;font-size:13px;color:#9fc2b0;margin-bottom:6px}input{width:100%;padding:10px 12px;border-radius:8px;border:1px solid rgba(255,255,255,.15);background:#00000040;color:#fff;font-size:16px;margin-bottom:14px}input.code{text-transform:uppercase;letter-spacing:6px;text-align:center;font-weight:700}button{width:100%;padding:12px;border-radius:8px;border:none;background:#2fa76b;color:#04140c;font-size:15px;font-weight:700;cursor:pointer;transition:filter .15s}button:hover:not(:disabled){filter:brightness(1.1)}button:disabled{opacity:.45;cursor:not-allowed}button.secondary{background:transparent;color:#9fc2b0;border:1px solid rgba(255,255,255,.2)}button.warn{background:#d9a441;color:#2a1c04}.divider{text-align:center;color:#5f7d6c;margin:8px 0;font-size:12px}.player-list{list-style:none;padding:0;margin:0}.player-row{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;background:#0003;margin-bottom:8px}.badge{font-size:11px;padding:2px 8px;border-radius:999px;font-weight:700}.badge.ready{background:#2fa76b;color:#04140c}.badge.waiting{background:#5f7d6c;color:#0c1a13}.badge.host{background:#d9a441;color:#2a1c04;margin-left:6px}.badge.bot{background:#6a8caf;color:#06121c}.player-row>span:last-child{display:inline-flex;align-items:center;gap:6px}button.mini.danger{width:auto;padding:0 8px;line-height:20px;background:#b04a4a;color:#fff;font-size:14px}button.mini.kick{width:auto;min-width:28px;min-height:28px;padding:0 8px;line-height:1;background:#b04a4a;color:#fff;font-size:14px;font-weight:800}.player-row.eliminated{opacity:.55}.player-row.eliminated .badge.waiting{background:#b04a4a;color:#fff}.player-row .badge.bot{margin-left:8px}.bot-counter{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;background:#0003}.bot-counter-label{font-weight:700}.bot-counter-controls{display:inline-flex;align-items:center;gap:12px}.bot-counter-controls .mini{width:auto;min-width:44px;min-height:44px;padding:0 12px;font-size:22px;line-height:1;background:#6a8caf;color:#06121c;font-weight:800}.bot-counter-controls .mini:disabled{opacity:.4}.bot-counter-value{min-width:24px;text-align:center;font-size:22px;font-weight:800;color:#fff5d6}.code-display{text-align:center;font-size:34px;font-weight:800;letter-spacing:10px;margin:4px 0 2px;color:#fff5d6;background:#0a1811;border:1px solid rgba(255,210,63,.35);border-radius:10px;padding:10px 6px}.error{color:#ff8a8a;font-size:13px;text-align:center;min-height:18px;pointer-events:none}.round-pts{color:#8fb3a0;font-size:13px}.card{position:relative;width:70px;height:100px;border-radius:8px;background:#fdfdf7;border:1px solid #cbcbbf;-webkit-user-select:none;user-select:none;box-shadow:0 2px 6px #0000004d;touch-action:none}.card .corner{position:absolute;display:flex;flex-direction:column;align-items:center;line-height:.95;font-weight:800}.card .corner.tl{top:6px;left:7px}.card .corner.br{bottom:6px;right:7px;transform:rotate(180deg)}.card .c-rank{font-size:18px}.card .c-suit{font-size:15px}.card .pip{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:38px}.card.red{color:#d21f3c}.card.black{color:#16160f}.card.dimmed{visibility:hidden}.card.back{background:repeating-linear-gradient(45deg,#2b5c43,#2b5c43 6px,#23543b 6px,#23543b 12px);border-color:#163524}.card.back .corner,.card.back .pip{display:none}.card.clickable{cursor:grab}.card.joker{overflow:hidden}.card.joker .joker-img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;border-radius:inherit;pointer-events:none}.game{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;user-select:none;-webkit-user-select:none}.log-panel{position:fixed;left:12px;top:12px;z-index:20;width:min(230px,30vw);max-height:34vh;overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:10px;background:#00000052;border:1px solid rgba(255,255,255,.08);font-size:12px;line-height:1.35;color:#b9d2c4;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 14px);mask-image:linear-gradient(to bottom,transparent 0,#000 14px)}.log-panel::-webkit-scrollbar{width:6px}.log-panel::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.log-line{word-break:break-word}.log-line.play{color:#d6e6db}.log-line.espejito{color:#7fd4ff}.log-line.penalty{color:#ff9a8f;font-weight:700}.log-line.effect{color:#ffe6a3}.log-line.sep{color:#6f8f7d;text-align:center;font-size:10px;letter-spacing:1px;text-transform:uppercase;margin:4px 0 2px}@media(max-width:820px){.log-panel{width:38vw;max-height:24vh;font-size:11px;padding:6px 8px;left:8px;top:8px}}.table-area{position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center}.table-circle{position:relative;width:min(84vw,46vh);height:min(84vw,46vh);border-radius:50%;background:radial-gradient(circle at 50% 40%,#23694a,#124030 75%);border:6px solid #0d2a1e;box-shadow:inset 0 0 40px #0006,0 10px 30px #0006}.center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;grid-template-columns:auto auto;align-items:center;gap:20px}.center-badges{grid-column:1 / -1;display:flex;gap:8px;align-items:center;justify-content:center}.deck{position:relative}.deck.clickable{cursor:pointer}.deck.clickable:hover{filter:brightness(1.15);transform:translateY(-2px);transition:transform .1s,filter .1s}.deck-count{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-weight:800;color:#cfe3d6;font-size:18px}.pile{position:relative;border:2px dashed rgba(255,255,255,.22);border-radius:12px;padding:8px;min-width:84px;min-height:108px;display:flex;align-items:center;justify-content:center}.dir{font-size:22px;color:#ffe6a3}.suit-badge{font-size:20px;background:#fdfdf7;color:#16160f;border-radius:6px;padding:0 8px;line-height:28px}.suit-badge.red{color:#d21f3c}.suit-badge.open{background:#2b3a45;color:#ffe6a3;font-weight:800;animation:pulse-open 1s ease-in-out infinite}@keyframes pulse-open{0%,to{opacity:.55}50%{opacity:1}}.pending{background:linear-gradient(135deg,#e0483a,#b02a1f);color:#fff5f0;font-weight:800;font-size:15px;padding:4px 12px;border-radius:999px;box-shadow:0 0 12px #e0483ab3;animation:urgentPulse 1.1s ease-in-out infinite}.seat{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:4px;width:120px}.seat.active{filter:drop-shadow(0 0 10px rgba(47,167,107,.95))}.seat.active .seat-info{box-shadow:0 0 0 2px #2fa76b;background:#2fa76b4d}.seat.just-played{filter:drop-shadow(0 0 14px #ffd23f)}.seat.just-played .seat-info{box-shadow:0 0 0 2px #ffd23f;background:#ffd23f47}.seat.una .seat-info{box-shadow:0 0 0 3px #3fd0ff,0 0 16px #3fd0ffe6;background:#3fd0ff38;animation:unapulse 1.4s ease-in-out infinite}@keyframes unapulse{0%,to{box-shadow:0 0 0 3px #3fd0ff,0 0 10px #3fd0ffb3}50%{box-shadow:0 0 0 3px #3fd0ff,0 0 22px #3fd0ff}}.seat.gone{opacity:.45}.seat-fan{display:flex;height:52px;align-items:flex-start;justify-content:center}.seat-fan .card.back{width:34px;height:48px;border-radius:5px;transform:rotate(var(--r, 0deg));transform-origin:center bottom;box-shadow:0 1px 3px #0006}.seat-empty{color:#9fc2b0}.seat-info{display:flex;flex-direction:column;align-items:center;background:#00000059;border-radius:8px;padding:3px 10px}.seat-name{font-size:13px;font-weight:600}.seat-count{font-size:12px;color:#cfe3d6}.seat .mini{width:auto;margin-top:2px;min-height:44px;padding:6px 12px;font-size:12px;font-weight:800;background:#d9a441;color:#2a1c04}.turn-hint{position:absolute;top:10px;left:50%;transform:translate(-50%);background:#0009;border:1px solid #6f8f7d;color:#cfe3d6;padding:6px 16px;border-radius:999px;font-weight:700;font-size:15px}.turn-hint.mine{background:#2fa76b;border-color:#2fa76b;color:#04140c}.pile.joker-play{animation:jokerFlash .7s ease-out}.pile.joker-play>.card{animation:jokerSpin .7s cubic-bezier(.2,.8,.2,1)}@keyframes jokerFlash{0%{box-shadow:0 0 #ffd23f00,inset 0 0 #fff0;background:#ffd23f00}25%{box-shadow:0 0 40px 14px #ffd23fe6;background:#ffd23f47}to{box-shadow:0 0 #ffd23f00;background:#ffd23f00}}@keyframes jokerSpin{0%{transform:rotate(-220deg) scale(.2);opacity:.2}60%{transform:rotate(10deg) scale(1.18);opacity:1}to{transform:rotate(0) scale(1)}}.seat.jodido{animation:shakeJodido .5s ease-in-out}.seat.jodido .seat-info{box-shadow:0 0 0 3px #ff3b3b,0 0 20px #ff3b3bf2!important;background:#ff3b3b52!important}.myhand.jodido{animation:shakeHand .5s ease-in-out}.myhand.jodido:after{content:"";position:absolute;left:50%;bottom:-6px;transform:translate(-50%);width:88%;height:150px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at center 70%,#ff3b3bcc,#ff3b3b00 68%)}@keyframes shakeJodido{0%,to{transform:translate(-50%,-50%)}20%{transform:translate(calc(-50% - 6px),-50%)}40%{transform:translate(calc(-50% + 6px),-50%)}60%{transform:translate(calc(-50% - 4px),-50%)}80%{transform:translate(calc(-50% + 4px),-50%)}}@keyframes shakeHand{0%,to{transform:translate(0)}20%{transform:translate(-7px)}40%{transform:translate(7px)}60%{transform:translate(-5px)}80%{transform:translate(5px)}}.myhand{position:relative;width:100%;margin-top:14px;z-index:6;overflow:visible;--hand-scale: 1}.myhand.myturn:before,.myhand.una:before{content:"";position:absolute;left:50%;bottom:-6px;transform:translate(-50%);width:min(94%,calc(var(--hand-w, 400px) + 120px));height:150px;z-index:-1;pointer-events:none;animation:handpulse 1.6s ease-in-out infinite}.myhand.myturn:before{background:radial-gradient(ellipse at center 70%,#2fa76bbf,#2fa76b00 68%)}.myhand.una:before{background:radial-gradient(ellipse at center 70%,#3fd0ffcc,#3fd0ff00 68%)}@keyframes handpulse{0%,to{opacity:.7}50%{opacity:1}}.myhand.just-played:after{content:"";position:absolute;left:50%;bottom:-6px;transform:translate(-50%);width:min(94%,calc(var(--hand-w, 400px) + 120px));height:150px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at center 70%,#ffd23fa6,#ffd23f00 68%)}.myhand .empty{position:absolute;left:50%;top:40%;transform:translate(-50%);color:#6f8f7d}.myhand .card{position:absolute;left:50%;bottom:8px;transform-origin:center bottom;transform:translate(calc(-50% + var(--x)),var(--y)) rotate(var(--r)) scale(var(--hand-scale));transition:transform .1s ease,box-shadow .1s ease}.myhand.rejected{animation:shakeHand .42s ease-in-out}.myhand.rejected:after{content:"";position:absolute;left:50%;bottom:-6px;transform:translate(-50%);width:min(96%,calc(var(--hand-w, 400px) + 130px));height:160px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at center 70%,#ff3b3bb3,#ff3b3b00 68%);animation:rejectFlash .42s ease-out}@keyframes rejectFlash{0%{opacity:0}30%{opacity:1}to{opacity:0}}.myhand .card:hover{transform:translate(calc(-50% + var(--x)),var(--y)) rotate(var(--r)) scale(calc(var(--hand-scale) * 1.14));z-index:100000!important;box-shadow:0 10px 22px #0009}@media(min-width:820px){.game .hud{position:fixed;right:3vw;top:50%;transform:translateY(-50%);flex-direction:column;align-items:stretch;width:auto;max-width:none;margin:0;gap:10px;z-index:50}.game .hud button{flex:0 0 auto;min-width:132px;padding:12px 18px}.game .hud .link{align-self:center}}.hud{display:flex;gap:8px;padding:6px 12px calc(6px + env(safe-area-inset-bottom,0px));align-items:center;width:100%;max-width:640px;margin-top:42px}.hud button{flex:1;padding:10px;min-height:48px;font-size:15px}.hud .link{width:auto;flex:0 0 auto;background:none;border:none;color:#9fc2b0;text-decoration:underline;cursor:pointer;padding:10px 8px;min-height:44px}.hud button.chip{border:none;border-radius:14px;min-height:52px;color:#fff;font-weight:800;letter-spacing:.3px;text-shadow:0 1px 1px rgba(0,0,0,.35);transition:transform .06s,box-shadow .06s}.hud button.chip:active:not(:disabled){transform:translateY(3px)}.hud button.chip.draw{background:linear-gradient(180deg,#3aa0d8,#2076a8);box-shadow:0 5px #14496b,0 8px 12px #00000059,inset 0 1px #ffffff59}.hud button.chip.draw:active:not(:disabled){box-shadow:0 2px #14496b,0 3px 6px #00000059,inset 0 1px #ffffff59}.hud button.chip.una{background:linear-gradient(180deg,#3fd0ff,#1f9ecf);color:#032530;text-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 5px #12708f,0 8px 12px #00000059,inset 0 1px #ffffff8c}.hud button.chip.una:active:not(:disabled){box-shadow:0 2px #12708f,0 3px 6px #00000059,inset 0 1px #ffffff8c}.hud button.chip.jodete{background:linear-gradient(180deg,#f0574a,#c22a1e);box-shadow:0 5px #7d160d,0 8px 12px #0006,inset 0 1px #ffffff4d}.hud button.chip.jodete:active:not(:disabled){box-shadow:0 2px #7d160d,0 3px 6px #0006,inset 0 1px #ffffff4d}.hud button.chip.neutral{background:linear-gradient(180deg,#3fbf7f,#1f8f57);color:#042616;text-shadow:0 1px 0 rgba(255,255,255,.35);box-shadow:0 5px #14603c,0 8px 12px #00000059,inset 0 1px #fff6}.hud button.chip.neutral:active:not(:disabled){box-shadow:0 2px #14603c,0 3px 6px #00000059,inset 0 1px #fff6}.hud button.chip.urgent-draw{background:linear-gradient(135deg,#e0483a,#b02a1f);color:#fff5f0;border:1px solid #ffb1a6;font-weight:800;font-size:16px;letter-spacing:.3px;animation:urgentPulse 1.1s ease-in-out infinite}.hud button.chip.urgent-una{background:linear-gradient(135deg,#3fd0ff,#1f9ecf);color:#032530;border:1px solid #baf0ff;font-weight:800;animation:urgentPulse 1.1s ease-in-out infinite}@keyframes urgentPulse{0%,to{box-shadow:0 0 #ffffff59,0 4px 12px #0006}50%{box-shadow:0 0 14px 3px #ffffff80,0 4px 12px #0006}}.hud-error{position:fixed;left:50%;transform:translate(-50%);bottom:calc(84px + env(safe-area-inset-bottom,0px));width:auto;max-width:min(92vw,420px);min-height:0;pointer-events:none;z-index:95;text-align:center}.hud-error:not(:empty){background:#781414eb;border:1px solid #ff8a8a;color:#ffdede;padding:8px 16px;border-radius:12px;font-weight:700;font-size:14px;box-shadow:0 6px 20px #00000080;animation:errPop .22s ease-out}@keyframes errPop{0%{transform:translate(-50%) scale(.8);opacity:0}to{transform:translate(-50%) scale(1);opacity:1}}.modal-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:100}.modal{background:#14261c;border:1px solid rgba(255,255,255,.15);border-radius:14px;padding:22px;text-align:center}.modal p{margin:0 0 14px;font-weight:800;font-size:17px;letter-spacing:.3px;color:#fff5d6}.suit-row{display:flex;gap:10px}.suit-btn{width:68px;height:68px;font-size:38px;line-height:68px;padding:0;background:#fdfdf7;color:#16160f;border-radius:12px}.suit-btn.red{color:#d21f3c}.reconnect-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:300;display:flex;align-items:center;justify-content:center;background:#000000b8;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.reconnect-box{background:#14261c;border:1px solid rgba(255,230,163,.35);border-radius:16px;padding:26px 30px;text-align:center;max-width:320px}.reconnect-spinner{width:42px;height:42px;margin:0 auto 16px;border-radius:50%;border:4px solid rgba(255,230,163,.25);border-top-color:#ffe6a3;animation:reconnect-spin .8s linear infinite}.reconnect-title{margin:0 0 6px;font-weight:800;font-size:19px;color:#fff5d6;letter-spacing:.3px}.reconnect-sub{margin:0 0 16px;font-size:14px;color:#9fc2b0}@keyframes reconnect-spin{to{transform:rotate(360deg)}}.rules-fab{position:fixed;top:10px;right:12px;z-index:40;width:44px;height:44px;padding:0;border-radius:50%;line-height:44px;background:#00000073;color:#ffe6a3;border:1px solid rgba(255,230,163,.45);font-size:20px;font-weight:800;cursor:pointer}.rules-fab:hover:not(:disabled){background:#000000a6;filter:none}.rules-modal{text-align:left;width:min(92vw,520px);max-height:86vh;display:flex;flex-direction:column;padding:0;overflow:hidden}.rules-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid rgba(255,255,255,.12)}.rules-head h2{margin:0;font-size:19px;letter-spacing:1px}.rules-close{width:auto;padding:4px 10px;background:transparent;color:#9fc2b0;border:1px solid rgba(255,255,255,.2);font-size:15px;border-radius:8px}.rules-body{padding:8px 20px 20px;overflow-y:auto}.rules-body section{margin-top:16px}.rules-body h3{margin:0 0 8px;font-size:15px;color:#ffe6a3}.rules-body h3 small{color:#8fb3a0;font-weight:400;font-size:12px}.rules-list{list-style:none;padding:0;margin:0}.rules-list li{display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:13.5px;line-height:1.35;color:#dbe8df;border-bottom:1px solid rgba(255,255,255,.06)}.rules-list li:last-child{border-bottom:none}.rules-list b{color:#fff}.rules-list.pts li{justify-content:space-between}.rules-list.pts li b{color:#ffe6a3;font-size:15px}.chip{flex:0 0 auto;min-width:26px;height:26px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;background:#fdfdf7;border:1px solid #cbcbbf;border-radius:5px;font-weight:800;font-size:13px;box-shadow:0 1px 2px #0000004d}.chip.black{color:#16160f}.chip.red{color:#d21f3c}.chip.wild{background:linear-gradient(135deg,#ffd23f,#d9a441);color:#2a1c04;border-color:#b8842c}.toasts{position:fixed;bottom:calc(132px + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%);display:flex;flex-direction:column;gap:6px;align-items:center;z-index:90;pointer-events:none}.toast{background:#000000d1;border:1px solid rgba(255,255,255,.12);color:#e8f0ea;padding:8px 14px;border-radius:999px;font-size:13px}.toast.espejito{border-color:#6fd0a0;color:#aef0cf}.toast.penalty{border-color:#ff8a8a;color:#ffc4c4}.toast.effect{border-color:#d9a441;color:#ffe0a3}
