/* Two-seat table: only the central train and private hand scroll. */
#ttPlay{max-width:1000px;margin-inline:auto;min-width:0;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.tt-head{display:flex;align-items:start;justify-content:space-between;gap:10px}
.tt-head h2{font-size:clamp(16px,2.6vw,24px);margin:0}.tt-head-actions{display:flex;gap:6px;flex-shrink:0}.tt-head-actions button{padding-inline:10px}
.tt-options{font-size:13px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere;margin:6px 0}
.tt-seat{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-height:44px;padding:5px;border-block-end:1px solid var(--line,#c6d4c9);font-size:13px}
.tt-seat .user-avatar{flex-shrink:0}.tt-seat strong{max-width:min(28vw,240px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tt-seat.acting{box-shadow:inset 3px 0 #2b8a68}.tt-seat-clock{min-width:94px;min-height:20px;margin-inline-start:auto;font-variant-numeric:tabular-nums}.tt-seat-clock.urgent{color:#b64328;font-weight:bold}
.tt-collected{display:inline-flex;align-items:center;gap:4px;margin-inline-start:auto;white-space:nowrap}.tt-collected-back{display:grid;place-items:center;width:20px;height:27px;color:#fff;background:#286853;border:2px solid #efeace;border-radius:3px;font-size:15px}
.tt-arena{display:grid;grid-template-rows:minmax(134px,1fr) auto auto auto auto;min-width:0;height:calc(100svh - 280px);min-height:224px}
.tt-center{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;min-width:0}
.tt-train-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px;font-size:12px;min-height:36px}
.tt-train-nav>span{color:var(--muted);margin-inline-end:4px}.tt-train-nav button{min-height:36px;padding:4px 6px;font-size:12px}
.tt-train-viewport{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-gutter:stable both-edges;outline-offset:-2px}
.tt-history-viewport{height:clamp(160px,45svh,380px);min-height:120px;max-width:100%}
.tt-train{--tt-card-w:64px;--tt-card-h:88px;--tt-step:40px;display:flex;flex-direction:column;align-items:center;isolation:isolate;width:var(--tt-card-w);min-height:0;margin-inline:auto;padding:5px 0}
.tt-train .ddz-card{position:relative;flex:0 0 var(--tt-card-h);width:var(--tt-card-w);height:var(--tt-card-h);margin:0;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:3px;white-space:nowrap;padding:4px;line-height:18px;box-shadow:0 1px 2px #10261f45}
.tt-train .ddz-card+.ddz-card{margin-block-start:calc(var(--tt-step) - var(--tt-card-h))}
.tt-train .ddz-card-rank,.tt-train .ddz-card-suit{display:inline-block;font-size:17px;line-height:18px;vertical-align:top}
.tt-train .ddz-card-suit{margin-inline-start:0}
.tt-train .ddz-card[data-card-id^="joker"] .ddz-card-rank{font-size:12px;writing-mode:horizontal-tb}
.tt-train .ddz-card[data-card-id^="joker"] .ddz-card-suit{position:static;margin-inline-start:0;font-size:15px}
.tt-first{outline:2px dashed #7c9765;outline-offset:1px}.tt-latest{box-shadow:0 0 0 2px #398972!important}
.tt-captured{position:absolute;right:2px;top:40px;width:clamp(62px,20%,94px);max-height:calc(100% - 40px);overflow:auto;padding:3px}
.tt-captured-label{font-size:11px;line-height:1.4;margin:0 0 3px;overflow-wrap:anywhere}
.tt-capture-stack{display:flex;flex-direction:column;align-items:center;padding:3px;max-height:100px;overflow:auto}
.tt-capture-stack .ddz-card{width:40px;height:56px;min-height:56px;outline:1px solid #b66335}.tt-capture-stack .ddz-card+.ddz-card{margin-top:-32px}
.tt-capture-stack .ddz-card:first-child{outline-style:dashed}.tt-capture-stack .ddz-card:last-child{box-shadow:0 0 0 2px #c88b42}
.tt-capture-stack .ddz-card-rank,.tt-capture-stack .ddz-card-suit{font-size:13px}
.tt-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;min-height:48px}.tt-controls button{min-height:44px}
.tt-hand{display:flex;overflow-x:auto;max-width:100%;min-height:100px;padding:16px 6px 4px;gap:0;overscroll-behavior-inline:contain}
.tt-hand .ddz-card{flex:0 0 56px;width:56px;height:78px;position:relative;margin-inline-end:-12px;cursor:pointer}
.tt-hand .ddz-card.chosen{transform:translateY(-12px);outline:2px solid #247b61}#ttHand .ddz-card:disabled{opacity:1;cursor:default}
#ttPlay[data-visible="false"] .tt-hand{justify-content:center;min-height:64px;padding:4px}#ttPlay[data-visible="false"] .tt-hand .ddz-card{width:40px;flex-basis:40px;height:56px;margin:0}
.tt-back{background:repeating-linear-gradient(45deg,#235f51,#235f51 4px,#327362 4px,#327362 7px)!important;color:#fff!important;display:grid;place-items:center;font-size:28px;border:3px solid #efeace!important}
.tt-status,.tt-message{min-height:1.6em;font-size:12px;line-height:1.6;margin:3px 0;overflow-wrap:anywhere}.tt-message:empty{display:none}
.tt-hand-empty{font-size:12px;color:var(--muted);align-self:center}
.tt-settings{display:grid;gap:14px}.tt-settings label,.tt-independent{display:flex;align-items:center;gap:8px;line-height:1.6}.tt-settings:disabled{opacity:.55}.tt-independent{font-weight:bold}.tt-setup-description{font-size:13px;line-height:1.7}
.tt-result-actions{display:flex;flex-wrap:wrap;gap:8px}.tt-rule-list{font-family:system-ui,sans-serif;line-height:1.8;font-size:15px}.tt-rule-list li{margin-block:10px}
body:not(.info-reading):has(#ttPlay:not(.hidden)) #donationFooter{display:none}body:not(.info-reading):has(#ttPlay:not(.hidden)){padding-bottom:0}body:not(.info-reading):has(#ttPlay:not(.hidden)) .shell{padding-bottom:max(6px,env(safe-area-inset-bottom))}
@media(orientation:landscape) and (max-height:500px){
 body:not(.info-reading):has(#ttPlay:not(.hidden)) .shell>header{display:none}
 body:not(.info-reading):has(#ttPlay:not(.hidden)) .shell{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))}
 #ttPlay{padding:6px}.tt-head h2{font-size:16px}.tt-head-actions button{min-height:32px;padding-block:3px}.tt-options{margin:2px 0;font-size:12px}
 .tt-seat{min-height:34px;padding:2px 5px;font-size:12px}.tt-seat .user-avatar{width:24px;height:24px;min-width:24px;font-size:14px}
 .tt-arena{grid-template-rows:minmax(102px,1fr) auto auto auto auto}.tt-train-nav{min-height:28px}.tt-train-nav button{min-height:28px;padding:2px 6px}.tt-train{--tt-card-w:56px;--tt-card-h:64px}
 .tt-captured{top:30px;max-height:calc(100% - 30px)}.tt-capture-stack{max-height:58px}
 .tt-hand{min-height:78px;padding-top:14px}.tt-hand .ddz-card{width:48px;flex-basis:48px;height:60px}
 #ttPlay[data-visible="false"] .tt-hand{min-height:44px;padding:2px}#ttPlay[data-visible="false"] .tt-hand .ddz-card{height:40px;width:30px;flex-basis:30px}
 .tt-status{font-size:11px;min-height:18px;margin:2px 0}.tt-collected-back{width:17px;height:23px}
}
@media(prefers-reduced-motion:reduce){#ttPlay *{scroll-behavior:auto}}
