/* DDZ only. Card primitives shared with history live in ddz-cards.css. */
#ddzPlay{min-width:0;overflow-wrap:anywhere;--hand-w:58px;--hand-h:90px;--hand-step:32px;--lift:12px}
.ddz-header{display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:1480px;margin:0 auto 8px}.ddz-header h2{margin:0;font-size:23px;font-weight:400;line-height:1.35}.ddz-header p{font-size:12px;line-height:1.5;color:#63786b;margin:2px 0}.ddz-header-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;align-items:center;min-width:0}.ddz-header-actions button{font-size:13px;min-height:44px;padding:8px 12px}
body.ddz-table-view:not(.info-reading) .shell{width:100%;max-width:1340px;padding:max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}body.ddz-table-view:not(.info-reading) .shell>header{margin-bottom:12px}body.ddz-table-view:not(.info-reading) #ddzPlay{padding:12px}body.ddz-table-view:not(.info-reading) #ddzRoomCode{display:none}
body.ddz-expanded:not(.info-reading) .shell{max-width:none;padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}body.ddz-expanded:not(.info-reading) .shell>header{display:none}body.ddz-expanded:not(.info-reading) #ddzPlay{padding:4px;border:0;background:transparent}body.ddz-expanded:not(.info-reading) #ddzTable{height:calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:none}
.ddz-lobby-seats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.ddz-seat{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:4px 8px;min-width:0;padding:8px;border:1px solid #b6cab9;border-radius:5px;background:#f0f6ed;color:#294c3d}.ddz-avatar{display:grid;place-items:center;width:34px;height:34px;border:1px solid #93ab95;border-radius:5px;background:#37634e;color:#f6f4e6;font-size:16px}.ddz-seat.ddz-seat-empty{display:block}.ddz-lobby-seats .ddz-seat,.ddz-my-seat .ddz-seat{grid-template-columns:44px minmax(0,1fr)}#ddzPlay button.ddz-avatar{min-width:44px;min-height:44px;padding:0!important;box-shadow:none;cursor:pointer}#ddzPlay button.ddz-avatar:focus-visible{outline:3px solid #ffe198;outline-offset:2px}.ddz-bot-label{font-size:10px;color:#f8e4b0}.ddz-seat-info{min-width:0}.ddz-seat h3{font-size:14px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;line-height:1.6}.ddz-seat p{font-size:12px;line-height:1.5;margin:0}.ddz-seat-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;white-space:nowrap}.ddz-role{font-size:11px;min-width:2em}.ddz-role[data-role="landlord"]{color:#ffe198}.ddz-card-count{font-variant-numeric:tabular-nums}.ddz-seat-clock{grid-column:1/-1;min-height:18px;font-size:12px;line-height:18px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#ffe99c}.ddz-seat-clock:empty::before{content:'\00a0'}
/* The named court areas are stable in seat order; portrait uses separate rows. */
#ddzTable{display:grid;grid-template-rows:62px minmax(140px,1fr) 68px 82px 118px;gap:8px;height:clamp(520px,calc(100dvh - 180px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),800px);max-width:1480px;margin:0 auto;padding:12px;min-width:0;background:#245b49;color:#f5f2df;border:1px solid #447c61;border-radius:7px}#ddzTable.hidden{display:none}.ddz-public{display:grid;grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr);align-items:center;min-width:0;gap:8px}.ddz-public p{font-size:12px;line-height:1.5;margin:0}.ddz-clock{color:#ffdfb0;max-height:58px;overflow:auto}.ddz-clock:empty{visibility:hidden}#ddzMultiplier{text-align:right;font-variant-numeric:tabular-nums}
.ddz-bottom-dock{min-width:0;min-height:58px;display:grid;place-items:center}.ddz-bottom-group{max-width:100%;text-align:center;pointer-events:none;transform-origin:top left;z-index:2}.ddz-bottom-group p{max-width:175px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 4px;font-size:12px;line-height:16px}.ddz-bottom{display:flex;justify-content:center;gap:4px;min-height:36px}.ddz-bottom-dock .ddz-card{width:30px;height:40px;padding:3px;box-shadow:none}.ddz-bottom-dock .ddz-card-rank{font-size:14px}.ddz-bottom-dock .ddz-card-suit{font-size:13px}.ddz-bottom-dock .ddz-card[data-card-id^="joker"] .ddz-card-rank{font-size:9px;writing-mode:horizontal-tb}
.ddz-arena{display:grid;grid-template-columns:124px minmax(0,1fr) 174px minmax(0,1fr) 124px;grid-template-areas:'left-seat left-play reveal right-play right-seat';gap:10px;align-items:center;min-width:0;min-height:0}.ddz-opponents{display:contents}.ddz-seat-left{grid-area:left-seat}.ddz-seat-right{grid-area:right-seat}.ddz-trick-left{grid-area:left-play}.ddz-trick-right{grid-area:right-play}.ddz-reveal-zone{grid-area:reveal;display:grid;place-items:center;min-width:0;min-height:0;text-align:center}.ddz-reveal-zone>p{font-size:12px;line-height:1.8;color:#c5d6c8;margin:0}.ddz-reveal-zone>p:empty{display:none}.ddz-reveal-zone .ddz-card{width:50px;height:72px;padding:5px;box-shadow:none}.ddz-reveal-zone .ddz-bottom-group p{white-space:normal;line-height:1.5;font-size:13px;margin:0 0 8px}
#ddzTable .ddz-seat{background:#1b493b;color:#f5f2df;border-color:transparent;min-height:70px}#ddzTable .ddz-seat.acting{border-color:#e0c274;background:#275b48}#ddzTable .ddz-seat.urgent{border-color:#ffc0a6;background:#65392d}#ddzTable .ddz-seat.urgent .ddz-seat-clock{color:#fff0c6}
.ddz-trick{min-width:0;min-height:0;text-align:center;align-self:center;max-width:100%}.ddz-play-owner{font-size:11px;line-height:1.5;max-width:100%;margin:0 0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ddz-played-cards{display:flex;align-items:center;justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;min-width:0;min-height:48px;max-width:100%;padding:2px 1px 5px;scrollbar-width:thin;scrollbar-color:#b6c3a2 #204e3e}.ddz-played-cards .ddz-card{width:36px;height:48px;padding:3px;margin-left:-13px;box-shadow:none}.ddz-played-cards .ddz-card:first-child{margin-left:0}.ddz-played-cards .ddz-card-rank{font-size:16px}.ddz-played-cards .ddz-card-suit{font-size:14px}.ddz-play-status{font-size:13px;white-space:nowrap;margin:auto;color:#f5f2df}.ddz-trick-self{display:flex;justify-content:center;align-items:center;gap:12px;max-width:600px;width:100%;justify-self:center}.ddz-trick-self .ddz-play-owner{flex:0 0 auto;max-width:130px;margin:0}.ddz-trick-self .ddz-played-cards{max-width:440px}
.ddz-operations{display:grid;grid-template-rows:44px 34px;gap:4px;min-width:0}.ddz-control-slot{display:grid;place-items:center;min-width:0}.ddz-controls{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:nowrap;margin:0;max-width:100%}.ddz-controls.hidden{display:none}#ddzPlay .ddz-controls button{min-height:44px;min-width:56px;padding:8px 13px!important;font-size:14px;line-height:1.4;box-shadow:none}#ddzPlay #ddzPlayCards{background:#f3e7b0;border-color:#f3e7b0;color:#183f32}#ddzPlay #ddzPass{background:transparent;color:#f5f2df;border-color:#91b29d}#ddzPlay .ddz-controls .play-light{color:#f4f2dd;background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:4px}.ddz-feedback-line{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.ddz-feedback-line .ddz-message{flex:1;min-width:0;text-align:right}.ddz-feedback-line .ddz-clock{flex:0 0 auto;min-width:9ch;font-variant-numeric:tabular-nums;text-align:right;margin:0 0 0 auto;font-size:12px;line-height:1.4;max-height:none;overflow:visible}.ddz-feedback{min-width:0;overflow-y:auto;max-height:34px;text-align:center;scrollbar-width:thin}#ddzPlay .ddz-feedback :is(.action-status,.ddz-message,.ddz-clock){font-size:12px;line-height:1.4;min-height:0;color:#e0eadc;margin:0;max-width:none}.ddz-feedback p:empty{display:none}
.ddz-hand-dock{display:grid;grid-template-columns:124px minmax(0,1fr);gap:12px;align-items:center;min-width:0;min-height:0}.ddz-my-seat{min-width:0}.ddz-scroll-hint{font-size:11px;line-height:1.4;color:#ceddcf;margin:3px 0;text-align:center}.ddz-hand{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-color:#c6b778 #183f32;scrollbar-width:thin}.ddz-hand-window{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:4px;min-width:0}.ddz-hand-window.no-scroll{grid-template-columns:minmax(0,1fr)}#ddzPlay .ddz-hand-scroll{padding:3px!important;min-height:44px;align-self:center;font-size:12px;touch-action:manipulation}.ddz-hand{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.ddz-hand-row{display:flex;align-items:flex-end;justify-content:center;width:max-content;min-width:100%;padding:calc(var(--lift) + 4px) 4px 6px;min-height:calc(var(--hand-h) + var(--lift) + 10px)}#ddzPlay .ddz-hand-row .ddz-card{width:var(--hand-w);height:var(--hand-h);margin-left:calc(var(--hand-step) - var(--hand-w));cursor:pointer;padding:6px 4px;box-shadow:0 1px 1px #10261f60;touch-action:none}#ddzPlay .ddz-hand-row .ddz-card:first-child{margin-left:0}#ddzPlay .ddz-hand-row .ddz-card.chosen{transform:translateY(calc(-1 * var(--lift)));outline:3px solid #d8b64e;outline-offset:-2px;background:#fff1c8}#ddzPlay .ddz-hand-row .ddz-card:disabled{opacity:1;cursor:default}#ddzPlay .ddz-hand-row .ddz-card:focus-visible{outline:3px solid #b68221;outline-offset:-3px}
.ddz-result{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-items:center;width:100%;max-width:720px;margin:0 auto;color:#eff8e9}.ddz-result>strong{font:15px/1.35 system-ui,sans-serif;overflow-wrap:anywhere}.ddz-result-actions{display:flex;gap:6px}#ddzPlay .ddz-result-actions button{background:#f4f0df;color:#234333;border:1px solid #b4c5b1;border-radius:5px;min-height:44px;padding:8px 12px!important;font:inherit;box-shadow:none}#ddzPlay .ddz-result-actions button:hover:not(:disabled){background:#e4ebdb}#ddzPlay .ddz-result-actions button:disabled{opacity:.55;cursor:not-allowed}.ddz-result #ddzRematchStatus{margin:0;font-size:10px;line-height:14px;text-align:right}.ddz-result-details{font-size:11px;line-height:14px}.ddz-result-details summary{cursor:pointer;text-decoration:underline;min-height:18px}.ddz-result-details>div{position:absolute;z-index:15;bottom:100%;left:0;right:0;max-height:180px;overflow:auto;padding:10px;background:#f8f4e7;color:#234333;border:1px solid #8ba589}.ddz-result-details p,.ddz-result-details li{font:13px/1.65 system-ui,sans-serif;margin:0}.ddz-result-details ul{margin:4px 0;padding-left:18px}.ddz-final-hand{justify-content:flex-start;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}.ddz-audio-settings label{font-size:14px;display:flex;align-items:center;gap:8px}.ddz-audio-settings select{min-height:44px;max-width:190px}#ddzGuestVoice{font-size:12px;margin:0}
.ddz-audio-settings input[type=range]{width:120px}.ddz-low-cards{position:absolute;right:2px;top:-17px;background:#fff1bd;color:#77370e;padding:2px 4px;font-size:11px;white-space:nowrap;pointer-events:none}.ddz-seat{position:relative}#ddzAudioNotice:empty{display:none}#ddzAudioNotice{font-size:11px;margin:2px auto;max-width:none}#ddzPlay [hidden]{display:none!important}
:root[data-theme="dark"] .ddz-result-details>div{background:#233a2c;color:#e9f3e6;border-color:#88ab8e}
:root[data-theme="dark"] .ddz-card-entry{background:#3b3028;border-color:#806a4c}:root[data-theme="dark"] .ddz-card-entry .icon{color:#f0ba9b}:root[data-theme="dark"] #ddzTable{background:#183f32;border-color:#64866f}:root[data-theme="dark"] .ddz-header p{color:#bed7c4}:root[data-theme="dark"] .ddz-lobby-seats .ddz-seat{background:#293e32;color:#e5eee6;border-color:#64866f}
@media(max-width:700px) and (orientation:portrait){
 body.ddz-table-view:not(.info-reading) .shell{padding-left:6px;padding-right:6px}body.ddz-table-view:not(.info-reading) #ddzPlay{padding:6px}
 .ddz-header{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}.ddz-header>div:first-child{display:flex;gap:10px;align-items:baseline}.ddz-header-actions{justify-content:flex-end;gap:4px}
 #ddzPlay{--hand-w:50px;--hand-h:84px;--hand-step:28px}.ddz-header h2{font-size:18px;white-space:nowrap}.ddz-header-actions{gap:4px}.ddz-header-actions button{font-size:12px;padding:8px}.ddz-lobby-seats{grid-template-columns:1fr;gap:7px}#ddzTable{grid-template-rows:58px minmax(190px,1fr) 58px 82px 112px;gap:5px;padding:8px;height:clamp(540px,calc(100dvh - 180px),800px)}.ddz-public{grid-template-columns:minmax(0,1fr) 122px minmax(0,1fr);gap:4px}.ddz-public p{font-size:10px}.ddz-bottom-group p{max-width:120px;font-size:11px}.ddz-arena{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:62px minmax(64px,1fr) 62px;grid-template-areas:'left-seat right-seat' 'reveal reveal' 'left-play right-play';gap:4px 12px}.ddz-seat-left,.ddz-seat-right{width:100%;max-width:155px}.ddz-seat-right{justify-self:end}#ddzTable .ddz-seat{min-height:58px;padding:4px;gap:2px 5px}.ddz-seat h3{font-size:12px}.ddz-seat p{font-size:11px}.ddz-avatar{width:28px;height:28px;font-size:14px}.ddz-seat{grid-template-columns:28px minmax(0,1fr)}.ddz-seat-clock{font-size:11px;line-height:16px;min-height:16px}.ddz-reveal-zone .ddz-card{width:40px;height:56px;padding:4px}.ddz-reveal-zone .ddz-bottom-group p{font-size:11px;margin-bottom:3px}.ddz-reveal-zone .ddz-card-rank{font-size:19px}.ddz-reveal-zone .ddz-card-suit{font-size:17px}.ddz-play-owner{font-size:10px;margin-bottom:1px}.ddz-played-cards{min-height:42px}.ddz-played-cards .ddz-card{width:32px;height:42px;padding:3px;margin-left:-11px}.ddz-played-cards .ddz-card-rank{font-size:14px}.ddz-played-cards .ddz-card-suit{font-size:12px}.ddz-trick-self{gap:6px}.ddz-trick-self .ddz-play-owner{max-width:95px}#ddzPlay .ddz-controls button{font-size:13px;min-width:48px;padding:8px 10px!important}.ddz-controls{gap:5px}.ddz-hand-dock{grid-template-columns:64px minmax(0,1fr);gap:6px}.ddz-my-seat .ddz-seat{display:flex;flex-direction:column;gap:1px;padding:2px!important}.ddz-my-seat .ddz-seat-info{max-width:100%;width:100%}.ddz-my-seat .ddz-seat h3{font-size:10px}.ddz-my-seat .ddz-seat-meta{font-size:10px;gap:2px}.ddz-my-seat .ddz-avatar{width:24px;height:24px}.ddz-my-seat .ddz-seat-clock{font-size:10px;min-height:14px;line-height:14px}.ddz-scroll-hint{font-size:9px}
}
@media(orientation:landscape) and (max-height:500px){
 body.ddz-table-view:not(.info-reading) .shell{max-width:none;padding:max(3px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}body.ddz-table-view:not(.info-reading) .shell>header{display:none}body.ddz-table-view:not(.info-reading) #ddzPlay{padding:2px;border:0}#ddzPlay{--hand-w:46px;--hand-h:64px;--hand-step:28px;--lift:8px}.ddz-header{margin-bottom:2px;gap:6px;min-height:44px}.ddz-header h2{font-size:16px}.ddz-header p{font-size:10px;margin:0}.ddz-header-actions button{font-size:12px;padding:6px 10px;min-height:44px}#ddzTable,body.ddz-expanded:not(.info-reading) #ddzTable{height:calc(100dvh - 56px - env(safe-area-inset-bottom) - env(safe-area-inset-top));min-height:283px;max-height:none;grid-template-rows:34px minmax(56px,1fr) 37px 60px 78px;gap:2px;padding:4px 8px}.ddz-public{grid-template-columns:minmax(0,1fr) 110px minmax(0,1fr)}.ddz-public p{font-size:10px;line-height:1.3}.ddz-bottom-dock{min-height:34px}.ddz-bottom-dock #ddzBottomLabel{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.ddz-bottom-dock .ddz-card{width:26px;height:34px;padding:2px}.ddz-bottom-dock .ddz-card-rank{font-size:12px}.ddz-bottom-dock .ddz-card-suit{font-size:11px}.ddz-arena{grid-template-columns:112px minmax(0,1fr) 142px minmax(0,1fr) 112px;gap:7px}#ddzTable .ddz-seat{min-height:54px;padding:3px;gap:0 5px}.ddz-seat{grid-template-columns:28px minmax(0,1fr)}.ddz-avatar{width:28px;height:28px;font-size:13px}.ddz-seat h3{font-size:11px}.ddz-seat p{font-size:10px}.ddz-seat-clock{font-size:10px;line-height:15px;min-height:15px}.ddz-reveal-zone .ddz-card{width:34px;height:44px;padding:3px}.ddz-reveal-zone .ddz-card-rank{font-size:15px}.ddz-reveal-zone .ddz-card-suit{font-size:13px}.ddz-reveal-zone .ddz-bottom-group p{font-size:10px;margin:0 0 2px;line-height:12px}.ddz-play-owner{font-size:10px;line-height:12px;margin-bottom:1px}.ddz-played-cards{min-height:30px;padding:1px 1px 2px}.ddz-played-cards .ddz-card{width:28px;height:34px;padding:2px;margin-left:-9px}.ddz-played-cards .ddz-card-rank{font-size:12px}.ddz-played-cards .ddz-card-suit{font-size:11px}.ddz-play-status{font-size:11px}.ddz-trick-self .ddz-play-owner{max-width:110px}.ddz-trick-self .ddz-played-cards{max-width:540px}.ddz-operations{grid-template-rows:44px 14px;gap:2px}.ddz-feedback{max-height:14px}#ddzPlay .ddz-feedback :is(.action-status,.ddz-message,.ddz-clock){font-size:10px;line-height:14px}#ddzPlay .ddz-controls button{font-size:12px;padding:7px 12px!important}.ddz-hand-dock{grid-template-columns:112px minmax(0,1fr);gap:8px}.ddz-scroll-hint{font-size:9px;line-height:12px;margin:0}.ddz-hand-row{padding-top:10px;padding-bottom:3px;min-height:77px}.ddz-hand-row .ddz-card-rank{font-size:18px}.ddz-hand-row .ddz-card-suit{font-size:16px}
}

/* The existing server deadline display stays directly after Hint while playing. */
#ddzPlay .ddz-controls .ddz-clock{display:flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:11ch;min-height:38px;box-sizing:border-box;white-space:nowrap;margin:0;padding:5px 8px;border:2px solid #e5c775;border-radius:7px;background:#fff0ba;color:#48350b;font-size:14px;font-weight:700;line-height:1.3;text-align:center;font-variant-numeric:tabular-nums;overflow:visible;max-height:none}#ddzPlay .ddz-controls .ddz-clock.urgent{background:#ffe0ce;color:#8d210c;border-color:#fb8154;box-shadow:0 0 0 2px #fb815430}#ddzPlay .ddz-controls .ddz-clock[hidden]{display:none}@media(max-width:400px){#ddzPlay .ddz-controls{gap:3px}#ddzPlay .ddz-controls button{min-width:40px;padding:8px 7px!important;font-size:12px}#ddzPlay .ddz-controls .ddz-clock{font-size:12px;min-width:10.5ch;padding:5px}}
