/* Original three-player card room: midnight glass, petrol-blue felt, champagne gold. */
body[data-app-id=doudizhu],html[data-theme=dark] body[data-app-id=doudizhu]{--bg:#0c142b;--paper:#18243e;--ink:#f3f0e6;--muted:#a5b6d0;--line:#afc9e627;--accent:#e8c586;--accent-soft:#8acddd12;--ddz-gold:#edca85;--ddz-cyan:#87e1df;--ddz-purple:#b7a8f4;--ddz-shell-height:calc(100dvh - 52px);margin:0;background:radial-gradient(ellipse at 30% 20%,#283c6545,transparent 62%),radial-gradient(ellipse at 80% 90%,#48356e40,transparent 50%),#0c142b;color:var(--ink);color-scheme:dark;min-width:280px;overflow-x:hidden}
body[data-app-id=doudizhu] .tool-topbar{height:52px;min-height:52px;max-width:none;padding:4px max(18px,calc((100vw - 1192px)/2));gap:12px;background:linear-gradient(90deg,#111b31ee,#25324eaa,#111b31ee);border-bottom:1px solid #adcae52c;align-items:center}
body[data-app-id=doudizhu] .ddz-page-title{display:flex;align-items:center;gap:9px;font:750 20px/1.3 "Microsoft YaHei","PingFang SC",sans-serif;letter-spacing:2px;white-space:nowrap;color:#f3e0bb}
body[data-app-id=doudizhu] .ddz-page-title:before{content:"♦";display:grid;place-items:center;width:29px;height:29px;border:1px solid #e8c48980;border-radius:7px;background:linear-gradient(135deg,#4a5273,#26334d);box-shadow:inset 0 0 0 3px #202e43,0 3px 8px #020a1f40;color:#efd29a;font:25px/1 Georgia,serif;letter-spacing:0;transform:rotate(-7deg)}
body[data-app-id=doudizhu] .tool-topbar .header-actions{display:flex;flex-direction:row;align-items:center;gap:13px;flex-wrap:nowrap}body[data-app-id=doudizhu] .back-link{font-size:11px;color:#b3c4d7}body[data-app-id=doudizhu] .theme-control{font-size:0;gap:0}body[data-app-id=doudizhu] .theme-control select{font-size:10px;background:#17243a;border-color:#a2bdd33b;color:#d4deed;min-height:36px;border-radius:6px}
body[data-app-id=doudizhu] .tool-main{height:var(--ddz-shell-height);max-width:1240px;padding:10px 20px 8px;margin:auto;min-height:0}
.ddz-symbols{position:absolute;width:0;height:0;overflow:hidden}.ddz-room{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 288px;grid-template-rows:26px auto minmax(0,1fr);grid-template-areas:"meta meta" "game access" "game chat";gap:10px 20px;align-items:stretch}
.ddz-room-meta{grid-area:meta;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;border-bottom:1px solid #b0c8e31f;padding-bottom:5px}.ddz-room-meta h2{font-size:11px;letter-spacing:1px;color:#c3cfe1;white-space:nowrap;font-weight:550}.ddz-room-meta h2>span{color:var(--ddz-gold);margin-right:3px}.ddz-presence{display:flex;align-items:center;gap:12px;font-size:10px;color:#94b2cd;white-space:nowrap}#ddz-connection{display:inline-flex;align-items:center;gap:5px}#ddz-connection:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:#a2b1c4}#ddz-connection[data-state=connected]:before{background:#91ddd0;box-shadow:0 0 7px #7bbfe270}#ddz-connection[data-state=offline]:before,#ddz-connection[data-state=reconnecting]:before{background:#e4b274}#ddz-reconnect{border:0;background:transparent;color:#edce91;text-decoration:underline;font-size:10px;padding:0;min-height:24px}
.ddz-primary,.ddz-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 14px;border-radius:9px;font:600 12px/1.4 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;letter-spacing:.3px;cursor:pointer;transition:filter .15s,translate .15s,border-color .15s;white-space:nowrap}.ddz-primary{color:#24324a;background:linear-gradient(145deg,#f6e0aa,#d8ad68);border:1px solid #f1d293;box-shadow:inset 0 1px 0 #fff5d4b0,0 3px 0 #8067426b,0 5px 12px #06122638}.ddz-secondary{color:#d9e4f0;background:linear-gradient(145deg,#31415cbb,#22334c99);border:1px solid #a6c1db3d;box-shadow:inset 0 1px 0 #e2eff515,0 2px 0 #07132655}.ddz-primary:hover:not(:disabled),.ddz-secondary:hover:not(:disabled){filter:brightness(1.12);translate:0 -1px}.ddz-primary:active:not(:disabled),.ddz-secondary:active:not(:disabled){translate:0 1px}.ddz-primary:disabled,.ddz-secondary:disabled{opacity:.4;cursor:default}.ddz-danger{color:#ecab9b;border-color:#d1948052;background:#793e4433}
.ddz-access{grid-area:access;position:relative;align-self:start;padding:13px;background:linear-gradient(135deg,#33415e88,#192a4599);border:1px solid #b6c9e02d;border-radius:12px;box-shadow:inset 0 1px 0 #e1e8fc13,0 7px 20px #030d1e25}.ddz-access label{display:block;font-size:12px;color:#e2e8f2;font-weight:550;margin-bottom:8px}.ddz-login-row{display:flex;gap:8px}.ddz-login-row input{width:0;flex:1;min-width:0;min-height:44px;padding:9px 10px;border:1px solid #bfd2e340;border-radius:8px;background:#0c1b3199;color:#edf0f6;font-size:14px;box-shadow:inset 0 2px 5px #040b1b26}.ddz-login-row input::placeholder{color:#95a5bb;font-size:12px}.ddz-login-row button{padding-inline:12px}.ddz-access form>p{font-size:10px;color:#94aac5;margin-top:7px}.ddz-identity{display:flex;align-items:center;gap:9px;min-width:0;margin-bottom:11px}.ddz-identity-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;border:1px solid #c3b1e14d;background:linear-gradient(135deg,#69618d66,#203e5888);color:#d8c8f3;font:27px/1 Georgia,serif}.ddz-identity>div{min-width:0}.ddz-identity strong{display:block;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ddz-identity #ddz-my-role{display:block;font-size:10px;color:#9eb9ce;margin-top:2px}.ddz-seat-actions{display:flex;flex-wrap:wrap;gap:7px}.ddz-seat-actions>button{flex:1}.ddz-access:has(#ddz-seat-actions>button:not([hidden])) .ddz-identity{margin-bottom:10px}.ddz-access:not(:has(#ddz-seat-actions>button:not([hidden]))) .ddz-identity{margin-bottom:0}.ddz-access-error{position:absolute;left:6px;right:6px;top:calc(100% + 4px);z-index:50;background:#6f3235f0;border:1px solid #e9a39366;border-radius:7px;padding:8px 10px;font-size:11px;line-height:1.7;color:#ffe1d6;box-shadow:0 6px 15px #080d1e55}
.ddz-game{grid-area:game;display:flex;flex-direction:column;min-height:0;gap:6px;position:relative}.ddz-arena{position:relative;isolation:isolate;flex:1;min-height:105px;border:1px solid #9ab9db2b;border-radius:24px;overflow:hidden;background:radial-gradient(ellipse at center,#2852656e,transparent 68%),linear-gradient(130deg,#192e4ac9,#26304db5 62%,#233554dd);box-shadow:inset 0 1px 0 #a5e7e80c,0 14px 30px #050d202b}
.ddz-arena:before{content:"";position:absolute;z-index:-1;inset:16% 3% 4%;border:1px solid #bfd5c72c;border-radius:50% / 44%;background:radial-gradient(ellipse at 50% 35%,#32647b75,#1a4d5d4d 65%,#153750aa);box-shadow:inset 0 0 0 4px #071b2f22,inset 0 0 0 5px #e7ce8e19,inset 0 0 32px #06192d40,0 3px 0 #06192d35}.ddz-arena:after{content:"";position:absolute;z-index:-1;inset:21% 8% 9%;border:1px solid #a4cfc315;border-radius:50% / 44%;pointer-events:none}.ddz-table-pattern{position:absolute;inset:0;z-index:-1;display:grid;place-items:center;pointer-events:none;opacity:.24}.ddz-table-pattern>span{font:80px/1 Georgia,serif;color:#9cc6c7;transform:translateY(15px);text-shadow:0 0 40px #8ad3ca26}.ddz-table-pattern>i{position:absolute;width:50%;height:45%;border:1px solid #a3cace20;border-radius:50%;transform:rotate(-12deg)}
.ddz-table-top{position:absolute;left:50%;top:10px;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:6px;z-index:3}.ddz-bottom{display:flex;gap:5px;justify-content:center;min-height:39px}.ddz-bottom>.ddz-card-small{width:27px;height:38px}.ddz-card-back{display:grid;place-items:center;flex:none;width:27px;height:38px;border:1px solid #adc6de82;border-radius:4px;background:repeating-linear-gradient(45deg,#7cb7ce17 0,#7cb7ce17 1px,transparent 1px,transparent 5px),linear-gradient(135deg,#607ca9,#2b436c);box-shadow:inset 0 0 0 3px #304b75,inset 0 0 0 4px #d7e6f133,0 3px 5px #06172555;color:#dbe7efb3;font:19px Georgia,serif}.ddz-card-back:first-child{rotate:-7deg}.ddz-card-back:last-child{rotate:7deg}.ddz-stakes{display:flex;gap:7px;white-space:nowrap;align-items:center;font-size:9px;color:#acbfd4}.ddz-stakes>span:first-child{color:#e3c78d}.ddz-stakes>span:last-child{border-left:1px solid #b0c6dc3b;padding-left:7px}
.ddz-seat{position:relative;display:flex;align-items:center;flex-direction:column;min-width:0;color:#e4edf2}.ddz-seat-left,.ddz-seat-right{position:absolute;top:18px;width:130px;z-index:4}.ddz-seat-left{left:18px}.ddz-seat-right{right:18px}.ddz-portrait{position:relative;display:grid;place-items:center;flex:none;width:62px;height:62px;border:1px solid #b7c4e25c;border-radius:50%;background:radial-gradient(circle at 32% 25%,#586c936e,#233652e6);box-shadow:inset 0 0 0 4px #1c2b45,0 5px 15px #020f2445;color:#aec9e3}.ddz-portrait>svg:first-child{width:74%;height:74%;filter:drop-shadow(0 2px 2px #0a152c55)}.ddz-seat[data-role=landlord] .ddz-portrait{background:radial-gradient(circle at 30% 25%,#b08d4559,#473b40cc);border-color:#e8bb6999;color:#f5ce7e}.ddz-seat[data-role=farmer] .ddz-portrait{background:radial-gradient(circle at 30% 25%,#537d8666,#1b454fcc);border-color:#8acfc56b;color:#8ed9c4}.ddz-seat[data-active=true] .ddz-portrait{box-shadow:inset 0 0 0 4px #21364b,0 0 0 3px #e4d18c26,0 0 24px #f1ce6f1f;border-color:#edce7b}.ddz-seat[data-active=true] .ddz-seat-name{color:#fae2a3}.ddz-seat[data-connected=false] .ddz-portrait{filter:saturate(.45);opacity:.74}.ddz-seat-copy{min-width:0;max-width:100%;text-align:center;margin-top:5px}.ddz-seat-name{display:block;max-width:100%;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 2px 5px #081c32}.ddz-seat-detail{display:block;font-size:9px;color:#98b4c7;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;line-height:1.6}.ddz-seat-badge{position:absolute;left:50%;top:47px;translate:-50% 0;min-width:39px;padding:1px 7px;border:1px solid #a3bdd755;border-radius:5px;background:#263b59eb;color:#c2d7e4;font-size:9px;line-height:1.6;text-align:center;white-space:nowrap;box-shadow:0 2px 5px #07182a55}.ddz-seat[data-role=landlord] .ddz-seat-badge{color:#ffdfa2;border-color:#c5a0648c;background:#684e2df2}.ddz-seat[data-role=farmer] .ddz-seat-badge{color:#b7f0d9;border-color:#89c2b370;background:#235452f2}.ddz-seat-count{position:absolute;top:25px;left:calc(50% + 34px);padding:2px 5px;border-radius:5px;background:#0d233ab0;border:1px solid #a1c3d238;color:#e5e5cb;font-size:10px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}.ddz-seat-right .ddz-seat-count{left:auto;right:calc(50% + 34px)}
.ddz-seat-clock{position:absolute;inset:-5px;width:calc(100% + 10px);height:calc(100% + 10px);rotate:-90deg;opacity:0;overflow:visible;pointer-events:none}.ddz-clock-track{fill:none;stroke:#acc9d51c;stroke-width:2}.ddz-clock-progress{fill:none;stroke:#f3d18b;stroke-width:2.6;stroke-linecap:round;transition:stroke-dashoffset .25s linear;filter:drop-shadow(0 0 3px #e9c36c66)}.ddz-seat[data-active=true] .ddz-seat-clock{opacity:1}.ddz-seat-seconds{position:absolute;right:-7px;top:-4px;z-index:3;display:grid;place-items:center;min-width:22px;height:22px;padding:0 3px;border:1px solid #ffdf9ba6;border-radius:50%;background:#3e4456;color:#ffe4ac;font:700 11px/1 ui-monospace,Consolas,monospace;box-shadow:0 2px 6px #0c1b2a80}.ddz-seat[data-urgent=true] .ddz-clock-progress{stroke:#ff9d7b}.ddz-seat[data-urgent=true] .ddz-seat-seconds{color:#ffcfb6;border-color:#f7aa8e;background:#6b3c40;animation:ddz-clock-urgent 1.2s ease-in-out infinite}
.ddz-phase{position:absolute;z-index:2;left:50%;top:31%;translate:-50% 0;display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center;width:min(240px,45%);pointer-events:none}.ddz-phase strong{font-size:16px;letter-spacing:1px;color:#c3d6d9;text-shadow:0 2px 8px #09283d;font-weight:600}.ddz-phase>span{font-size:10px;color:#8db0c5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ddz-game[data-your-turn=true] .ddz-phase strong{color:#f1d59b;text-shadow:0 0 18px #d3c58f26}.ddz-game[data-phase=waiting] .ddz-phase{top:46%}.ddz-game[data-phase=waiting] .ddz-phase strong{font:700 24px/1.4 "KaiTi","STKaiti","SimSun",serif;letter-spacing:2px;color:#dce3d6}.ddz-game[data-phase=finished] .ddz-phase strong{color:#e8d09b}
.ddz-played{position:absolute;z-index:5;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;max-width:42%;pointer-events:none}.ddz-played-left{left:3%;top:44%}.ddz-played-right{right:3%;top:44%}.ddz-played-self{bottom:10px;left:50%;translate:-50% 0;max-width:64%}.ddz-combo-label{display:inline-block;font:650 11px/1.5 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;letter-spacing:.8px;color:#f0d5a1;text-shadow:0 2px 3px #122c3c;white-space:nowrap}.ddz-pass-mark{font:800 20px/1.4 "KaiTi","STKaiti","SimSun",serif;color:#b8ccd6;text-shadow:0 2px 0 #233e50,0 0 12px #081f31;letter-spacing:3px;rotate:-7deg}.ddz-played-cards{display:flex;flex-direction:column;gap:3px}.ddz-played-row{display:flex;justify-content:center;min-width:0}.ddz-played-row>.ddz-card+.ddz-card{margin-left:-12px}
.ddz-card{--card-width:52px;position:relative;flex:none;display:block;width:var(--card-width);height:calc(var(--card-width)*1.43);padding:0;border:1px solid #c7c6c1;border-radius:6px;background:linear-gradient(135deg,#fffef7,#f2f1e8 72%,#dbe0e0);color:#22334a;box-shadow:inset 0 1px 0 #fff,0 2px 0 #aeb5ba,0 4px 7px #02162c57;text-align:left;user-select:none;-webkit-user-select:none;transform-origin:50% 100%;font-family:Georgia,"Times New Roman",serif;overflow:hidden}.ddz-card[data-red=true]{color:#c04752}.ddz-card-corner{position:absolute;left:5px;top:4px;display:flex;flex-direction:column;align-items:center;line-height:1.05;z-index:1}.ddz-card-corner>b{font-size:clamp(12px,1.5vw,20px);font-weight:750;letter-spacing:-.7px}.ddz-card-corner>i{font-style:normal;font-size:14px;line-height:1.05}.ddz-card-pip{position:absolute;left:50%;top:50%;translate:-38% -25%;font-size:30px;line-height:1;text-shadow:0 1px #fff}.ddz-card-foot{position:absolute;right:4px;bottom:4px;rotate:180deg;font-size:9px;font-weight:700;line-height:1}.ddz-card[data-joker=true] .ddz-card-corner>b{font:750 10px/1.25 "Microsoft YaHei",sans-serif;writing-mode:vertical-rl;letter-spacing:1px}.ddz-card[data-joker=true] .ddz-card-pip{font-size:31px;translate:-34% -22%;color:#675596}.ddz-card[data-joker=true][data-red=true] .ddz-card-pip{color:#bc7b3f}.ddz-card-small{--card-width:28px;width:28px;height:40px;border-radius:3px;box-shadow:0 2px 0 #b2babd,0 3px 4px #08192d45}.ddz-card-small .ddz-card-corner{left:2px;top:2px}.ddz-card-small .ddz-card-corner>b{font-size:11px;letter-spacing:-.5px}.ddz-card-small .ddz-card-corner>i{font-size:9px}.ddz-card-small .ddz-card-pip{font-size:18px}.ddz-card-small .ddz-card-foot{font-size:6px;right:2px;bottom:2px}.ddz-card-small[data-joker=true] .ddz-card-corner>b{font-size:7px;letter-spacing:0}.ddz-card-small[data-joker=true] .ddz-card-pip{font-size:17px}
.ddz-command-bar{flex:none;min-height:44px;display:grid;place-items:center;padding:0 10px}.ddz-bid-actions,.ddz-play-actions{display:flex;align-items:center;justify-content:center;gap:9px;width:100%}.ddz-bid-actions>span{font-size:11px;color:#aabbd2;margin-right:3px}.ddz-command-bar button{min-width:77px;padding-inline:17px}.ddz-command-bar #ddz-play{min-width:112px}.ddz-command-bar p{font-size:12px;letter-spacing:.5px;color:#9eb6cd;text-align:center;line-height:1.5;margin:0}
.ddz-hand-zone{flex:none;min-height:0;position:relative;padding:0 10px 2px;border-radius:17px 17px 10px 10px;background:radial-gradient(ellipse at 50% 100%,#53658c25,transparent 75%)}.ddz-hand-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:31px;padding-inline:4px}.ddz-seat-self{flex-direction:row;gap:7px;min-width:0;max-width:65%}.ddz-seat-self .ddz-portrait{width:28px;height:28px;box-shadow:inset 0 0 0 2px #1c2b45}.ddz-seat-self .ddz-seat-copy{text-align:left;margin:0;min-width:0}.ddz-seat-self .ddz-seat-name{font-size:11px}.ddz-seat-self .ddz-seat-detail{display:none}.ddz-seat-self .ddz-seat-badge{position:static;translate:0 0;min-width:0;padding:1px 5px;order:3}.ddz-seat-self .ddz-seat-count{position:static;order:4;font-size:9px;background:transparent;border:0;padding:0}.ddz-seat-self .ddz-seat-seconds{width:17px;min-width:17px;height:17px;font-size:9px;right:-5px;top:-5px}.ddz-seat-self .ddz-seat-clock{inset:-3px;width:calc(100% + 6px);height:calc(100% + 6px)}#ddz-selection-status{font-size:10px;color:#b9c8d5;white-space:nowrap}.ddz-hand{position:relative;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1px;padding:0 0 3px;touch-action:none}.ddz-hand-row{display:flex;justify-content:center;position:relative;min-width:0;max-width:100%;padding-top:12px;--card-overlap:12px}.ddz-hand-row>.ddz-card{rotate:var(--card-tilt,0deg);transition:translate .13s,filter .13s,box-shadow .13s;cursor:pointer;touch-action:none;outline-offset:1px}.ddz-hand-row>.ddz-card+.ddz-card{margin-left:calc(-1*var(--card-overlap))}.ddz-hand-row>.ddz-card[data-selected=true]{translate:0 -10px;rotate:0deg;z-index:30;border-color:#f9d28a;box-shadow:0 0 0 2px #ecd699,0 3px 0 #aa8d5a,0 6px 13px #020c275e;filter:brightness(1.06)}.ddz-hand-row>.ddz-card[data-selected=true]:after{content:"✓";position:absolute;right:3px;bottom:4px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#457a82;color:#fff8d7;font:800 10px/1 sans-serif;rotate:0deg}.ddz-hand-row>.ddz-card:hover{filter:brightness(1.05)}.ddz-hand-row>.ddz-card:focus-visible{outline:2px solid #c3f1ed;z-index:40}.ddz-hand-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:10px 5px 8px;min-height:55px}.ddz-hand-empty>span{font:23px/1 Georgia,serif;letter-spacing:8px;color:#a3b8d84d}.ddz-hand-empty p{font-size:10px;line-height:1.5;color:#829bbd}.ddz-hand-zone[data-spectator=true] .ddz-hand-heading{opacity:.8}
.ddz-table-tools{flex:none;min-height:44px;display:flex;align-items:center;gap:7px;padding-inline:10px}.ddz-table-tools button{min-height:44px;padding:8px 13px;font-size:11px}.ddz-table-tools #ddz-chat-open{border-color:#8ccbd461;color:#c5edeb;background:linear-gradient(#2f526a99,#21334d99)}.ddz-table-tools #ddz-sound[aria-pressed=true]{border-color:#cfb6875e;color:#ead7a8;background:#9b884821}#ddz-hand-note{margin-left:auto;color:#7894b4;font-size:9px;white-space:nowrap}.ddz-unread{display:inline-grid;place-items:center;flex:none;min-width:17px;height:17px;margin-left:4px;padding:0 4px;border-radius:11px;background:linear-gradient(#ed9b7d,#bd5b69);color:#fff2dc;font:700 9px/1 sans-serif;box-shadow:0 0 9px #eead7f2e}
.ddz-effect{position:absolute;z-index:25;left:50%;top:51%;transform:translate(-50%,-50%);width:max-content;max-width:93%;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;pointer-events:none;color:#ffe1a5;isolation:isolate}.ddz-effect:before{content:"";position:absolute;z-index:-1;inset:-30%;border-radius:50%;background:radial-gradient(ellipse,#1b263ddd,#18284130 65%,transparent);filter:blur(3px)}#ddz-effect-icon{font:45px/1 Georgia,serif;text-shadow:0 0 25px #f2d38d5e;color:#f8d391}#ddz-effect-title{font:900 clamp(23px,3.5vw,42px)/1.4 "KaiTi","STKaiti","Microsoft YaHei",sans-serif;letter-spacing:5px;color:#ffe8b5;text-shadow:0 2px 0 #715545,0 4px 1px #22334b,0 8px 20px #05162c;white-space:nowrap}#ddz-effect-detail{font-size:11px;padding:4px 9px;border:1px solid #e7c78d61;border-radius:5px;background:#233249e6;color:#ebdfc5;max-width:100%;overflow-wrap:anywhere}#ddz-effect-detail:empty{display:none}.ddz-effect[data-kind=bomb]:after{content:"";position:absolute;z-index:-1;inset:-55%;border:2px solid #efbd7977;border-radius:50%;animation:ddz-shock .8s ease-out 2;box-shadow:0 0 20px #f1b87233}.ddz-effect[data-kind=bomb] #ddz-effect-icon{font-size:68px;color:#f4b16b;animation:ddz-bomb-burst .7s ease-out}.ddz-effect[data-kind=airplane] #ddz-effect-icon{font-size:65px;color:#c5f3f3;animation:ddz-plane .8s ease-out}.ddz-effect[data-kind=result]{top:47%;padding:17px 20px;border:1px solid #e2c69287;border-radius:17px;background:linear-gradient(135deg,#51476ef2,#273e5ff2);box-shadow:inset 0 1px 0 #ffe5b244,0 15px 45px #05122f88}.ddz-effect[data-kind=result] #ddz-effect-icon{font-size:54px}.ddz-table-error{position:absolute;z-index:45;left:50%;top:55%;transform:translate(-50%,-50%);width:max-content;max-width:86%;padding:12px 16px;border:1px solid #eeac967d;border-radius:10px;background:linear-gradient(135deg,#753d4df5,#412d47f5);box-shadow:0 10px 30px #13132b80;color:#ffe1d5;font-size:12px;line-height:1.7;text-align:center;pointer-events:none}
.ddz-chat-dock{grid-area:chat;min-height:0}.ddz-chat-panel{display:flex;flex-direction:column;height:100%;min-height:0;border:1px solid #acd2e441;border-radius:13px;background:linear-gradient(135deg,#c8eafa12,#4d74972a 45%,#24385f40);box-shadow:inset 0 1px 0 #dcfaff29,0 10px 30px #030e252b;backdrop-filter:blur(24px) saturate(130%);-webkit-backdrop-filter:blur(24px) saturate(130%);overflow:hidden}.ddz-chat-panel>header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;padding:13px 14px 11px;border-bottom:1px solid #b2d4e321}.ddz-chat-panel h3{display:flex;align-items:center;gap:5px;color:#d8e7ee;font-size:13px;letter-spacing:.5px;font-weight:600}.ddz-chat-panel h3:before{content:"";width:5px;height:5px;border-radius:50%;background:#a4e2e3;box-shadow:0 0 8px #94ddde70}.ddz-chat-panel>header p{color:#90adc6;font-size:9px;margin-top:4px}.ddz-chat-panel #ddz-chat-close{display:none}.ddz-chat-scroll{flex:1;min-height:25px;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;padding:14px 11px;scrollbar-width:thin;scrollbar-color:#accbe344 transparent}.ddz-chat-scroll:focus-visible{outline:2px solid #c8debf55;outline-offset:-3px}.ddz-chat-empty{font-size:11px;line-height:1.9;text-align:center;color:#9ab7ca;padding:25px 0}.ddz-chat-empty:before{content:"◈";display:block;font:29px/1.4 Georgia,serif;color:#8dc7d651;margin-bottom:10px}#ddz-chat-list{display:flex;flex-direction:column;gap:13px;list-style:none;margin:0;padding:0}.ddz-chat-message{align-self:flex-start;max-width:100%;min-width:0}.ddz-chat-message[data-own=true]{align-self:flex-end}.ddz-chat-message-meta{display:flex;flex-wrap:wrap;align-items:center;gap:5px;line-height:1.4;margin-bottom:5px;font-size:9px;color:#91aecd}.ddz-chat-message-meta strong{font-size:10px;font-weight:550;overflow-wrap:anywhere;color:#d6e2ec}.ddz-chat-message-meta time{font-size:8px;color:#92aec38f}.ddz-chat-message[data-own=true] .ddz-chat-message-meta{justify-content:flex-end}.ddz-chat-message>p{margin:0;padding:7px 10px;border:1px solid #b8d4e128;border-radius:2px 9px 9px;background:#c3d9ee0b;color:#e5edf0;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.ddz-chat-message[data-own=true]>p{border-color:#d8c39336;background:linear-gradient(135deg,#c7b96f1a,#b5d1dc10);color:#eee4d2;border-radius:9px 2px 9px 9px}.ddz-chat-panel>form{flex:none;padding:10px 11px 11px;background:#10243f55;border-top:1px solid #bdd7e322}.ddz-chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:end}.ddz-chat-compose textarea{display:block;width:100%;min-width:0;min-height:64px;max-height:110px;padding:8px 9px;border:1px solid #b5ccdf36;border-radius:8px;resize:vertical;background:#081e3652;color:#eef3f2;font:16px/1.5 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;box-shadow:inset 0 2px 5px #08132725}.ddz-chat-compose textarea::placeholder{color:#9bb0ca}.ddz-chat-compose .ddz-primary{min-height:44px;padding:8px 11px;font-size:11px;color:#19374b;background:linear-gradient(135deg,#b3e5e1,#7ab8c5);border-color:#a6d6dc80}.ddz-chat-meta{display:flex;justify-content:space-between;gap:6px;color:#8ba8c0;font-size:8px;margin-top:6px}.ddz-chat-meta>span:last-child{white-space:nowrap}.ddz-chat-meta>[data-over=true]{color:#eab49b}#ddz-chat-error{margin-top:6px;font-size:10px;color:#efc0b0;line-height:1.6}.ddz-chat-latest{align-self:center;flex:none;min-height:36px;padding:6px 11px;margin-bottom:5px;border:1px solid #a1d2dd44;border-radius:8px;background:#31526fc9;color:#d8edee;font-size:11px}.ddz-chat-panel[data-unread=true]{border-color:#c6d8c580;box-shadow:inset 0 1px 0 #ffe4bd3d,0 0 18px #9cc7d319;animation:ddz-unread-pulse 2s ease-in-out 2}
.ddz-chat-dialog{position:fixed;inset:auto 0 0;margin:0;padding:0;width:100%;max-width:100%;height:min(80dvh,620px);max-height:none;overflow:hidden;border:1px solid #c2dfeb4d;border-bottom:0;border-radius:18px 18px 0 0;color:#e7edf1;background:#20365399;backdrop-filter:blur(26px) saturate(120%);-webkit-backdrop-filter:blur(26px) saturate(120%);box-shadow:0 -15px 45px #000e265e}.ddz-chat-dialog::backdrop{background:#05132c66;backdrop-filter:blur(2px)}#ddz-chat-mount{height:100%;min-height:0}.ddz-chat-dialog .ddz-chat-panel{height:100%;border:0;border-radius:0;background:linear-gradient(135deg,#c1e7fa0f,#263b6033);backdrop-filter:none;box-shadow:none}.ddz-chat-dialog .ddz-chat-panel>header{min-height:62px;padding:10px 16px}.ddz-chat-dialog #ddz-chat-close{display:inline-flex;min-height:44px;font-size:11px;padding:8px 13px}.ddz-chat-dialog .ddz-chat-scroll{padding:14px 16px}.ddz-chat-dialog .ddz-chat-panel>form{padding:11px 16px max(12px,env(safe-area-inset-bottom))}.ddz-chat-dialog .ddz-chat-compose textarea{resize:none}.ddz-chat-dialog .ddz-chat-message>p{font-size:14px}.ddz-chat-dialog .ddz-chat-message-meta strong{font-size:11px}.ddz-chat-dialog .ddz-chat-meta{font-size:9px}.ddz-chat-toast{position:fixed;top:60px;right:14px;z-index:80;width:min(280px,calc(100vw - 28px));min-height:75px;padding:11px 14px;border:1px solid #b2d9e970;border-radius:12px;background:linear-gradient(135deg,#344f72ed,#203355e8);box-shadow:0 10px 32px #05152b73,inset 0 1px 0 #e2f6f62e;backdrop-filter:blur(22px);color:#e4edf2;text-align:left}.ddz-chat-toast>strong{display:block;font-size:11px;color:#e9d6b2;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ddz-chat-toast>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.ddz-chat-toast>small{display:block;margin-top:4px;color:#9fc5d6;font-size:9px}
.ddz-dialog{width:min(560px,calc(100vw - 24px));max-height:85dvh;border:1px solid #bdd3e451;border-radius:16px;padding:20px;background:linear-gradient(140deg,#273953f5,#1b2946f5);color:#e7edf2;box-shadow:0 20px 80px #020c2580;backdrop-filter:blur(22px);overflow-y:auto;overscroll-behavior:contain}.ddz-dialog::backdrop{background:#030d257d;backdrop-filter:blur(3px)}.ddz-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.ddz-dialog h2{font-size:18px;font-weight:600;letter-spacing:1px;color:#ecddbf}.ddz-dialog>header button{font-size:11px;padding-inline:10px}.ddz-rules-copy{font-size:13px;line-height:1.9;color:#b9c9db}.ddz-rules-copy p+p{margin-top:14px}.ddz-volume-label{display:flex;justify-content:space-between;margin:20px 0 8px;font-size:12px;color:#d9e2e9}#ddz-volume-value{color:#e8d3a7;font:600 12px ui-monospace,Consolas,monospace}#ddz-volume{width:100%;height:36px;margin:0;accent-color:#e2c28a;background:transparent}.ddz-confirm-dialog{max-width:380px}.ddz-confirm-dialog p{font-size:13px;line-height:1.9;color:#b5c7d9;margin:12px 0 20px}.ddz-confirm-actions{display:flex;justify-content:flex-end;gap:9px}.ddz-confirm-dialog .ddz-primary{color:#ffebd9;background:linear-gradient(#b76d60,#95515c);border-color:#e4a08a}
html:has(body[data-app-id=doudizhu] dialog[open]),body[data-app-id=doudizhu]:has(dialog[open]){overflow:hidden;overscroll-behavior:none}.ddz-chat-dialog,.ddz-chat-scroll,.ddz-dialog{overscroll-behavior:contain}
@keyframes ddz-clock-urgent{50%{box-shadow:0 0 0 3px #ffb18826}}@keyframes ddz-shock{from{opacity:.9;scale:.5}to{opacity:0;scale:1.7}}@keyframes ddz-bomb-burst{0%{scale:.3;rotate:-25deg}70%{scale:1.3;rotate:9deg}100%{scale:1;rotate:0deg}}@keyframes ddz-plane{0%{translate:-100px 40px;rotate:-22deg;opacity:0}65%{translate:6px -6px;rotate:4deg;opacity:1}100%{translate:0 0;rotate:0deg}}@keyframes ddz-unread-pulse{50%{filter:brightness(1.13)}}
@media(max-width:1000px) and (min-width:761px){.ddz-room{grid-template-columns:minmax(0,1fr) 250px;gap:8px 15px}.ddz-seat-left{left:10px}.ddz-seat-right{right:10px}.ddz-seat-left,.ddz-seat-right{width:108px}.ddz-phase strong{font-size:14px}.ddz-table-tools{padding-inline:4px}#ddz-hand-note{display:none}}
@media(max-width:760px){
  body[data-app-id=doudizhu] .tool-topbar{height:48px;min-height:48px;padding:3px 12px;gap:8px}body[data-app-id=doudizhu] .ddz-page-title{font-size:17px;letter-spacing:1px;gap:7px}body[data-app-id=doudizhu] .ddz-page-title:before{width:25px;height:25px;font-size:21px}body[data-app-id=doudizhu] .tool-topbar .header-actions{gap:8px}body[data-app-id=doudizhu] .theme-control select{min-height:36px;max-width:94px}body[data-app-id=doudizhu] .back-link{font-size:10px}body[data-app-id=doudizhu] .tool-main{height:var(--ddz-shell-height,calc(100dvh - 48px));padding:6px 10px 5px;max-width:none}
  .ddz-room{grid-template-columns:minmax(0,1fr);grid-template-rows:23px auto minmax(0,1fr);grid-template-areas:"meta" "access" "game";gap:6px}.ddz-room-meta{padding-bottom:4px;gap:5px}.ddz-room-meta h2{font-size:10px;letter-spacing:.4px}.ddz-presence{font-size:9px;gap:7px}.ddz-access{padding:7px 9px;border-radius:10px}.ddz-access label{font-size:11px;margin-bottom:5px}.ddz-login-row{gap:7px}.ddz-login-row input{font-size:16px;min-height:42px;padding:7px 9px}.ddz-login-row input::placeholder{font-size:12px}.ddz-login-row button{min-height:42px;font-size:12px}.ddz-access form>p{font-size:9px;margin-top:4px}.ddz-access:has(#ddz-identity:not([hidden])){display:flex;align-items:center;gap:9px;justify-content:space-between}.ddz-access .ddz-identity{margin:0!important;gap:6px;flex:1;min-width:0}.ddz-identity-icon{width:27px;height:27px;font-size:22px;border-radius:8px}.ddz-identity strong{font-size:11px}.ddz-identity #ddz-my-role{font-size:9px;margin-top:0}.ddz-seat-actions{flex:none;gap:5px;flex-wrap:nowrap}.ddz-seat-actions>button{min-height:42px;padding:7px 10px;font-size:11px}.ddz-access-error{top:calc(100% + 3px);font-size:10px}
  .ddz-game{gap:4px}.ddz-arena{border-radius:18px;min-height:95px}.ddz-seat-left,.ddz-seat-right{width:96px;top:13px}.ddz-seat-left{left:8px}.ddz-seat-right{right:8px}.ddz-portrait{width:49px;height:49px}.ddz-seat-copy{margin-top:5px}.ddz-seat-name{font-size:10px}.ddz-seat-detail{font-size:8px}.ddz-seat-badge{top:37px;padding:0 5px;font-size:8px;min-width:33px}.ddz-seat-count{left:calc(50% + 27px);top:16px;font-size:9px;padding:1px 3px}.ddz-seat-right .ddz-seat-count{right:calc(50% + 27px)}.ddz-seat-seconds{min-width:20px;height:20px;font-size:10px}.ddz-table-top{top:7px;gap:4px}.ddz-bottom{gap:3px;min-height:33px}.ddz-bottom>.ddz-card-small,.ddz-card-back{width:23px;height:33px}.ddz-card-back{font-size:16px}.ddz-stakes{font-size:8px;gap:4px}.ddz-stakes>span:last-child{padding-left:4px}.ddz-phase{width:43%;top:32%;gap:3px}.ddz-phase strong{font-size:12px;letter-spacing:.3px}.ddz-phase>span{font-size:8px;max-width:118px}.ddz-game[data-phase=waiting] .ddz-phase strong{font-size:19px;letter-spacing:1px}.ddz-played-left{left:2%;top:48%;max-width:37%}.ddz-played-right{right:2%;top:48%;max-width:37%}.ddz-played-self{bottom:6px;max-width:66%}.ddz-played{gap:3px}.ddz-combo-label{font-size:9px;letter-spacing:.3px}.ddz-played .ddz-card-small{width:23px;height:33px}.ddz-played-row>.ddz-card+.ddz-card{margin-left:-12px}.ddz-played .ddz-card-corner>b{font-size:9px}.ddz-played .ddz-card-corner>i{font-size:8px}.ddz-played .ddz-card-pip{font-size:15px}.ddz-played .ddz-card-foot{font-size:5px}.ddz-pass-mark{font-size:17px}.ddz-command-bar{padding:0;min-height:44px}.ddz-bid-actions,.ddz-play-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.ddz-bid-actions>span{display:none}.ddz-command-bar button,.ddz-command-bar #ddz-play{min-width:0;min-height:44px;padding:6px 4px;font-size:12px}.ddz-command-bar p{font-size:11px;letter-spacing:0}.ddz-hand-zone{padding:0 0 1px}.ddz-hand-heading{min-height:28px;padding-inline:3px;gap:6px}.ddz-seat-self{max-width:62%;gap:5px}.ddz-seat-self .ddz-portrait{width:25px;height:25px}.ddz-seat-self .ddz-seat-name{font-size:10px}.ddz-seat-self .ddz-seat-badge{font-size:8px;padding-inline:4px}.ddz-seat-self .ddz-seat-count{font-size:8px}.ddz-seat-self .ddz-seat-seconds{min-width:16px;width:16px;height:16px;font-size:8px}#ddz-selection-status{font-size:8px}.ddz-hand{gap:0;padding-bottom:2px}.ddz-hand-row{padding-top:11px}.ddz-hand-row>.ddz-card{border-radius:4px}.ddz-hand .ddz-card-corner{left:3px;top:3px}.ddz-hand .ddz-card-corner>b{font-size:14px}.ddz-hand .ddz-card-corner>i{font-size:11px}.ddz-hand .ddz-card-pip{font-size:24px}.ddz-hand .ddz-card-foot{font-size:7px;right:3px;bottom:3px}.ddz-hand .ddz-card[data-joker=true] .ddz-card-corner>b{font-size:8px}.ddz-hand .ddz-card[data-joker=true] .ddz-card-pip{font-size:26px}.ddz-hand-row>.ddz-card[data-selected=true]{translate:0 -9px}.ddz-hand-row>.ddz-card[data-selected=true]:after{width:13px;height:13px;font-size:9px;right:2px;bottom:3px}.ddz-hand-empty{min-height:50px;padding:7px 2px}.ddz-hand-empty>span{font-size:19px}.ddz-hand-empty p{font-size:9px}.ddz-table-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0;gap:6px;min-height:44px}.ddz-table-tools button{font-size:10px;min-height:44px;padding:7px 5px}#ddz-hand-note{display:none}.ddz-chat-dock{display:none}.ddz-effect{gap:3px}#ddz-effect-title{font-size:27px;letter-spacing:3px}#ddz-effect-icon{font-size:34px}#ddz-effect-detail{font-size:9px;padding:3px 6px}.ddz-effect[data-kind=result]{padding:13px 16px}.ddz-effect[data-kind=result] #ddz-effect-icon{font-size:43px}.ddz-table-error{font-size:11px;padding:10px 12px}.ddz-dialog{padding:16px}.ddz-dialog h2{font-size:16px}.ddz-chat-toast{top:54px}
}
@media(max-width:360px){.ddz-presence{gap:5px;font-size:8px}.ddz-room-meta h2{font-size:9px}.ddz-seat-left{left:3px}.ddz-seat-right{right:3px}.ddz-seat-left,.ddz-seat-right{width:88px}.ddz-hand .ddz-card-corner>b{font-size:12px}.ddz-hand .ddz-card-pip{font-size:20px}.ddz-identity-icon{display:none}.ddz-seat-self .ddz-seat-badge{display:none}.ddz-seat-self{max-width:60%}.ddz-seat-actions>button{padding-inline:8px;font-size:10px}.ddz-stakes>span:last-child{display:none}}
@media(max-height:650px){.ddz-seat-left,.ddz-seat-right{top:9px}.ddz-table-top{top:5px}.ddz-phase{top:28%}.ddz-game[data-phase=waiting] .ddz-phase{top:49%}.ddz-played-left,.ddz-played-right{top:48%}.ddz-hand-row{padding-top:10px}.ddz-game{gap:3px}.ddz-hand-heading{min-height:27px}.ddz-chat-panel>header{padding-block:9px}.ddz-chat-compose textarea{height:48px;min-height:48px}.ddz-chat-empty{padding-block:13px}.ddz-chat-panel>form{padding-block:8px}}
@media(min-width:761px) and (max-height:500px){body[data-app-id=doudizhu] .tool-topbar{height:42px;min-height:42px;padding-block:2px}body[data-app-id=doudizhu] .ddz-page-title{font-size:17px}body[data-app-id=doudizhu] .tool-main{padding:5px 14px}.ddz-room{grid-template-columns:minmax(0,1fr) 216px;grid-template-rows:22px minmax(0,1fr);grid-template-areas:"meta meta" "game access";gap:5px 16px}.ddz-chat-dock{display:none}.ddz-access{padding:9px}.ddz-access label{font-size:11px}.ddz-login-row{flex-wrap:wrap}.ddz-login-row input{width:100%;min-height:38px;flex-basis:100%}.ddz-login-row button{width:100%;min-height:40px}.ddz-access form>p{font-size:9px}.ddz-identity{margin-bottom:8px}.ddz-seat-actions button{font-size:11px;padding-inline:9px}.ddz-game{gap:3px}.ddz-arena{min-height:85px;border-radius:16px}.ddz-arena:before{inset:8% 3% 3%}.ddz-seat-left,.ddz-seat-right{top:5px;width:120px;flex-direction:row;gap:6px}.ddz-seat-left{left:9px}.ddz-seat-right{right:9px;flex-direction:row-reverse}.ddz-portrait{width:36px;height:36px}.ddz-seat-copy{margin:0;text-align:left;max-width:65px}.ddz-seat-right .ddz-seat-copy{text-align:right}.ddz-seat-name{font-size:9px}.ddz-seat-detail{font-size:8px}.ddz-seat-badge{top:28px;left:18px;font-size:7px;min-width:27px;padding:0 3px}.ddz-seat-right .ddz-seat-badge{left:auto;right:-9px}.ddz-seat-count{left:0;top:47px;font-size:8px;padding:1px 3px}.ddz-seat-right .ddz-seat-count{left:auto;right:0}.ddz-seat-seconds{min-width:17px;height:17px;font-size:9px;right:-5px;top:-4px}.ddz-table-top{top:3px;gap:2px}.ddz-bottom{min-height:29px;gap:3px}.ddz-card-back,.ddz-bottom>.ddz-card-small{width:21px;height:29px}.ddz-stakes{font-size:8px}.ddz-phase{top:32%;width:44%;gap:2px}.ddz-phase strong{font-size:11px}.ddz-phase>span{font-size:8px}.ddz-game[data-phase=waiting] .ddz-phase strong{font-size:17px}.ddz-played-left,.ddz-played-right{top:50%}.ddz-played-self{bottom:3px}.ddz-played .ddz-card-small{width:20px;height:28px}.ddz-played-row>.ddz-card+.ddz-card{margin-left:-10px}.ddz-played .ddz-card-corner>b{font-size:8px}.ddz-played .ddz-card-corner>i{font-size:7px}.ddz-played .ddz-card-pip{font-size:13px}.ddz-played .ddz-card-foot{font-size:5px}.ddz-played{gap:2px}.ddz-combo-label{font-size:8px}.ddz-pass-mark{font-size:13px}.ddz-command-bar{min-height:38px}.ddz-command-bar button{min-height:38px;padding:5px 12px;font-size:11px;min-width:65px}.ddz-command-bar #ddz-play{min-width:95px}.ddz-hand-heading{min-height:25px}.ddz-hand-zone{padding-inline:0}.ddz-hand-row{padding-top:9px}.ddz-hand .ddz-card-corner{left:3px;top:3px}.ddz-hand .ddz-card-corner>b{font-size:13px}.ddz-hand .ddz-card-corner>i{font-size:10px}.ddz-hand .ddz-card-pip{font-size:23px}.ddz-hand .ddz-card-foot{font-size:7px}.ddz-hand-row>.ddz-card[data-selected=true]{translate:0 -8px}.ddz-seat-self .ddz-portrait{width:23px;height:23px}.ddz-seat-self .ddz-seat-name{font-size:10px}.ddz-seat-self .ddz-seat-badge{position:static;left:auto;top:auto;font-size:8px}.ddz-table-tools{min-height:38px;padding:0;gap:6px}.ddz-table-tools button{min-height:38px;padding:5px 12px;font-size:10px}.ddz-hand-empty{min-height:35px;padding:3px}.ddz-hand-empty>span{display:none}.ddz-effect[data-kind=result]{padding:9px 14px}.ddz-effect[data-kind=result] #ddz-effect-icon{font-size:30px}#ddz-effect-title{font-size:24px}#ddz-effect-icon{font-size:28px}#ddz-effect-detail{font-size:9px}.ddz-chat-toast{top:46px;width:216px}}
/* Hand sizing belongs to the row: a card-local default otherwise shadows the
   responsive width and makes the mobile layout viewport wider than the screen. */
.ddz-hand-zone{min-width:0;isolation:isolate}
.ddz-hand{max-width:100%;padding-inline:6px;overflow:clip}
.ddz-hand-row{flex:0 0 auto;padding-bottom:3px}
.ddz-hand-row>.ddz-card{--card-width:inherit}
.ddz-table-tools{position:relative;z-index:2;isolation:isolate}
@media(max-width:380px) and (max-height:650px){.ddz-phase{top:52%;width:64%}.ddz-phase>span{display:none}}
@media(prefers-reduced-motion:reduce){.ddz-primary,.ddz-secondary,.ddz-hand-row>.ddz-card,.ddz-clock-progress{transition:none}.ddz-seat[data-urgent=true] .ddz-seat-seconds,.ddz-effect:after,.ddz-effect #ddz-effect-icon,.ddz-chat-panel[data-unread=true]{animation:none!important}}
@media(prefers-reduced-transparency:reduce){.ddz-chat-panel,.ddz-chat-dialog,.ddz-chat-dialog .ddz-chat-panel{background:#233650;backdrop-filter:none;-webkit-backdrop-filter:none}.ddz-chat-toast{background:#29445f;backdrop-filter:none}.ddz-chat-dialog::backdrop,.ddz-dialog::backdrop{backdrop-filter:none}}


/* Use desktop space for readable cards, rather than an oversized empty arena. */
body[data-app-id=doudizhu]{--ddz-hand-min-width:30;--ddz-hand-max-width:62;--ddz-played-card-width:28px;--ddz-bottom-card-width:28px}
@media(min-width:761px) and (min-height:501px){
  body[data-app-id=doudizhu]{--ddz-hand-min-width:50;--ddz-hand-max-width:96;--ddz-played-card-width:clamp(40px,3.3vw,62px);--ddz-bottom-card-width:clamp(34px,2.7vw,48px)}
  body[data-app-id=doudizhu] .tool-topbar{padding-inline:max(20px,calc((100vw - 1640px)/2))}
  body[data-app-id=doudizhu] .tool-main{max-width:1680px;padding-inline:20px}
  .ddz-room{grid-template-columns:minmax(0,1fr) clamp(276px,20vw,328px);column-gap:22px}
  .ddz-arena{max-height:clamp(300px,58dvh,620px);min-height:190px;border-radius:25px}
  .ddz-arena:before{inset:10% 3% 4%}.ddz-arena:after{inset:15% 8% 9%}
  .ddz-table-top{top:12px;gap:8px}.ddz-bottom{min-height:calc(var(--ddz-bottom-card-width)*1.43);gap:7px}
  .ddz-bottom>.ddz-card-small,.ddz-card-back{width:var(--ddz-bottom-card-width);height:calc(var(--ddz-bottom-card-width)*1.43)}
  .ddz-bottom .ddz-card-corner>b{font-size:calc(var(--ddz-bottom-card-width)*.34)}.ddz-bottom .ddz-card-corner>i{font-size:calc(var(--ddz-bottom-card-width)*.28)}
  .ddz-bottom .ddz-card-pip{font-size:calc(var(--ddz-bottom-card-width)*.6)}.ddz-bottom .ddz-card-foot{font-size:calc(var(--ddz-bottom-card-width)*.2)}
  .ddz-stakes{font-size:10px;gap:10px}.ddz-seat-left,.ddz-seat-right{top:22px;width:145px}.ddz-seat-left{left:25px}.ddz-seat-right{right:25px}
  .ddz-portrait{width:clamp(58px,4.2vw,76px);height:clamp(58px,4.2vw,76px)}
  .ddz-seat-badge{top:calc(clamp(58px,4.2vw,76px) - 15px)}
  .ddz-seat-name{font-size:13px}.ddz-seat-detail{font-size:10px}.ddz-seat-count{left:calc(50% + 39px);font-size:12px}.ddz-seat-right .ddz-seat-count{right:calc(50% + 39px)}
  .ddz-phase{top:28%;width:min(330px,44%)}.ddz-phase strong{font-size:clamp(17px,1.4vw,23px)}.ddz-phase>span{font-size:12px}.ddz-game[data-phase=waiting] .ddz-phase strong{font-size:clamp(24px,2.3vw,34px)}
  .ddz-played-left{left:5%;top:44%}.ddz-played-right{right:5%;top:44%}.ddz-played-self{bottom:14px;max-width:70%}
  .ddz-played{gap:7px}.ddz-played-cards{gap:5px}.ddz-played-row>.ddz-card+.ddz-card{margin-left:calc(var(--ddz-played-card-width)*-.53)}
  .ddz-played .ddz-card-small{--card-width:var(--ddz-played-card-width);width:var(--ddz-played-card-width);height:calc(var(--ddz-played-card-width)*1.43);border-radius:5px}
  .ddz-played .ddz-card-corner{left:4px;top:3px}.ddz-played .ddz-card-corner>b{font-size:calc(var(--ddz-played-card-width)*.34);letter-spacing:-.6px}.ddz-played .ddz-card-corner>i{font-size:calc(var(--ddz-played-card-width)*.28)}
  .ddz-played .ddz-card-pip{font-size:calc(var(--ddz-played-card-width)*.62)}.ddz-played .ddz-card-foot{font-size:calc(var(--ddz-played-card-width)*.2);right:3px;bottom:3px}
  .ddz-played .ddz-card[data-joker=true] .ddz-card-corner>b{font-size:calc(var(--ddz-played-card-width)*.21)}.ddz-played .ddz-card[data-joker=true] .ddz-card-pip{font-size:calc(var(--ddz-played-card-width)*.61)}
  .ddz-combo-label{font-size:clamp(12px,1vw,16px)}.ddz-pass-mark{font-size:clamp(23px,2vw,30px)}
  .ddz-command-bar{min-height:46px}.ddz-command-bar button{min-height:46px;font-size:14px;min-width:86px}.ddz-command-bar #ddz-play{min-width:130px}
  .ddz-hand-zone{padding:1px 10px 4px;background:radial-gradient(ellipse at 50% 100%,#6d86ae2d,transparent 78%)}
  .ddz-hand-heading{min-height:36px}.ddz-seat-self .ddz-portrait{width:31px;height:31px}.ddz-seat-self .ddz-seat-name{font-size:12px}.ddz-seat-self .ddz-seat-badge{top:auto;position:static}.ddz-seat-self .ddz-seat-count{font-size:11px;left:auto}
  #ddz-selection-status{font-size:11px}.ddz-hand-row{padding-top:15px;padding-bottom:5px}
  .ddz-hand .ddz-card-corner{left:7px;top:6px}.ddz-hand .ddz-card-corner>b{font-size:clamp(22px,1.7vw,31px)}.ddz-hand .ddz-card-corner>i{font-size:clamp(17px,1.4vw,24px)}
  .ddz-hand .ddz-card-pip{font-size:clamp(38px,3vw,54px)}.ddz-hand .ddz-card-foot{font-size:12px;right:6px;bottom:6px}
  .ddz-hand .ddz-card[data-joker=true] .ddz-card-corner>b{font-size:clamp(12px,1vw,17px)}.ddz-hand .ddz-card[data-joker=true] .ddz-card-pip{font-size:clamp(40px,3vw,57px)}
  .ddz-hand-row>.ddz-card[data-selected=true]{translate:0 -14px}
  .ddz-hand-empty{min-height:90px;padding:15px 8px}.ddz-hand-empty>span{font-size:32px;letter-spacing:15px}.ddz-hand-empty p{font-size:11px}
  .ddz-table-tools{gap:8px}.ddz-table-tools button{padding-inline:14px}.ddz-chat-panel{min-height:0}
}
@media(min-width:761px) and (max-height:720px) and (min-height:501px){
  body[data-app-id=doudizhu]{--ddz-hand-max-width:78;--ddz-played-card-width:40px;--ddz-bottom-card-width:34px}
  .ddz-arena{min-height:165px}.ddz-seat-left,.ddz-seat-right{top:14px}.ddz-portrait{width:56px;height:56px}.ddz-seat-badge{top:41px}
  .ddz-phase{top:29%}.ddz-hand-heading{min-height:30px}.ddz-hand-row{padding-top:12px;padding-bottom:3px}.ddz-hand .ddz-card-corner>b{font-size:23px}.ddz-hand .ddz-card-corner>i{font-size:17px}.ddz-hand .ddz-card-pip{font-size:38px}.ddz-hand .ddz-card-foot{font-size:10px}
}
@media(min-width:1700px) and (min-height:800px){body[data-app-id=doudizhu]{--ddz-hand-max-width:112}}
@media(min-width:761px) and (min-height:501px) and (max-height:650px){
  body[data-app-id=doudizhu]{--ddz-hand-min-width:40;--ddz-hand-max-width:62;--ddz-played-card-width:32px;--ddz-bottom-card-width:29px}
  .ddz-arena{min-height:120px}.ddz-played:has(.ddz-played-row:nth-child(2)){top:auto;bottom:7px}.ddz-combo-label{font-size:11px}.ddz-phase strong{font-size:14px}.ddz-phase>span{font-size:10px}
  .ddz-hand .ddz-card-corner{left:5px;top:4px}.ddz-hand .ddz-card-corner>b{font-size:20px}.ddz-hand .ddz-card-corner>i{font-size:14px}.ddz-hand .ddz-card-pip{font-size:30px}.ddz-hand .ddz-card-foot{font-size:9px;right:4px;bottom:4px}
}
@media(max-width:760px){
  .ddz-table-tools{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.ddz-table-tools button{min-width:0;min-height:44px;padding:7px 1px;font-size:9px;letter-spacing:0}.ddz-table-tools .ddz-unread{margin-left:2px;min-width:14px;height:14px;padding-inline:3px;font-size:8px}
  #ddz-audio-open{font-size:9px}.ddz-voice-count{margin-left:2px;min-width:14px;height:14px;padding-inline:2px;font-size:8px}
}
@media(min-width:761px) and (max-height:500px){.ddz-table-tools{gap:5px}.ddz-table-tools button{font-size:9px;padding-inline:9px}.ddz-table-tools #ddz-hand-note{display:none}}
@media(max-width:360px) and (max-height:650px){
  .ddz-played .ddz-card-small{width:19px;height:27px}.ddz-played-row>.ddz-card+.ddz-card{margin-left:-12px}.ddz-played .ddz-card-corner>b{font-size:8px}.ddz-played .ddz-card-corner>i{font-size:7px}.ddz-played .ddz-card-pip{font-size:12px}.ddz-played .ddz-card-foot{font-size:5px}
  .ddz-played-left,.ddz-played-right{top:auto;bottom:5px;max-width:30%}.ddz-played-self{bottom:5px;max-width:30%}.ddz-combo-label{font-size:8px;letter-spacing:0}
}
@media(min-width:761px) and (max-height:500px){.ddz-played-left:has(.ddz-played-row:nth-child(2)),.ddz-played-right:has(.ddz-played-row:nth-child(2)){top:auto;bottom:3px}}

/* Canva's original blue-and-brass direction is decorative; cards stay DOM/SVG. */
.ddz-arena{border-color:#d1b77b4d;background:#09283b;box-shadow:inset 0 1px 0 #f2d9a62b,0 18px 42px #030f2c40}
.ddz-arena:before{inset:0;border:0;border-radius:0;box-shadow:none;background:linear-gradient(#052d3930,#05223338),url('/shared/doudizhu/table-canva.png') center/100% 100% no-repeat;opacity:.95}
.ddz-arena:after{inset:0;border:0;border-radius:0;box-shadow:none;background:url('/shared/doudizhu/table-rail.svg') center/100% 100% no-repeat;opacity:.9}
