:root{--ink:#17221c;--muted:#6d786f;--paper:#f4f1e9;--cream:#fffcf5;--green:#164d3a;--green-deep:#0d382a;--green-soft:#dce8df;--gold:#c39a52;--red:#aa3f39;--line:#17221c24;--shadow:0 24px 70px #1b251f1f}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{background:var(--paper);color:var(--ink);font-family:PingFang SC,Microsoft YaHei,Inter,ui-sans-serif,system-ui,sans-serif}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}.eyebrow{color:var(--gold);letter-spacing:.16em;text-transform:uppercase;font-size:.72rem;font-weight:800}.primary-button{background:var(--green);color:#fff;cursor:pointer;border:0;border-radius:12px;justify-content:center;align-items:center;min-height:50px;padding:0 22px;font-weight:750;transition:transform .18s,background .18s,opacity .18s;display:inline-flex}.primary-button:hover:not(:disabled){background:var(--green-deep);transform:translateY(-1px)}.primary-button:disabled,.secondary-button:disabled{cursor:not-allowed;opacity:.45}.primary-button.compact{min-height:40px;padding:0 17px}.secondary-button{border:1px solid var(--line);color:var(--ink);cursor:pointer;background:0 0;border-radius:10px;min-height:40px;padding:0 18px;font-weight:700}.login-shell{grid-template-columns:1.08fr .92fr;min-height:100vh;display:grid}.brand-panel{background:var(--green-deep);color:#fff;flex-direction:column;justify-content:center;padding:clamp(48px,8vw,120px);display:flex;position:relative;overflow:hidden}.brand-panel:after{content:"";border:1px solid #ffffff1a;border-radius:50%;width:540px;height:540px;position:absolute;top:-210px;right:-230px}.brand-panel h1{letter-spacing:-.07em;margin:28px 0 36px;font-family:Songti SC,STSong,Georgia,serif;font-size:clamp(4rem,8vw,7.5rem);font-weight:600;line-height:.9}.brand-panel p{color:#ffffffb3;max-width:460px;font-family:Georgia,serif;font-size:1.35rem;line-height:1.5}.brand-cards{gap:12px;margin-top:50px;display:flex}.brand-cards span{background:var(--cream);color:var(--ink);border-radius:9px;justify-content:center;align-items:center;width:46px;height:66px;font-family:Georgia,serif;font-size:1.55rem;display:flex;transform:rotate(-4deg)}.brand-cards span:first-child,.brand-cards span:nth-child(3){color:var(--red)}.brand-cards span:nth-child(2){transform:rotate(3deg)translateY(-5px)}.brand-cards span:nth-child(3){transform:rotate(-1deg)translateY(3px)}.brand-cards span:nth-child(4){transform:rotate(5deg)translateY(-4px)}.auth-panel{background:var(--cream);justify-content:center;align-items:center;padding:40px;display:flex}.auth-card{flex-direction:column;gap:22px;width:100%;max-width:410px;display:flex}.auth-card h2{letter-spacing:-.04em;margin:8px 0 0;font-family:Georgia,serif;font-size:2.65rem;font-weight:500}.auth-card label{color:var(--muted);letter-spacing:.04em;gap:8px;font-size:.8rem;font-weight:750;display:grid}.auth-card input{border:1px solid var(--line);color:var(--ink);background:#fff;border-radius:11px;outline:none;padding:15px 16px;font-size:1rem}.auth-card input:focus{border-color:var(--green);box-shadow:0 0 0 3px #164d3a1a}.text-button{color:var(--green);cursor:pointer;background:0 0;border:0;font-weight:700}.form-error{color:var(--red);margin:-8px 0 0;font-size:.88rem}.auth-note{color:var(--muted);text-align:center;margin:8px 0 0;font-size:.78rem;line-height:1.5}.dashboard-shell{max-width:1180px;min-height:100vh;margin:0 auto;padding:0 34px 80px}.topbar{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;min-height:80px;display:flex}.wordmark{font-family:Georgia,serif;font-size:1.35rem;font-weight:700}.wordmark span{color:var(--gold);font-style:italic;font-weight:500}.account-chip{color:var(--muted);align-items:center;gap:18px;font-size:.82rem;display:flex}.account-chip button{color:var(--green);cursor:pointer;background:0 0;border:0;font-weight:750}.hero-row{justify-content:space-between;align-items:end;padding:76px 0 54px;display:flex}.hero-row h1{letter-spacing:-.055em;margin:15px 0;font-family:Georgia,serif;font-size:clamp(3rem,6vw,5rem);font-weight:500;line-height:1}.hero-row p{color:var(--muted);margin:0}.new-game{min-height:56px}.stats-grid{grid-template-columns:repeat(4,1fr);gap:14px;display:grid}.stats-grid article{background:var(--cream);border:1px solid #17221c14;border-radius:16px;flex-direction:column;gap:14px;padding:22px;display:flex}.stats-grid span{color:var(--muted);font-size:.78rem;font-weight:700}.stats-grid strong{font-family:Georgia,serif;font-size:2.1rem;font-weight:500}.game-list-section{margin-top:58px}.section-heading h2{margin:8px 0 20px;font-family:Georgia,serif;font-size:2rem;font-weight:500}.game-list{background:var(--cream);border:1px solid #17221c14;border-radius:16px;overflow:hidden}.game-row{border-bottom:1px solid var(--line);grid-template-columns:100px 1fr 1fr 150px;align-items:center;gap:18px;padding:20px 22px;transition:background .15s;display:grid}.game-row:last-child{border-bottom:0}.game-row:hover{background:#faf7ef}.game-row>span{flex-direction:column;gap:4px;display:flex}.game-row>span:last-child{align-items:flex-end}.game-row small{color:var(--muted)}.result-mark{border-radius:999px;justify-content:center;align-items:center;width:fit-content;padding:7px 12px;font-size:.72rem;font-weight:800;display:inline-flex!important}.result-mark.active{color:#8a641e;background:#fff0d2}.result-mark.completed{background:var(--green-soft);color:var(--green)}.empty-state{background:var(--cream);border:1px dashed var(--line);color:var(--muted);text-align:center;border-radius:16px;padding:38px}.game-shell{min-height:100vh;padding:0 28px 32px}.game-header{grid-template-columns:1fr auto 1fr;align-items:center;min-height:76px;display:grid}.back-link{color:var(--muted);font-size:.82rem;font-weight:700}.match-title{align-items:center;gap:12px;display:flex}.match-title span{color:var(--muted);text-transform:uppercase;font-size:.78rem;font-weight:750}.match-title b{font-family:Georgia,serif;font-size:1.5rem}.level-score{justify-content:flex-end;gap:8px;display:flex}.level-score span{align-items:baseline;gap:7px;display:flex}.level-score b{color:var(--green);font-family:Georgia,serif;font-size:1.35rem}.level-score i{color:var(--gold);font-style:normal}.table-layout{grid-template-columns:minmax(0,1fr);gap:22px;max-width:1420px;margin:0 auto;display:grid}.felt-table{box-shadow:inset 0 0 0 2px #ffffff1f, var(--shadow);background:radial-gradient(circle at 50% 40%,#296c54,#174d3b 65%,#103d2e);border:10px solid #684c32;border-radius:38px;min-height:max(720px,100vh - 145px);position:relative;overflow:hidden}.player-pod{color:#fff;z-index:3;flex-direction:column;align-items:center;gap:9px;width:196px;display:flex;position:absolute}.player-pod.north{top:20px;left:50%;transform:translate(-50%)}.player-pod.west{top:37%;left:20px}.player-pod.east{top:37%;right:20px}.player-pod.south{bottom:196px;left:50%;transform:translate(-50%)}.player-pod .avatar{background:#ffffff24;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;font-family:Georgia,serif;display:flex}.player-pod.active .avatar{background:var(--gold);color:var(--green-deep)}.player-identity>span:last-child{flex-direction:column;display:flex}.player-pod b{font-size:.76rem}.player-pod small{color:#ffffff9e;margin-top:2px;font-size:.68rem}.center-play{color:#fff;flex-direction:column;align-items:center;width:min(360px,42%);animation:.24s ease-out table-action-in;display:flex;position:absolute;top:40%;left:50%;transform:translate(-50%,-50%)}.trick-label{color:#ffffff8c;letter-spacing:.13em;text-transform:uppercase;margin-bottom:9px;font-size:.68rem;font-weight:800}.turn-callout{color:#ffffffe6;background:#ffffff21;border:1px solid #ffffff2e;border-radius:999px;margin:-2px 0 9px;padding:5px 10px;font-size:.7rem}.center-play>b{text-transform:capitalize;font-family:Georgia,serif;font-size:1.15rem;font-weight:500}.center-play p{color:#ffffffa6;font-size:.75rem}.played-cards{justify-content:center;margin-top:15px;display:flex}.played-cards .playing-card{margin-left:-16px}.played-cards .playing-card:first-child{margin-left:0}.hand-cards{justify-content:center;align-items:end;min-height:120px;padding:18px 18px 4px;display:flex;overflow-x:auto}.hand-cards .playing-card{flex:0 0 58px;margin-left:-25px}.hand-cards .playing-card:first-child{margin-left:0}.playing-card{color:#151a17;text-align:left;background:#fffdf7;border:1px solid #00000024;border-radius:8px;flex-direction:column;width:58px;height:86px;padding:6px 5px;transition:transform .15s,border-color .15s;display:inline-flex;position:relative;box-shadow:0 5px 10px #00000024}.playing-card:not(.mini){cursor:pointer}.playing-card:not(.mini):hover{transform:translateY(-8px)}.playing-card.selected{border:2px solid #f0c36b;transform:translateY(-15px)}.playing-card.red{color:var(--red)}.playing-card.wild{background:linear-gradient(145deg,#fffdf7,#fff0cc)}.playing-card.mini{width:45px;height:67px}.card-corner{z-index:2;align-items:center;gap:2px;line-height:1;display:flex;position:relative}.card-rank{white-space:nowrap;font-family:Georgia,serif;font-size:.9rem;font-weight:700}.card-suit{font-size:.78rem}.card-center-suit{opacity:.92;align-self:center;margin-top:13px;font-size:1.45rem}.wild-dot{background:var(--gold);color:#fff;text-transform:uppercase;border-radius:999px;padding:2px 4px;font-size:.42rem;font-weight:800;position:absolute;bottom:5px;left:5px}.action-bar{background:#fffffff0;border-radius:13px;justify-content:space-between;align-items:center;margin-top:5px;padding:11px 13px 11px 18px;display:flex}.action-bar>span{color:var(--muted);font-size:.78rem;font-weight:650}.action-bar>div{gap:9px;display:flex}.result-card{background:var(--cream);border:1px solid #17221c14;border-radius:16px;padding:20px}.save-note{color:var(--muted);justify-content:center;align-items:center;gap:7px;font-size:.7rem;display:flex}.save-note span{color:var(--green)}.result-card h2{margin:8px 0 17px;font-family:Georgia,serif;font-size:1.6rem;font-weight:500}.result-card.win{border-top:4px solid var(--green)}.result-card.loss{border-top:4px solid var(--red)}.loading-table{flex-direction:column;justify-content:center;align-items:center;gap:16px;min-height:100vh;display:flex}.loader{border:2px solid var(--line);border-top-color:var(--green);border-radius:50%;width:28px;height:28px;animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@keyframes table-action-in{0%{opacity:.35;transform:translate(-50%,calc(7px - 50%))}to{opacity:1;transform:translate(-50%,-50%)}}@media (max-width:960px){.login-shell{grid-template-columns:1fr}.brand-panel{display:none}.stats-grid{grid-template-columns:repeat(2,1fr)}.table-layout{grid-template-columns:1fr}.save-note{grid-column:1/-1}.felt-table{min-height:720px}}@media (max-width:640px){.dashboard-shell{padding:0 18px 50px}.account-chip span{display:none}.hero-row{flex-direction:column;align-items:stretch;gap:28px;padding:48px 0 35px}.hero-row h1{font-size:3.2rem}.game-row{grid-template-columns:82px 1fr 1fr}.game-row>span:last-child{display:none}.game-shell{padding:0 8px 15px}.game-header{grid-template-columns:1fr auto}.match-title{grid-area:2/1/auto/-1;justify-content:center;padding-bottom:12px;display:flex}.felt-table{border-width:6px;border-radius:25px;min-height:880px}.player-pod.west{top:180px;left:10px}.player-pod.east{top:180px;right:10px}.player-pod b{font-size:.67rem}.player-pod.south{bottom:205px}.center-play{width:calc(100% - 24px);top:420px}.hand-cards{justify-content:flex-start}.auth-panel{padding:26px}}.round-badge{background:var(--green-soft);color:var(--green);white-space:nowrap;border:1px solid #164d3a29;border-radius:999px;padding:7px 14px;font-size:.95rem}.player-identity{align-items:center;gap:9px;display:flex}.player-pod.active .human-name{color:#f0c36b}.player-pod .seat-turn{color:var(--green-deep);background:#f0c36b;border-radius:999px;padding:4px 12px;font-size:.75rem;font-weight:800}.seat-action{color:#e8eee9;text-align:center;background:#00000021;border:1px solid #ffffff24;border-radius:12px;width:100%;padding:9px 10px;font-size:.73rem}.seat-action.passed{color:#624820;background:#f7ecd2;border-color:#e4c792}.seat-action.passed strong{letter-spacing:.12em;font-size:1.1rem}.seat-leading{color:#fff4d9;font-size:.73rem}.seat-played-cards{flex-wrap:wrap;justify-content:center;gap:3px;display:flex}.card-chip{background:var(--cream);color:var(--ink);white-space:nowrap;border-radius:4px;padding:4px;font-size:.75rem;font-weight:750}.card-chip.red{color:var(--red)}.table-footer{max-width:1420px;margin:14px auto 0}@media (min-width:641px) and (max-width:960px){.player-pod{width:150px}.player-pod.west{left:12px}.player-pod.east{right:12px}.center-play>b{font-size:.95rem}}@media (max-width:640px){.player-pod{width:142px}.player-pod.north,.player-pod.south{width:180px}.player-pod.north{top:18px}.player-pod.south{bottom:205px}.game-header{row-gap:8px;padding-top:12px}.match-title{gap:10px}.round-badge{padding:5px 12px;font-size:.85rem}.table-footer .save-note{flex-wrap:wrap;line-height:1.6}}.game-shell:has(.table-notice)>:not(.table-notice){filter:blur(6px);pointer-events:none}.table-notice{z-index:100;cursor:pointer;background:#081c154d;border:0;justify-content:center;align-items:center;width:100%;height:100%;padding:24px;display:flex;position:fixed;inset:0}.table-notice-message{background:var(--cream);max-width:min(560px,100%);box-shadow:var(--shadow);color:var(--red);text-align:center;overflow-wrap:anywhere;border:1px solid #fff9;border-radius:18px;padding:24px 30px;font-size:clamp(1rem,2.5vw,1.35rem);font-weight:700;line-height:1.6}.match-result{background:radial-gradient(ellipse at top, #e2eadd, var(--paper) 70%);place-items:center;min-height:100svh;padding:36px 20px;display:grid}.match-result-panel{border:1px solid var(--line);border-top:5px solid var(--gold);background:var(--cream);width:min(100%,640px);box-shadow:var(--shadow);border-radius:24px;padding:clamp(24px,5vw,48px)}.match-result-heading{text-align:center;margin-bottom:32px}.match-result-heading h1{color:var(--green);letter-spacing:.05em;margin:14px 0;font-size:clamp(48px,8vw,72px);line-height:1.15}.match-result-heading p{color:var(--muted);margin:0}.match-result.lost{background:var(--paper)}.match-result.lost h1{color:var(--ink)}.match-result-table{border-collapse:collapse;text-align:left;width:100%;font-size:.9rem}.match-result-table caption{text-align:left;margin-bottom:14px;font-weight:750}.match-result-table th,.match-result-table td{border-bottom:1px solid var(--line);white-space:nowrap;padding:13px 10px}.match-result-table thead th{color:var(--muted);font-size:.78rem;font-weight:500}.match-result-table th:last-child,.match-result-table td:last-child{text-align:right}.result-you{background:var(--green-soft)}.match-result-note{color:var(--muted);margin:14px 0 0;font-size:.76rem;line-height:1.7}.match-result-actions{gap:12px;margin-top:30px;display:flex}.match-result-actions>*{flex:1;justify-content:center;align-items:center;min-height:50px;display:inline-flex}.match-result-error{color:var(--red);text-align:center;font-size:.85rem}@media (max-width:420px){.match-result{padding:20px 12px}.match-result-panel{padding:28px 16px}.match-result-table th,.match-result-table td{padding:12px 6px}}.quick-exit{text-align:left;cursor:pointer;background:0 0;border:0;padding:12px 0}.hand-tools{color:#ffffffc2;justify-content:space-between;align-items:center;gap:12px;padding:0 4px;font-size:.75rem;display:flex}.hand-tools button{color:#fff4d9;cursor:pointer;white-space:nowrap;background:#ffffff17;border:1px solid #ffffff3d;border-radius:8px;min-height:32px;padding:5px 12px}.hand-tools button:disabled{opacity:.4;cursor:default}.touch-hint{display:none}.sortable-hand{touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;min-height:140px;padding:24px 18px 10px;display:block;position:relative;overflow:visible}.hand-track{flex-wrap:wrap;row-gap:24px;width:max-content;max-width:100%;margin-inline:auto;padding-right:26px;display:flex;position:relative}.hand-slot{touch-action:none;flex:0 0 40px;width:40px;transition:transform .12s;position:relative}.sortable-hand .playing-card{cursor:grab;width:66px;height:96px;margin-left:0;padding:7px 8px}.sortable-hand .card-corner{flex-direction:column;align-items:flex-start;gap:4px}.sortable-hand .card-rank{font-size:1.08rem}.sortable-hand .joker-rank{font-size:.78rem;line-height:1.38}.sortable-hand .card-suit{font-size:.95rem}.sortable-hand .card-center-suit{margin:0;font-size:1.6rem;position:absolute;bottom:12px;right:10px}.sortable-hand .playing-card.selected{padding:6px 7px}.sortable-hand .playing-card:focus-visible{outline-offset:2px;outline:3px solid #f0c36b}.hand-slot.drag-source{opacity:.18}.hand-drag-preview{z-index:20;pointer-events:none;position:absolute;top:12px}.hand-drag-preview .playing-card{border:2px solid #f0c36b;transform:scale(1.04)rotate(-2deg);box-shadow:0 12px 22px #00000059}.sortable-hand.is-dragging,.sortable-hand.is-dragging .playing-card{cursor:grabbing}.is-dragging .hand-slot .playing-card{transform:none}.felt-table{flex-direction:column;justify-content:flex-end;padding:360px 18px 16px;display:flex}.player-pod.west,.player-pod.east{top:200px}.center-play{top:250px}.player-pod.south{margin:0 auto 12px;position:relative;bottom:auto;left:auto;transform:none}.human-hand{position:relative;bottom:auto;left:auto;right:auto}@media (hover:none){.touch-hint{display:inline}.sortable-hand .playing-card:not(.selected):hover{transform:none}}@media (max-width:640px){.hand-tools{font-size:.68rem}.felt-table{min-height:0;padding:330px 12px 12px}.player-pod.west,.player-pod.east{top:112px}.center-play{top:260px}.sortable-hand{padding-inline:8px}}@media (prefers-reduced-motion:reduce){.hand-slot,.sortable-hand .playing-card{transition:none}}.action-bar{flex-wrap:wrap;gap:10px}.action-bar>.action-controls{flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}.advice-button{color:#72511a;min-height:42px;font:inherit;cursor:pointer;background:#f6edda;border:1px solid #d7bf8d;border-radius:10px;justify-content:center;align-items:center;gap:6px;padding:8px 12px;font-size:.82rem;font-weight:750;display:inline-flex}.advice-button:hover:not(:disabled){background:#eedebd}.advice-button:disabled{opacity:.45;cursor:default}.advice-button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}.advice-arrow{font-size:1.3rem;line-height:1}.ai-advice{border:1px solid #d7bf8d;border-left:4px solid var(--gold);color:#433821;background:#fff8e9;border-radius:12px;margin:6px 0 10px;padding:12px 16px}.ai-advice>div{flex-wrap:wrap;align-items:baseline;gap:6px 14px;display:flex}.ai-advice strong{color:#72511a;font-size:.86rem}.ai-advice p{overflow-wrap:anywhere;margin:6px 0 0;font-size:.88rem;line-height:1.6}.advice-target{outline:2px solid var(--gold);outline-offset:3px}.advice-error{color:#fff0c9;margin:8px 4px;font-size:.8rem}@media (max-width:420px){.action-bar{padding:12px}.action-bar>span{flex-basis:100%}.action-bar>.action-controls{justify-content:flex-end;width:100%}.advice-button{margin-right:auto;padding-inline:10px}}
