:root{font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#15253f;background:#edf5fc;font-size:14px}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}#app{min-height:100dvh}.shell{width:min(100%,480px);min-height:100dvh;margin:auto;padding:14px 16px calc(88px + env(safe-area-inset-bottom));background-color:#edf5fc;background-image:radial-gradient(#b9d4ef 1px,transparent 1px);background-size:24px 24px;box-shadow:0 0 0 1px #d7e7f7}.topbar{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid #e6edf7;border-radius:18px;background:rgba(255,255,255,.96);min-height:62px;box-shadow:0 6px 20px #273e6a09}.brandmark{width:34px;height:34px;display:grid;place-items:center;flex:none;border-radius:12px;background:#5545ff;color:#fff;font-size:22px;box-shadow:0 4px 10px #5545ff44}.brand{min-width:0;flex:1}.brandline{display:flex;align-items:center;gap:6px;white-space:nowrap}.brand strong{font-size:17px;letter-spacing:-.5px}.badge{font-size:10px;color:#5142e8;background:#eef0ff;padding:3px 5px;border-radius:5px}.script{font-family:cursive;font-style:italic;color:#563cff;font-size:12px;white-space:nowrap}.sub{font-size:10px;color:#91a3bc;margin-top:3px}.online{border:1px solid #a7eed1;background:#eafff5;color:#049468;border-radius:20px;padding:4px 7px;font-size:10px;white-space:nowrap}.avatar-mini{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#e8eaff;color:#4945dc;font-size:11px;flex:none}.main{padding-top:14px}.card{background:#fff;border:1px solid #e4eaf3;border-radius:18px;box-shadow:0 8px 20px #1b3c6708}.tip{display:flex;gap:8px;align-items:center;padding:13px 15px;background:#f5f7ff;border:1px solid #e0e4ff;border-radius:17px;color:#45419a;font-size:12px;font-weight:600}.tip .spark{color:#684dff;font-size:20px}.actions{display:flex;gap:9px;margin:14px 0}.btn{border:0;border-radius:13px;min-height:48px;padding:11px 15px;font-weight:750;transition:transform .15s,filter .15s}.btn:active{transform:scale(.97)}.primary{background:#5140ff;color:#fff;box-shadow:0 6px 12px #4d3bff22}.orange{background:linear-gradient(115deg,#ffbb00,#ff7900);color:#fff;box-shadow:0 6px 12px #ff900022}.soft{background:#f0f3ff;color:#5140ff}.ghost{background:#fff;color:#556582;border:1px solid #dfe7f0}.actions .btn{flex:1}.section-title{display:flex;align-items:center;gap:7px;margin:18px 1px 11px;font-size:13px;font-weight:800}.muted{color:#92a3ba;font-size:11px;font-weight:500}.section-title .muted{margin-left:auto}.count{font-size:11px;color:#5140ff;background:#eceaff;padding:3px 7px;border-radius:10px}.join-box{padding:14px}.small-title{font-weight:800;font-size:13px;display:flex;align-items:center;gap:8px}.icon-bubble{width:26px;height:26px;display:grid;place-items:center;background:#f0efff;color:#5140ff;border-radius:9px}.join-row{display:flex;gap:8px;margin-top:12px}.input{width:100%;min-width:0;height:44px;border:1px solid #dce4ee;border-radius:11px;background:#f8fbff;padding:0 12px;color:#15253f;outline:none}.input:focus{border-color:#5848ff;box-shadow:0 0 0 3px #5848ff1e}.join-row .btn{min-height:44px}.room-card{padding:15px;margin-bottom:10px}.room-card .meta{display:flex;justify-content:space-between;align-items:center}.code{font:700 11px ui-monospace,monospace;letter-spacing:.5px;color:#5949ff;background:#eff0ff;border-radius:7px;padding:5px 7px}.pill{border-radius:20px;padding:5px 8px;font-size:10px;background:#f3f6fb;color:#7c8da8}.room-card h3{font-size:15px;margin:10px 0 4px}.room-card p{margin:0;color:#91a3bc;font-size:11px}.room-foot{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #edf0f6;margin-top:14px;padding-top:12px;font-size:12px;color:#51617c}.room-foot .btn{min-height:39px}.empty{padding:28px;text-align:center;color:#8090a9}.bottom-nav{position:fixed;z-index:20;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,480px);display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px 9px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e7edf5;box-shadow:0 -8px 25px #1835550b}.nav-item{height:54px;border:0;background:transparent;border-radius:14px;color:#71829e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;position:relative}.nav-item .ni{font-size:20px;line-height:21px}.nav-item.active{background:#f0f2ff;color:#5140ff;font-weight:700}.nav-item.active:after{content:"";position:absolute;bottom:3px;width:4px;height:4px;background:#6654ff;border-radius:50%}.hero{border-radius:17px;padding:20px;color:#fff;background:linear-gradient(110deg,#ff8d00,#5140f4);box-shadow:0 8px 18px #6048f320}.hero .eyebrow{font-size:11px;opacity:.8}.hero h1{font-size:22px;margin:5px 0}.hero p{font-size:12px;opacity:.85;margin:0}.tabs{display:flex;background:#fff;border:1px solid #e5ebf4;border-radius:15px;padding:4px;margin:14px 0}.tabs button{flex:1;border:0;min-height:39px;border-radius:11px;background:transparent;color:#687994;font-weight:700;font-size:12px}.tabs button.active{background:#eef1ff;color:#5140ff}.rank-list{overflow:hidden}.rank-row{display:flex;align-items:center;gap:11px;min-height:63px;padding:9px 12px;border-bottom:1px solid #edf0f5}.rank-row:last-child{border:0}.rank-row.me{background:#f4f5ff}.rank-num{width:21px;text-align:center;color:#9babc0;font-size:12px}.rank-face{width:35px;height:35px;display:grid;place-items:center;border-radius:11px;background:#f3f7fb;font-size:20px}.rank-info{flex:1;min-width:0}.rank-info strong{font-size:12px}.rank-info div{font-size:10px;color:#9aacc0;margin-top:4px}.points{font:700 13px ui-monospace,monospace;color:#5140ff}.rule-hero{background:linear-gradient(120deg,#5140f8,#b800f2)}.rule-card{padding:15px;margin-top:13px}.rule-card h3{margin:0 0 12px;font-size:13px}.rule-line{padding:11px;border:1px solid #dee6ff;background:#f6f8ff;border-radius:12px;margin-bottom:8px;font-size:12px;line-height:1.6}.rule-line strong{display:block;color:#3f3ab7}.rule-line.green{background:#e9fff5;border-color:#a8eed2}.rule-line.orange-line{background:#fff8eb;border-color:#ffe0a4}.settings-head{padding:20px}.settings-head h2{margin:0 0 5px;font-size:17px}.settings-head p{margin:0;color:#98a9be;font-size:11px}.settings-card{padding:16px;margin-top:14px}.settings-card h3{margin:0 0 13px;font-size:13px}.avatar-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.avatar-choice{height:48px;border:1px solid #dce4ee;background:#f8fbff;border-radius:10px;font-size:21px}.avatar-choice.selected{border:2px solid #604cff;background:#f1efff}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 0;border-bottom:1px solid #f0f2f6;font-size:12px}.setting-row:last-child{border:0}.switch{width:39px;height:22px;border:0;border-radius:20px;background:#cbd5e4;position:relative;min-height:22px}.switch.on{background:#5140ff}.switch:after{content:"";position:absolute;width:16px;height:16px;top:3px;left:3px;background:#fff;border-radius:50%;transition:left .2s}.switch.on:after{left:20px}.top-room{display:flex;align-items:center;gap:10px;padding:13px}.top-room .back{border:0;background:transparent;color:#70839d;font-size:20px;min-width:35px;min-height:44px}.top-room .room-name{flex:1;min-width:0}.top-room strong{display:block;font-size:13px}.top-room small{font-size:10px;color:#6354e5}.turn-pill{background:#fff6df;color:#c46400;border:1px solid #ffd778;border-radius:20px;padding:7px 9px;font-size:11px;font-weight:700;white-space:nowrap}.seat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin:8px 0}.seat{min-height:94px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;padding:7px}.seat .face{font-size:25px;background:#f4f7fc;border:1px solid #e0e7f1;width:37px;height:37px;display:grid;place-items:center;border-radius:11px}.seat strong{font-size:11px}.seat small{font-size:10px;color:#6c73d2}.seat.turn{border-color:#ffbd46;box-shadow:0 0 0 2px #ffcc6c55}.seat.offline{opacity:.5}.table{min-height:280px;height:34dvh;max-height:430px;border:1px solid #dfe7ff;border-radius:22px;background:linear-gradient(#f1f4ffdd,#f7fbffdd);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:14px;text-align:center}.table .deck{position:absolute;right:12px;top:11px;background:#fff;color:#5140ff;font-size:10px;padding:5px 8px;border-radius:20px}.table .play-label{font-size:12px;color:#5f62a3;font-weight:700}.table .current-cards{display:flex;justify-content:center;margin:13px 0;max-width:100%;overflow:auto;padding:3px}.table .requirement{font-size:11px;color:#c96a00;background:#fff7e7;border:1px solid #ffda86;border-radius:20px;padding:6px 9px;max-width:100%}.table .open-icon{font-size:27px;color:#5b4dff}.table h3{font-size:13px;margin:7px 0}.table p{color:#91a2ba;font-size:11px;margin:0}.hand-header{display:flex;align-items:center;gap:7px;margin:9px 1px;font-size:12px}.hand-header span:first-child{font-weight:750;flex:1}.hand-header .btn{min-height:39px;padding:8px 11px}.hand{display:flex;overflow-x:auto;min-height:133px;padding:8px 3px 16px;scrollbar-width:thin;scrollbar-color:#bccce0 transparent}.playing-card{position:relative;flex:0 0 68px;width:68px;height:102px;margin-right:-13px;border:1px solid #e0e5ed;border-radius:12px;background:#fff;box-shadow:0 3px 5px #27435d1c;display:flex;flex-direction:column;align-items:flex-start;padding:8px;color:#1d2b45;user-select:none}.playing-card.red{color:#f0446b}.playing-card.joker{color:#5a44f1;background:#f5f3ff}.playing-card strong{font-size:20px}.playing-card .suit{font-size:26px;align-self:center;margin-top:13px}.playing-card.selected{transform:translateY(-11px);border:2px solid #5b4aff;box-shadow:0 3px 10px #5b4aff44;z-index:2}.current-cards .playing-card{flex-basis:47px;width:47px;height:72px;margin-right:-5px;padding:5px}.current-cards .playing-card strong{font-size:15px}.current-cards .playing-card .suit{font-size:18px;margin-top:5px}.result-banner{text-align:center;padding:25px 12px;background:linear-gradient(120deg,#5542ff,#aa70ff);color:#fff}.result-banner .trophy{font-size:45px}.result-banner h1{font-size:22px;margin:6px}.result-list{margin:14px 0;overflow:hidden}.result-line{display:flex;align-items:center;gap:9px;padding:13px;border-bottom:1px solid #edf0f5}.result-line:last-child{border:0}.result-line .who{flex:1}.result-line small{display:block;color:#95a5bb;font-size:10px;margin-top:3px}.positive{color:#119d6a;font-weight:800}.negative{color:#ee5970;font-weight:800}.copy{border:0;background:transparent;color:#5140ff;font-size:11px}.form-row{display:flex;gap:8px;align-items:center;margin-top:10px}.form-row label{font-size:12px;min-width:68px}.form-row select{flex:1}.hint{color:#8193ad;font-size:11px;line-height:1.55;margin-top:9px}#toast{position:fixed;z-index:50;left:50%;bottom:calc(80px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(20px);width:max-content;max-width:calc(100vw - 32px);background:#1b2851;color:#fff;border-radius:12px;padding:11px 14px;font-size:12px;opacity:0;pointer-events:none;transition:.2s}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.avatar-img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}.upload-label{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border:1px solid #d8e1f1;border-radius:11px;background:#f5f7ff;color:#5042de;font-weight:700;font-size:12px;cursor:pointer}.upload-label input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.upload-row{display:flex;align-items:center;gap:12px;margin-top:12px}.upload-preview{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#eff1ff;font-size:25px;overflow:hidden}.modal-backdrop{position:fixed;z-index:40;inset:0;background:#11204199;display:flex;align-items:center;justify-content:center;padding:20px}.modal{width:min(100%,390px);padding:22px;border-radius:22px;background:#fff;box-shadow:0 20px 60px #0c1e4a44}.modal h2{margin:0 0 7px;font-size:20px}.modal p{margin:0 0 17px;color:#7385a0;font-size:12px;line-height:1.6}.modal label.field-label{display:block;font-weight:700;font-size:12px;margin:12px 0 7px}.modal .btn{width:100%;margin-top:18px}.share-btn{border:0;background:#eef0ff;color:#5140ff;border-radius:10px;min-height:44px;padding:0 9px;font-size:11px;font-weight:700}
.brandline strong{font-size:15px;letter-spacing:-.4px}.brandline .script{font-size:13px}.rank-face,.result-avatar{overflow:hidden}.result-avatar{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#f2f4ff;font-size:22px}.seat-actions{display:flex;gap:4px;justify-content:center}.seat-actions button,.seat-action{min-height:44px;border:0;background:#eff0ff;color:#5140ff;border-radius:9px;padding:0 8px;font-size:10px;font-weight:700}.seat-actions button:last-child:not(:first-child){background:#fff0f2;color:#d44768}.add-bot{width:100%;margin:4px 0 0;min-height:44px}.opponents{display:flex;gap:7px;margin:8px 0;overflow-x:auto;padding-bottom:3px}.opponents .seat{flex:0 0 105px;min-height:72px;padding:5px}.opponents .seat .face{width:29px;height:29px;font-size:20px}.opponents .seat strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:95px}.rule-line strong{font-size:12px}.seat-grid .seat{min-height:105px}

.avatar-choice .avatar-img{border-radius:9px}.upload-tile{display:grid;place-items:center;color:#5747e6;font-size:27px;cursor:pointer;position:relative}.upload-tile input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.save-settings{width:100%;margin-top:14px}
.brandline .script{font-family:ui-rounded,"SF Pro Rounded","Arial Rounded MT Bold","PingFang SC",system-ui,sans-serif;font-style:normal;font-weight:800;font-size:13px;letter-spacing:.02em;color:#6648ed;background:#f2efff;border-radius:8px;padding:3px 6px}
.profile-summary{display:flex;align-items:center;gap:12px;padding:17px;min-height:84px}.profile-face{width:48px;height:48px;flex:none;border-radius:14px;background:#f0f1ff;display:grid;place-items:center;font-size:28px;overflow:hidden}.profile-details{flex:1;min-width:0}.profile-details strong{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-details small{display:block;color:#91a3bc;font-size:11px;margin-top:4px}.profile-summary .btn{min-height:44px;padding:8px 11px;font-size:11px}.modal .avatar-grid{margin-top:8px}.modal .avatar-choice{min-height:44px}

.hand{padding-top:23px;min-height:150px;padding-right:18px}.hand .playing-card{transition:transform .16s,border-color .16s}.turn-banner{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-top:9px;border-radius:13px;background:#fff4df;color:#a75c00;border:1px solid #ffda91}.turn-banner.my-turn{background:#eeeaff;color:#5140ff;border-color:#b6a9ff}.history-table{padding:38px 10px 10px;justify-content:flex-start;overflow:hidden}.table-history{width:100%;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px}.history-play{border-radius:12px;margin-bottom:10px;padding:8px;background:#ffffff80;border:1px solid #e4eafa}.history-play.latest{background:#fff;border-color:#a999ff;box-shadow:0 3px 12px #5840ff12}.history-play .current-cards{margin:7px 0 0;flex-wrap:wrap;overflow:visible}.history-table .requirement{margin-top:8px;flex-shrink:0;font-size:10px;border-radius:10px}.arrive-self{animation:play-up .4s ease-out both}.arrive-opponent{animation:play-down .4s ease-out both}@keyframes play-up{from{opacity:0;transform:translateY(85px) scale(.82)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes play-down{from{opacity:0;transform:translateY(-65px) scale(.82)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.arrive-self,.arrive-opponent{animation:none}}

/* Printed playing cards and a continuous overlapping discard spread. */
.playing-card{width:76px;flex-basis:76px;height:112px;padding:0;border:1px solid #d9d5cc;border-radius:7px;background:linear-gradient(115deg,#fffefa,#fff 60%,#f7f5ef);box-shadow:0 2px 3px #29384a30,inset 0 0 0 2px #fff;color:#20232b;overflow:hidden;font-family:Georgia,"Times New Roman",serif}.playing-card.red{color:#c92737}.playing-card.joker{background:linear-gradient(115deg,#fffefa,#fff 60%,#f7f5ef);color:#263644}.playing-card.joker.red{color:#c92737}.card-corner{position:absolute;top:5px;left:5px;display:flex;align-items:center;flex-direction:column;line-height:.95;z-index:2}.card-corner b{font-size:17px;letter-spacing:-1px}.card-corner i{font-style:normal;font-size:15px;margin-top:2px}.card-corner.bottom{top:auto;left:auto;bottom:5px;right:5px;transform:rotate(180deg)}.pip-art{position:absolute;inset:17px 14px}.pip-art span{position:absolute;font-size:17px;line-height:1}.ace-art{position:absolute;inset:0;display:grid;place-items:center;font-size:43px}.court-art{position:absolute;inset:14px 16px}.court-art svg,.joker-art svg{width:100%;height:100%;display:block}.joker-art{position:absolute;inset:9px 14px 15px}.joker-art span{position:absolute;bottom:-8px;left:0;right:0;font-family:"PingFang SC",sans-serif;font-size:10px;font-weight:800;text-align:center}.card-corner .joker-word{writing-mode:vertical-rl;font-size:9px;letter-spacing:1px}.history-table{background:radial-gradient(ellipse at center,#edf3ff,#e1eaf8);padding:38px 8px 9px}.table-history{display:flex;flex-wrap:wrap;align-content:flex-start;align-items:flex-start;gap:0;padding:16px 10px 24px}.history-play,.history-play.latest{flex:0 0 auto;max-width:100%;border:0;background:transparent;border-radius:0;box-shadow:none;padding:0;margin:0 -8px 13px 0;transform:translateY(var(--shift)) rotate(var(--tilt));position:relative}.history-play .play-label{display:none}.history-play.latest{z-index:3}.history-play.latest:after{content:"最新";position:absolute;bottom:-7px;right:0;font:600 9px system-ui;color:#fff;background:#6652ed;border-radius:5px;padding:2px 4px;box-shadow:0 1px 3px #0002}.history-play .current-cards{margin:0;padding:0;display:flex;flex-wrap:nowrap;overflow:visible}.current-cards .playing-card{width:57px;flex-basis:57px;height:84px;padding:0;margin-right:-22px;pointer-events:none;box-shadow:0 2px 5px #27324940}.current-cards .playing-card:last-child{margin-right:0}.current-cards .card-corner{top:3px;left:3px}.current-cards .card-corner.bottom{top:auto;left:auto;bottom:3px;right:3px}.current-cards .card-corner b{font-size:13px}.current-cards .card-corner i{font-size:11px}.current-cards .card-corner .joker-word{font-size:7px}.current-cards .pip-art{inset:14px 11px}.current-cards .pip-art span{font-size:12px}.current-cards .court-art{inset:12px}.current-cards .ace-art{font-size:32px}.current-cards .joker-art{inset:8px 12px 13px}.current-cards .joker-art span{font-size:8px}.hand .playing-card{flex-shrink:0}.arrive-self{animation:stack-up .4s ease-out both}.arrive-opponent{animation:stack-down .4s ease-out both}@keyframes stack-up{from{opacity:0;transform:translateY(100px) rotate(0deg) scale(.85)}to{opacity:1;transform:translateY(var(--shift)) rotate(var(--tilt))}}@keyframes stack-down{from{opacity:0;transform:translateY(-65px) rotate(0deg) scale(.85)}to{opacity:1;transform:translateY(var(--shift)) rotate(var(--tilt))}}@media(prefers-reduced-motion:reduce){.arrive-self,.arrive-opponent{animation:none}}

.table-history{overflow-x:hidden;scrollbar-width:thin}.history-play .current-cards{gap:0}

/* Use the actual webview content height, including WeChat toolbar changes. */
.in-game .shell{height:var(--visible-height,100dvh);min-height:0;display:flex;flex-direction:column;padding:8px 12px 0;overflow:hidden}
.in-game .topbar,.in-game .top-room{display:none}
.in-game .main{flex:1;min-height:0;display:flex;flex-direction:column;padding-top:0}
.in-game .turn-banner{margin:0;min-height:38px;flex-shrink:0;font-size:12px}
.in-game .opponents{flex-shrink:0;margin:6px 0;max-height:87px}
.in-game .history-table{flex:1;min-height:90px;height:auto;max-height:none;padding-top:32px}
.in-game .hand-header{flex-shrink:0;margin:6px 0 0;min-height:44px}
.in-game .hand-header .btn{min-height:44px}
.in-game .hand{flex-shrink:0;height:145px;min-height:0;padding-top:20px;padding-bottom:12px}
.in-game .bottom-nav{position:static;transform:none;width:auto;flex-shrink:0;margin:0 -12px;padding-bottom:max(6px,env(safe-area-inset-bottom));box-shadow:none}
.in-game .nav-item{height:46px}
.admin-entry{display:block;margin:26px auto 8px;min-height:44px;border:0;background:transparent;color:#929db0;font-size:11px}
.admin-modal{max-height:min(90dvh,680px);overflow:auto}.admin-option{display:block;width:100%;min-height:76px;text-align:left;margin:10px 0;padding:12px 14px;border:1px solid #dce5f4;border-radius:14px;background:#f7f9ff;color:#283656;cursor:pointer}.admin-option strong,.admin-option small{display:block}.admin-option strong{font-size:14px;color:#4f40e8}.admin-option small{margin-top:5px;font-size:11px;line-height:1.55;color:#667890}.admin-option:active{transform:scale(.99);background:#eef0ff}
.join-row .join-submit{flex:none;min-width:112px;padding:10px 12px;white-space:nowrap;border-radius:11px;box-shadow:0 5px 12px #5140ff26}.join-submit span{margin-left:3px;font-size:17px;vertical-align:-1px}.join-submit:disabled{background:#e7ebf5;color:#8d9ab0;box-shadow:none;opacity:1}.join-row .input{flex:1;font-variant-numeric:tabular-nums;letter-spacing:.2px}
.room-foot .btn{min-height:44px;padding:9px 13px;white-space:nowrap}
.table-chat{position:absolute;left:7px;bottom:40px;z-index:22;width:min(88%,320px);pointer-events:none;text-align:left}
.chat-danmaku{display:flex;flex-direction:column;align-items:flex-start;gap:3px;max-height:74px;overflow:hidden;margin-bottom:4px}
.danmaku-line{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 8px;border-radius:12px;background:#17284bcc;color:#fff;font-size:10px;line-height:1.35;box-shadow:0 2px 8px #1a2b4b24;animation:danmaku-in .22s ease-out}
.danmaku-line strong{color:#ffe49b}.danmaku-line.emote{background:#493bd9dc}
.chat-toggle{position:relative;pointer-events:auto;display:flex;align-items:center;gap:5px;min-height:35px;padding:0 11px;border:1px solid #ffffffd9;border-radius:18px;background:#fffffff2;color:#4e43d5;font-weight:750;font-size:12px;box-shadow:0 3px 9px #28385525}
.chat-toggle i{position:absolute;right:-4px;top:-5px;min-width:16px;height:16px;padding:0 4px;display:grid;place-items:center;border-radius:9px;background:#ff6e64;color:white;font-size:9px;font-style:normal}
.chat-panel{pointer-events:auto;display:flex;flex-direction:column;gap:5px;max-height:225px;padding:7px;border:1px solid #dce5f4;border-radius:14px;background:#fffffff2;box-shadow:0 6px 18px #1b2e5140;backdrop-filter:blur(8px)}
.chat-panel{min-height:0;max-height:min(252px,100%)}
.table-chat.open{top:7px;bottom:39px;width:min(90%,320px);display:flex;flex-direction:column;justify-content:flex-end}
.chat-panel-head{display:flex;align-items:center;gap:6px;min-height:22px;color:#243453;font-size:11px}.chat-panel-head span{margin-left:auto;color:#92a0b4;font-size:9px}.chat-close{width:28px;height:26px;border:0;border-radius:8px;background:#f0f2ff;color:#5140ff;font-size:18px}
.chat-messages{display:flex;flex:1 1 auto;flex-direction:column;gap:4px;min-height:24px;max-height:64px;overflow-y:auto;padding:2px 3px;scrollbar-width:thin}
.chat-line{display:flex;align-items:flex-start;gap:5px;color:#33445f;font-size:10px;line-height:1.35}.chat-line.emote{color:#5041d9}.chat-name{flex:none;color:#8392a9;font-weight:700}.chat-empty{padding:7px 2px;color:#98a5b8;font-size:10px}
.chat-recipient{display:flex;align-items:center;gap:6px;color:#77869d;font-size:9px}.chat-recipient select{min-width:0;flex:1;height:26px;padding:0 6px;border:1px solid #e0e6f0;border-radius:8px;background:#f8faff;color:#384968;font-size:10px}
.emote-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.emote-button{min-width:0;min-height:34px;padding:2px;border:1px solid #e7eafa;border-radius:9px;background:#f8f8ff;font-size:19px;line-height:1;transition:transform .16s,background .16s}
.emote-button:active{transform:scale(1.16);background:#efedff}
.chat-compose{display:flex;gap:5px}.chat-compose input{flex:1;min-width:0;height:31px;padding:0 9px;border:1px solid #e1e7f0;border-radius:9px;background:#f8faff;font-size:11px;outline:none}.chat-compose input:focus{border-color:#6553ed;box-shadow:0 0 0 2px #6553ed22}.chat-compose button{min-width:45px;padding:0 8px;border:0;border-radius:9px;background:#5544ed;color:white;font-size:10px;font-weight:700}.chat-compose button:disabled{background:#dfe4ef;color:#929db0}
.flying-emote{position:fixed;z-index:110;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#ffffffea;font-size:25px;box-shadow:0 4px 12px #26365045;pointer-events:none}
.reaction-hit{animation:reaction-hit .58s ease-out}@keyframes reaction-hit{35%{filter:brightness(1.15);box-shadow:0 0 0 4px #ffcf5c,0 5px 17px #ffad47aa}}
@keyframes danmaku-in{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.danmaku-line,.reaction-hit{animation:none}}
@media(max-height:620px){.in-game .opponents .seat{min-height:54px}.in-game .opponents .seat .face{height:22px;width:22px;font-size:16px}.in-game .hand{height:125px}.in-game .hand .playing-card{height:98px;width:68px;flex-basis:68px}.in-game .requirement{padding:3px 6px;font-size:9px}.in-game .nav-item{height:40px}}

.table-history{position:relative;display:grid;place-items:center;overflow:hidden;padding:20px;isolation:isolate}.history-play,.history-play.latest{grid-area:1/1;margin:0;max-width:100%;transform:translate(calc(var(--shift) * 1.6),var(--shift)) rotate(var(--tilt))}.history-play.latest{z-index:6;transform:rotate(-2deg)}.history-play:not(.latest){pointer-events:none}.history-play .current-cards{justify-content:center}.history-play.latest .playing-card{margin-right:-16px}.history-play.latest .playing-card:last-child{margin-right:0}.history-play.latest:after{content:'最近一手';bottom:-18px;right:0;white-space:nowrap}.history-play.arrive-self{animation:pile-up .35s ease-out}.history-play.arrive-opponent{animation:pile-down .35s ease-out}@keyframes pile-up{from{opacity:0;transform:translateY(90px) rotate(8deg)}to{opacity:1;transform:rotate(-2deg)}}@keyframes pile-down{from{opacity:0;transform:translateY(-70px) rotate(-12deg)}to{opacity:1;transform:rotate(-2deg)}}@media(prefers-reduced-motion:reduce){.history-play.arrive-self,.history-play.arrive-opponent{animation:none}}

/* Physical scatter on a compact felt table. */
.history-play,.history-play.latest{transform:translate(var(--dx),var(--dy)) rotate(var(--tilt));z-index:var(--pile-layer)}.history-play.latest{z-index:10}.history-play.arriving{z-index:11}.history-play.latest:after{content:'最近一手';transform:rotate(calc(-1 * var(--tilt)))}.table-history{padding:18px 48px 24px}.history-play .current-cards{filter:drop-shadow(0 3px 3px #27324935)}
.draw-deck{position:absolute;left:9px;top:12px;width:49px;z-index:12;display:flex;flex-direction:column;align-items:center;gap:1px;color:#46577f;font-size:10px}.draw-deck strong{font:800 12px system-ui}.draw-deck small{font-size:9px;white-space:nowrap}.deck-stack{position:relative;width:38px;height:52px;margin-bottom:3px}.deck-stack span,.flying-card-back{display:block;width:35px;height:49px;border-radius:4px;border:2px solid white;background:repeating-linear-gradient(45deg,#5f55bb 0 2px,#312f80 2px 4px);box-shadow:0 1px 3px #15253f66}.deck-stack span{position:absolute;left:0;top:0}.deck-stack span:nth-child(2){left:2px;top:2px}.deck-stack span:nth-child(3){left:4px;top:4px}.flying-card-back{position:fixed;z-index:100;width:50px;height:73px;pointer-events:none}
.turn-warning{position:absolute;right:9px;top:12px;z-index:12;display:none;flex-direction:column;align-items:center;gap:3px;color:#d54431;font-size:9px}.turn-warning.active{display:flex}.turn-warning small{white-space:nowrap}.warning-lamp{width:32px;height:32px;border:3px solid #fff;border-radius:50%;background:conic-gradient(from 0deg,#ff4b34 0 60deg,#ffe7b4 60deg 115deg,#f53925 115deg 180deg,#ffe7b4 180deg 240deg,#ff4b34 240deg 300deg,#ffe7b4 300deg);box-shadow:0 0 11px #ff693caa;animation:warning-rotate .75s linear infinite}.warning-lamp:after{content:'';display:block;width:12px;height:12px;margin:7px;border-radius:50%;background:#fff5d5;box-shadow:0 0 4px white}@keyframes warning-rotate{to{transform:rotate(360deg)}}
.playing-card{border-color:#d6d2c9;background:linear-gradient(135deg,#fffffc,#f8f5ec);box-shadow:0 2px 5px #14192138,inset 0 0 0 2px white}.court-art{filter:contrast(1.14) saturate(.78)}.court-art svg{background:#f5ead5;border:1px solid #baa777}.joker-art{filter:contrast(1.13) saturate(.72)}@media(prefers-reduced-motion:reduce){.warning-lamp{animation:none}.history-play.arriving{animation:none}}

.draw-deck.empty .deck-stack{border:1px dashed #9eaac2;border-radius:5px}.draw-deck.empty .deck-stack span{display:none}

/* Original vector emotes with touch and mouse drag-to-player targeting. */
.danmaku-line{display:flex;align-items:center;gap:5px;background:rgba(70,58,159,.43);border:1px solid rgba(255,255,255,.42);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);box-shadow:0 3px 12px #23305118;color:#fff;text-shadow:0 1px 3px #20234d55}
.danmaku-line strong{flex:none;color:#fff1bd}.danmaku-line.emote{background:rgba(78,63,168,.38)}
.danmaku-target{flex:none;color:#f7e6a8;font-size:9px;opacity:.9}
.danmaku-line .message-emote{width:20px;height:20px;flex:none}.danmaku-line .emote-message{gap:3px;color:#fff}
.chat-panel{max-height:min(55dvh,360px);background:rgba(247,249,255,.84);border-color:#ffffffc9;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.chat-panel-head span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-messages{flex:0 1 auto;min-height:34px;max-height:62px}
.chat-line{align-items:center}.chat-line .emote-message{gap:3px}.chat-to{flex:none;color:#939bb9;font-size:9px}
.emote-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;flex:0 1 auto;min-height:0;max-height:172px;overflow-y:auto;overscroll-behavior:contain;padding:1px 2px;scrollbar-width:thin;touch-action:pan-y}
.emote-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:40px;padding:2px;border-radius:10px;background:rgba(255,255,255,.7);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
.emote-button>span{font-size:8px;line-height:1.1;color:#667391;white-space:nowrap}
.emote-button:active{transform:scale(1.08);background:#eeedff}
.emote-art{display:block;width:31px;height:32px;flex:none;overflow:visible;filter:drop-shadow(0 1.5px 1.5px #35405b28)}
.chat-line .emote-art{width:26px;height:27px}.chat-empty{padding:3px 2px}
.emote-drop{position:relative;transition:transform .16s,box-shadow .16s,outline-color .16s}
.emote-drop.drop-ready{z-index:3;transform:scale(1.13);outline:3px solid #ffca49;outline-offset:2px;box-shadow:0 0 0 7px #ffd66c55,0 0 19px #ffbf45aa}
.emote-drop.drop-ready:after{content:'松开发送';position:absolute;left:50%;bottom:-20px;transform:translateX(-50%);padding:2px 6px;border-radius:8px;background:#5142d9;color:white;font-size:8px;white-space:nowrap;box-shadow:0 2px 6px #23305133}
.table-chat.open>.chat-toggle{display:none}
.emote-button.dragging{opacity:.38;transform:scale(.92)}
.emote-drag-ghost{position:fixed;z-index:250;width:50px;height:50px;display:grid;place-items:center;border:1px solid #ffffffbd;border-radius:16px;background:rgba(255,255,255,.78);backdrop-filter:blur(8px);box-shadow:0 8px 22px #27335748;pointer-events:none;will-change:left,top}
.emote-drag-ghost .emote-art{width:42px;height:43px}
.flying-emote{background:rgba(255,255,255,.74);border:1px solid #ffffffd9;backdrop-filter:blur(5px)}
.flying-emote .emote-art{width:36px;height:37px}
@media(max-height:680px){.chat-panel{max-height:58dvh}.emote-row{max-height:125px}.emote-button{min-height:36px}.emote-button .emote-art{width:27px;height:27px}}
@media(prefers-reduced-motion:reduce){.emote-drop,.emote-button{transition:none}}

.hand-advice{display:block;font-size:9px;line-height:1.15;color:#6752da;font-weight:600}.hand-advice.no-play{color:#bd6a16}

/* Ordered physical layers make overlapping hand cards readable. */
.hand .playing-card{position:relative;z-index:var(--hand-layer,1);margin-right:-9px;box-shadow:1px 2px 0 #c9c6bf,2px 4px 8px #24344c36,inset 0 0 0 2px #fff;transition:transform .18s ease,box-shadow .18s ease}
.hand .playing-card:hover,.hand .playing-card:focus-visible{z-index:90;transform:translateY(-5px)}
.hand .playing-card.selected,.hand .playing-card.selected:hover{z-index:100;transform:translateY(-12px);box-shadow:0 8px 16px #5644df55,0 0 0 2px #6550ff}
.hand .playing-card.sorting-in{visibility:hidden}
@media(max-width:370px){.hand .playing-card{margin-right:-11px}}

/* Red woven backs on the draw pile and the flying card. */
.deck-stack span,.flying-card-back{border:2px solid #fff8ec;background-color:#ad2730;background-image:radial-gradient(ellipse at center,#de595a 0 13%,transparent 14%),repeating-linear-gradient(45deg,#f3b8a350 0 1px,transparent 1px 7px),repeating-linear-gradient(-45deg,#f3b8a350 0 1px,transparent 1px 7px),linear-gradient(135deg,#c73c43,#8f1b27);box-shadow:0 1px 3px #57202b77,inset 0 0 0 2px #ad2730,inset 0 0 0 4px #f4d7b7}
.deck-stack span:after,.flying-card-back:after{content:"";position:absolute;inset:7px;border:1px solid #f6dbc2;border-radius:2px;background:repeating-linear-gradient(90deg,transparent 0 4px,#f5d5bc40 4px 5px),repeating-linear-gradient(0deg,transparent 0 4px,#f5d5bc40 4px 5px);pointer-events:none}
.deck-stack span{position:absolute}

.wechat-avatar-choice{display:flex;align-items:center;gap:10px;min-height:52px;margin-top:11px;padding:7px 11px;border:1px solid #bbdfc5;border-radius:12px;background:#f1fbf3;color:#206e3e;cursor:pointer;position:relative}
.wechat-avatar-choice .wechat-mark{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:9px;background:#15b64a;color:#fff;font-weight:800;font-size:14px}
.wechat-avatar-choice strong,.wechat-avatar-choice small{display:block}.wechat-avatar-choice strong{font-size:12px}.wechat-avatar-choice small{margin-top:2px;color:#659174;font-size:10px}
.wechat-avatar-choice input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.wechat-avatar-choice:focus-within{outline:2px solid #21b65a;outline-offset:2px}

/* Swipeable player strip preserves table height in six to eight player games. */
.opponent-strip{position:relative;flex-shrink:0}
.opponent-strip .opponents{scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch;touch-action:pan-x}
.opponent-strip .opponents::-webkit-scrollbar{display:none}
.opponent-strip .seat{scroll-snap-align:center}
.opponent-strip.many .opponents{margin:6px 0;padding:0 42px 4px}
.opponent-arrow{position:absolute;top:50%;z-index:8;transform:translateY(-50%);width:44px;height:44px;border:1px solid #d6ddf7;border-radius:50%;background:#fffffff0;color:#5543dc;font-size:25px;line-height:1;box-shadow:0 3px 9px #26315c24}
.opponent-arrow.prev{left:0}.opponent-arrow.next{right:0}

.opponent-strip.many .opponents{width:calc(100% - 88px);margin:6px 44px;padding:0;gap:7px;scroll-snap-type:x mandatory}
.opponent-strip.many .opponents .seat{flex:0 0 calc((100% - 7px)/2);max-width:none}
.opponent-strip.many .opponent-arrow.prev{left:0}.opponent-strip.many .opponent-arrow.next{right:0}

/* Prominent turn call without obscuring cards. */
.in-game .turn-banner.my-turn{position:relative;overflow:hidden;background:linear-gradient(105deg,#eeeaff,#dcd4ff,#f2e9ff);border:2px solid #7055ef;color:#4932c8;box-shadow:0 0 0 2px #7460ee22,0 3px 12px #6d4df255;animation:turn-glow 1.25s ease-in-out infinite alternate}
.in-game .turn-banner.my-turn strong{font-size:14px;letter-spacing:.02em}
.in-game .turn-banner .turn-spark{font-size:18px;line-height:1}
.in-game .turn-banner.my-turn .turn-spark{animation:turn-ring .58s ease-in-out 3;transform-origin:50% 20%}
.turn-call{position:absolute;right:9px;top:50%;transform:translateY(-50%);padding:3px 6px;border-radius:7px;background:#6447e9;color:white;font-size:9px;font-weight:800}
@keyframes turn-glow{to{box-shadow:0 0 0 4px #7460ee55,0 5px 18px #6d4df288}}
@keyframes turn-ring{25%{transform:rotate(17deg)}75%{transform:rotate(-17deg)}}
@media(prefers-reduced-motion:reduce){.in-game .turn-banner.my-turn,.in-game .turn-banner.my-turn .turn-spark{animation:none}}

.victory-confetti{position:fixed;inset:0;z-index:90;pointer-events:none;overflow:hidden}
.victory-confetti i{position:absolute;width:9px;height:14px;border-radius:2px;box-shadow:0 1px 2px #0002;will-change:transform,opacity}
