:root{--felt:#0f5132;--felt-dark:#0a3a24;--felt-light:#1a6b45;--ink:#f4f1e8;--muted:#b9cbbf;--accent:#ffc94d;--new:#7fe3ff;--red:#c62828;--black:#1b1b1b;--card-bg:#fffdf7;--card-md-w:52px;--card-md-h:74px;--card-sm-w:30px;--card-sm-h:42px;color:var(--ink);background:var(--felt);-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}html,body{background:var(--felt);min-height:100%;margin:0}body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit}h1{margin:0 0 8px}h2{margin:0;font-size:1.1rem}.muted{color:var(--muted)}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.small{font-size:.8rem}.btn{background:var(--felt-light);cursor:pointer;min-height:44px;color:var(--ink);border:1px solid #ffffff40;border-radius:10px;justify-content:center;align-items:center;padding:0 16px;font-weight:600;text-decoration:none;display:inline-flex}.btn:disabled{opacity:.4;cursor:default}.btn-primary{background:var(--accent);color:#2b2100;border-color:var(--accent)}.btn-small{min-height:32px;padding:0 10px;font-size:.85rem}.btn-block{width:100%;margin-top:8px;display:flex}.btn-tile{border-radius:16px;flex-direction:column;gap:2px;width:76px;height:92px;padding:10px 0 8px}.btn-tile span{font-size:.72rem}.page{max-width:480px;margin:0 auto;padding:24px 16px}.logo{margin:0 0 16px}.page-title{flex-direction:column;align-items:center;gap:6px;margin:4px 0 14px;display:flex}.page-title img{width:240px;max-width:70%;height:auto;display:block}.page-title span{letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-size:.75rem;font-weight:700}.logo img{width:100%;max-width:360px;height:auto;margin:0 auto;display:block}.field{flex-direction:column;gap:4px;margin:12px 0;font-weight:600;display:flex}.home-actions{justify-content:center;gap:12px;margin-top:20px;display:flex}.your-games{margin-top:28px}.your-games h2{letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 8px;font-size:.75rem;font-weight:700}.your-games ul{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.your-games li{align-items:center;gap:4px;display:flex}.your-game{background:var(--felt-dark);min-width:0;color:var(--ink);border-radius:12px;flex:1;align-items:center;gap:12px;padding:10px 12px;text-decoration:none;display:flex}.your-game:hover{background:#0c4229}.your-game:focus-visible,.your-game-hide:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.your-game-waiting{opacity:.7}.your-game-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.your-game-title{align-items:center;gap:8px;display:flex}.your-game-detail{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.your-turn-badge{background:var(--accent);color:#2b2100;border-radius:999px;flex:none;padding:2px 7px;font-size:.7rem;font-weight:700}.your-game-hide{width:44px;height:44px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:10px;flex:none;justify-content:center;align-items:center;display:flex}.your-game-hide:hover{color:var(--ink)}.field input,.field select{font:inherit;background:var(--card-bg);min-height:44px;color:var(--black);border:none;border-radius:8px;padding:0 12px}.seatbar{background:#062417;flex:none;align-items:center;gap:6px;padding:6px 12px;display:flex;overflow-x:auto}.seatbar .btn{flex:none}.seatbar label{white-space:nowrap}.app-shell{flex-direction:column;height:100dvh;display:flex}.app-shell>.seat-view{flex:1;min-height:0;display:flex}.app-shell>.seat-view[hidden]{display:none}.seat-view .page{flex:1;min-width:0}.seat-view>div{flex:1;min-width:0;min-height:0;display:flex}.board{width:100%;min-width:0;max-width:600px;min-height:0;padding-bottom:env(safe-area-inset-bottom);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;flex-direction:column;flex:1;margin:0 auto;display:flex}.topbar{background:#062417;flex:none;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px;padding:2px 12px;display:grid}.topbar-wordmark{width:auto;height:20px;display:block}.status{flex-wrap:wrap;flex:none;align-items:baseline;column-gap:8px;padding:6px 16px 0;display:flex}.status strong{font-size:1.05rem}.status-mine strong{color:var(--accent)}.status-hint,.status-sub{color:var(--muted);font-size:.85rem}.status-sub{color:var(--ink);flex-basis:100%}.opponents{border-bottom:1px solid #f4f1e829;flex:none;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));margin:0;padding:4px 16px 0;list-style:none;display:grid}.opponents:empty{display:none}.opponent{border-bottom:3px solid #0000;flex-direction:column;align-items:center;gap:8px;min-width:0;margin-bottom:-1px;padding:6px 4px 10px;display:flex}.opponent-current{border-bottom-color:var(--accent)}.opponent-current .opponent-name{color:var(--accent)}.opponent-fan{align-items:flex-end;height:26px;padding-left:11px;display:flex}.mini-back{transform-origin:50% 100%;border:1.5px solid var(--card-bg);background:repeating-linear-gradient(45deg,#8b1e1e 0 3px,brown 3px 6px);border-radius:3px;width:18px;height:26px;margin-left:-11px}.opponent-name{text-align:center;overflow-wrap:anywhere;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;max-width:100%;font-size:.9rem;font-weight:700;display:inline-flex}.opponent-name .muted{font-size:.8rem;font-weight:500}.table{flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px 16px 8px;display:flex;overflow-y:auto}.table-heading{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:.75rem;font-weight:600}.table-groups{flex-wrap:wrap;align-items:flex-end;gap:10px 14px;display:flex;position:relative}.group{cursor:pointer;color:inherit;font:inherit;background:0 0;border:1px dashed #0000;border-radius:8px;flex-direction:column;align-items:flex-start;gap:5px;padding:12px 4px 4px;display:flex}.group-target{border-color:var(--accent);background:#ffc94d1f}.group-cards{display:flex;position:relative}.group-cards .card+.card{margin-left:-6px}.group-owner{color:var(--muted);font-size:.75rem}.card{background:var(--card-bg);color:var(--black);-webkit-user-select:none;user-select:none;border:1px solid #c9c2b2;border-radius:6px;flex-direction:column;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;transition:transform .12s;display:flex;position:relative;box-shadow:0 1px 2px #00000059}button.card{cursor:pointer}.card.red{color:var(--red)}.card-md{width:var(--card-md-w);height:var(--card-md-h)}.card-md .card-rank{font-size:1.15rem;font-weight:700;position:absolute;top:5px;left:6px}.card-md .card-suit{margin-top:14px;font-size:1.9rem}.card-sm{width:var(--card-sm-w);height:var(--card-sm-h);border-radius:4px}.card-sm .card-rank{font-size:.8rem;font-weight:700}.card-sm .card-suit{font-size:.9rem}.card.wild{background:#fff4cf}.card-stands{color:#fff;white-space:nowrap;z-index:1;background:#b8860b;border-radius:3px;padding:1px 3px;font-size:.6rem;font-weight:700;position:absolute;top:-12px;left:50%;transform:translate(-50%)}.card-back{border:3px solid var(--card-bg);background:repeating-linear-gradient(45deg,#8b1e1e 0 6px,brown 6px 12px)}.card-empty{box-shadow:none;color:var(--muted);background:0 0;border:2px dashed #ffffff59;font-size:.7rem}.card.card-new:before{content:"NEW";background:var(--new);color:#05303d;letter-spacing:.08em;border-radius:3px;padding:1px 4px;font-size:.55rem;font-weight:800;position:absolute;top:-16px;left:50%;transform:translate(-50%)}.card.card-flight{z-index:9;pointer-events:none;margin:0;transition:none;position:fixed;box-shadow:0 6px 14px #00000073}.card.selected{box-shadow:0 0 0 3px var(--accent), 0 4px 8px #0006;transform:translateY(-12px)}.piles .card.selected{transform:none}.discard-stack{display:grid}.discard-stack>.card{grid-area:1/1;transition:none}.discard-stack>.card:not(:last-child){pointer-events:none}.piles{flex:none;justify-content:center;gap:25px;padding:6px 12px 8px;display:flex}.pile{flex-direction:column;align-items:center;gap:4px;min-width:86px;display:flex;position:relative}.pile.riffling>[data-fly=deck]{visibility:hidden}.card.card-riffle{z-index:9;pointer-events:none;margin:0;transition:none;position:absolute;box-shadow:0 1px 2px #0000004d}.card.card-riffle-half{box-shadow:0 4px 10px #0006}.pile-label{color:var(--muted);margin-top:5px;font-size:.75rem}.piles .card-md{width:calc(var(--card-md-w) * .9);height:calc(var(--card-md-h) * .9)}.piles .card-md .card-rank{font-size:1.035rem;top:4px;left:5px}.piles .card-md .card-suit{margin-top:12px;font-size:1.7rem}.pile-ready .discard-stack,.pile-ready .card-empty{outline:2px dashed var(--accent);outline-offset:4px;border-radius:6px}.pile-ready .pile-label{color:var(--accent);font-weight:700}.hand-area{background:var(--felt-dark);flex:none;align-items:flex-end;gap:8px;padding:0 12px 0 0;display:flex}.hand{flex:1;justify-content:safe center;min-width:0;padding:22px 12px 14px;display:flex;position:relative;overflow-x:auto}.hand-slot{touch-action:pan-x;flex:none;position:relative}.hand-slot+.hand-slot{margin-left:-16px}.hand-slot-gap{visibility:hidden}.hand-dragging{cursor:grabbing}.hand-actions{flex-direction:column;flex:none;justify-content:flex-end;gap:8px;padding:10px 0;display:flex}.hand-actions:empty{display:none}.action-btn{width:56px;height:56px;color:var(--ink);font:inherit;letter-spacing:.02em;cursor:pointer;background:0 0;border:1.5px solid #f4f1e873;border-radius:6px;flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:0;font-size:.625rem;font-weight:700;display:flex}.action-group{border-color:var(--accent);color:var(--accent)}.action-done{border-color:var(--accent);background:var(--accent);color:#2b2100;box-shadow:0 2px #b8860b}.icon-btn{width:40px;height:40px;color:var(--ink);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:0;display:inline-flex}.toast{text-align:center;z-index:20;background:#000000d9;border-radius:10px;max-width:90vw;padding:10px 14px;position:fixed;bottom:140px;left:50%;transform:translate(-50%)}.modal-backdrop{z-index:10;background:#0000008c;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.modal{background:var(--felt-dark);width:100%;max-width:600px;max-height:85dvh;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));border-radius:16px 16px 0 0;overflow-y:auto}.modal-raised{padding-bottom:var(--modal-clear)}.modal-raised .modal{border-radius:16px;max-height:100%;padding-bottom:16px}.modal-header{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.modal-header-logo{grid-template-columns:1fr auto 1fr;align-items:start;row-gap:6px;margin-bottom:4px;display:grid}.modal-header-logo .modal-logo{grid-area:1/2;width:170px;height:auto;display:block}.modal-header-logo h1,.modal-header-logo h2{text-align:center;grid-area:2/1/auto/-1;margin:0;font-size:1rem}.modal-header-logo>.btn{grid-area:1/3;justify-self:end}.choices{flex-direction:column;display:flex}.spec-grid{grid-template-columns:1fr 1fr;gap:8px;margin-top:8px;display:grid}.spec-grid-wide{grid-template-columns:1fr}.spec-option{cursor:pointer;background:var(--felt-light);border:1px solid #ffffff40;border-radius:10px;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:8px 6px 14px;display:flex;position:relative}.spec-option:hover,.spec-option:focus-visible{border-color:var(--accent)}.spec-label{font-size:.9rem;font-weight:600}.card-fan{justify-content:center;padding-top:16px;display:flex}.card-fan .card{transform-origin:50% 100%;box-shadow:-1px 1px 3px #00000059}.gameover-page{width:fit-content;min-width:min(480px,100%);max-width:100%;padding-top:16px;padding-bottom:calc(24px + env(safe-area-inset-bottom))}.gameover-page .scoreboard thead th,.gameover-page .scoreboard th[scope=row]{background:var(--felt)}.scorecard-site{text-align:center;color:var(--muted);margin:10px 0 0;font-size:.8rem}.scoreboard-wrap{max-width:100%;overflow-x:auto}.scoreboard{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;font-size:.9rem}.scoreboard th,.scoreboard td{text-align:center;white-space:nowrap;border-bottom:1px solid #ffffff1a;padding:6px 8px}.scoreboard thead th{background:var(--felt-dark);text-overflow:ellipsis;max-width:90px;position:sticky;top:0;overflow:hidden}.scoreboard th[scope=row]{background:var(--felt-dark);position:sticky;left:0}.scoreboard .me{color:var(--accent)}.scoreboard tr.current td,.scoreboard tr.current th{background:#ffc94d26}.scoreboard tfoot td,.scoreboard tfoot th{border-top:2px solid #ffffff4d;font-weight:700}.scoreboard-final thead th{max-width:none;padding-top:32px;overflow:visible}.scoreboard-name{position:relative}.crown{transform-origin:50% 100%;fill:none;width:36px;height:25px;stroke:var(--accent);stroke-width:2.2px;stroke-linecap:round;stroke-linejoin:round;position:absolute;bottom:calc(100% + 2px);left:50%;transform:translate(-50%)rotate(-12deg)}.crown-shine{stroke-width:1.8px}.error{color:#ffb4a9;font-weight:600}.offline{color:#ffb4a9;border:1px solid;border-radius:4px;padding:0 4px;font-size:.7rem;font-weight:600}.join-box{background:var(--felt-dark);border-radius:16px;align-items:center;gap:14px;margin:12px 0 0;padding:14px;display:flex}.join-qr{background:#fff;border-radius:10px;flex:none;width:112px;height:112px;padding:6px}.join-qr svg{width:100%;height:100%;display:block}.join-details{flex-direction:column;flex:1;gap:8px;min-width:0;display:flex}.join-label{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:.75rem;font-weight:700}.join-code{letter-spacing:.06em;white-space:nowrap;font-family:ui-monospace,monospace;font-size:1.9rem;font-weight:800;line-height:1}.join-share{background:var(--ink);color:var(--felt);border-color:var(--ink);gap:6px}.code-slots{grid-template-columns:repeat(6,1fr);gap:8px;margin:20px 0 12px;display:grid;position:relative}.code-slots-input{opacity:0;border:none;width:100%;height:100%;font-size:16px;position:absolute;inset:0}.code-slot{aspect-ratio:4/5;background:var(--card-bg);max-height:72px;color:var(--black);pointer-events:none;border:2px solid #0000;border-radius:10px;justify-content:center;align-items:center;font-family:ui-monospace,monospace;font-size:1.8rem;font-weight:700;display:flex}.code-slot:not(.filled):after{content:"";background:#0003;border-radius:2px;align-self:flex-end;width:40%;height:3px;margin-bottom:18%}.code-slot.active{border-color:var(--accent)}.seat-heading{justify-content:space-between;align-items:baseline;margin:20px 0 0;display:flex}.seat-list{margin:6px 0 4px;padding:0;list-style:none}.seat-row{background:var(--felt);border-bottom:1px solid #ffffff1a;align-items:center;gap:8px;min-height:52px;padding:4px 0;display:flex;position:relative}.seat-list-dragging .seat-row{transition:transform .15s}.seat-list-dragging .seat-row-dragged{z-index:1;background:var(--felt-light);border-bottom-color:#0000;border-radius:10px;transition:none;box-shadow:0 8px 20px #0006}.seat-num{min-width:1.25em;color:var(--muted);text-align:center;flex:none}.seat-row-name{overflow-wrap:anywhere;flex-wrap:wrap;flex:1;align-items:center;gap:6px;min-width:0;display:flex}.seat-row-name input{font:inherit;background:var(--card-bg);min-width:0;min-height:36px;color:var(--black);border:none;border-radius:8px;flex:1;padding:0 8px}.seat-bot{color:var(--muted);display:inline-flex}.seat-remove,.seat-grip{width:40px;height:44px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;padding:0;display:flex}.seat-grip{cursor:grab;touch-action:none;width:36px}.seat-list-dragging .seat-grip{cursor:grabbing}.seat-invite{color:var(--muted);border:1.5px dashed #f4f1e84d;border-radius:12px;flex-direction:column;gap:4px;margin:10px 0 4px;padding:14px 16px;font-size:.9rem;line-height:1.4;display:flex}.seat-invite strong{color:var(--ink);font-size:1rem}.seat-invite b{color:var(--ink)}.seat-add{gap:8px;display:flex}.seat-add .btn{flex:1;margin-top:8px}.topbar-buttons{justify-self:end;gap:0;margin-right:-8px;display:flex}.topbar .icon-btn{width:36px;height:36px}.wild-track{--dot:5px;--dot-gap:3px;justify-self:start;align-items:center;gap:var(--dot-gap);margin:0;padding:0;list-style:none;display:flex}.wild-dot{width:var(--dot);height:var(--dot);background:#fff3;border-radius:50%;flex:none}.wild-dot.past{background:var(--muted);opacity:.6}.wild-current{width:18px;height:25px;color:var(--black);box-shadow:0 0 0 1.5px var(--accent), 0 1px 3px #00000080;background:#fff4cf;border-radius:3px;flex:none;justify-content:center;align-items:center;margin:0 1px;font-size:.75rem;font-weight:800;line-height:1;display:flex}.wild-intro{z-index:25;--w:min(36vw, 150px);position:fixed;inset:0}.wild-intro-scrim{opacity:0;background:#02120ab8;position:absolute;inset:0}.wild-intro-card{left:calc(50% - var(--w) / 2);width:var(--w);height:calc(var(--w) * 25 / 18);transform-origin:0 0;border-radius:calc(var(--w) * .18);color:var(--black);box-shadow:0 0 0 calc(var(--w) * .094) var(--accent), 0 6px 24px #0000008c;font-size:calc(var(--w) * .72);background:#fff4cf;justify-content:center;align-items:center;font-weight:800;line-height:1;display:flex;position:absolute;top:22%}.wild-intro-caption{left:16px;right:16px;top:calc(22% + var(--w) * 25 / 18 + 32px);text-align:center;opacity:0;font-size:min(9.6vw,2.4rem);font-weight:800;position:absolute}.wild-intro-caption b{color:var(--accent)}@media (width<=360px){.topbar-wordmark{height:16px}.wild-track{--dot:4px;--dot-gap:2px}}.drag-ghost{z-index:30;pointer-events:none;filter:drop-shadow(0 8px 12px #00000080);display:flex;position:fixed;top:0;left:0}.drag-ghost .card{transition:none;transform:rotate(-4deg)}.drag-ghost .card+.card{margin-left:-30px}.pile-draggable{touch-action:none;cursor:grab}.table.drop-ok{box-shadow:inset 0 0 0 2px #ffc94d59}.table.drop-hover{box-shadow:inset 0 0 0 3px var(--accent);background:#ffc94d0f}.group.drop-ok{border-color:#ffc94d99}.group.drop-hover{border-style:solid;border-color:var(--accent);background:#ffc94d40}.pile.drop-ok{outline-offset:4px;border-radius:10px;outline:2px dashed #ffc94d99}.pile.drop-hover{outline:3px solid var(--accent)}.hand.drop-ok{box-shadow:inset 0 0 0 2px #ffc94d59}.hand.drop-hover{box-shadow:inset 0 0 0 3px var(--accent)}.opponent{container-type:inline-size}.opponent-revealed{height:auto;min-height:var(--card-sm-h);max-width:100%;padding-left:0}.opponent-revealed .card{flex:none;box-shadow:-1px 0 2px #00000040}.opponent-revealed .card+.card{margin-left:calc(min(16px, (100cqw - 8px - var(--card-sm-w)) / var(--gaps,1)) - var(--card-sm-w))}.opponent-score{color:var(--accent);margin-top:-4px;font-size:.85rem;font-weight:700}.ready-mark{color:var(--ink)}.action-ready:not(.action-done){border-color:var(--accent);color:var(--accent)}.opponent-revealed .card{animation:.35s ease-out backwards card-flip}@keyframes card-flip{0%{transform:perspective(200px)rotateY(90deg)}to{transform:none}}@media (prefers-reduced-motion:reduce){.opponent-revealed .card{animation:none}}.opponent-revealed .card{justify-content:flex-start;align-items:flex-start;padding:2px 0 0 2px}.opponent-revealed .card-rank{letter-spacing:-.04em;font-size:.7rem;line-height:1}.opponent-revealed .card-suit{font-size:.7rem;line-height:1}
