/* Four real seats share the entire usable table. Saved per-orientation object
   offsets still apply through DouniuLayout; no IDs or saved values are reset. */
body.yy9-douniu{--dn-header:52px;--dn-actions:104px;background-color:#061b16}
.yy9-douniu .hdr{height:calc(var(--dn-header) + env(safe-area-inset-top));padding-inline:max(10px,env(safe-area-inset-left));box-shadow:0 2px 10px #0006}
.yy9-douniu .game-viewport{width:100%;height:calc(100dvh - var(--dn-header) - env(safe-area-inset-top));margin-top:calc(var(--dn-header) + env(safe-area-inset-top));padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);perspective:none}
.yy9-douniu .game-wrap{width:100%;height:100%;min-width:0;min-height:0;display:block;transform-style:flat;backface-visibility:visible;will-change:auto}
.yy9-douniu .game-wrap::before{background:radial-gradient(ellipse at 50% 40%,#50d59d14,transparent 65%);z-index:0}
.yy9-douniu .table-frame{inset:3px;border-radius:30px;border-color:#e1bb6970;box-shadow:inset 0 0 45px #0003,0 0 0 1px #322616}
.yy9-douniu .players-row,.yy9-douniu .game-wrap.round-finished .players-row{position:absolute;inset:0;padding:0;display:block;pointer-events:none;z-index:3}
.yy9-douniu .p-slot,.yy9-douniu .game-wrap .p-slot{position:absolute;width:148px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;padding:0;border:0;background:none;transform:none;pointer-events:auto}
.yy9-douniu #slot1{left:50%;top:30px;transform:translateX(-50%)}
.yy9-douniu #slot2{left:4px;top:34%}
.yy9-douniu #slot3{right:4px;top:34%}
.yy9-douniu .p-avatar,.yy9-douniu .game-wrap.round-finished .p-avatar{width:42px;height:42px;min-height:42px;font-size:22px;border-radius:12px;border-color:#e7c273;box-shadow:0 3px 12px #0007}
.yy9-douniu .p-avatar>span:last-child,.yy9-douniu .p-avatar img{border-radius:9px!important}
.yy9-douniu .p-avatar.banker{box-shadow:0 0 0 2px #dfb96044,0 0 12px #f7cf5366}
.yy9-douniu .banker-tag{top:-8px;left:auto;right:-12px;transform:none;padding:1px 6px;font-size:10px;border-radius:6px}
.yy9-douniu .p-name{font-size:12px;line-height:17px;max-width:136px;color:#fff5d6}
.yy9-douniu .ai-tag{font-size:9px;padding:0 4px;line-height:12px;background:#06181380;color:#c1b88f;border-color:#dbbf6044}
.yy9-douniu .p-wallet{font-size:11px;line-height:14px;min-height:14px;margin:0;color:#efd794}
.yy9-douniu .p-bet:empty{display:none}
.yy9-douniu .p-hand,.yy9-douniu .game-wrap.round-finished .p-hand{height:49px;min-height:49px;margin:4px 0 0;gap:0;overflow:visible}
.yy9-douniu .p-hand:empty{height:0;min-height:0;margin:0}
.yy9-douniu .card.sm{width:31px;height:45px;border-radius:4px;font-size:11px}
.yy9-douniu .p-hand .card.sm+.card.sm{margin-left:-9px}
.yy9-douniu .card.sm .cr{font-size:12px}.yy9-douniu .card.sm .cs{font-size:10px}
.yy9-douniu .p-result{font-size:11px;line-height:16px;min-height:16px;max-width:148px;white-space:normal;text-shadow:0 1px 3px #000}
.yy9-douniu .center,.yy9-douniu .game-wrap.round-finished .center{position:absolute;left:50%;top:56%;bottom:auto;transform:translate(-50%,-50%);width:calc(100% - 36px);padding:0;min-height:0;display:block;pointer-events:none;z-index:2}
.yy9-douniu .phase-lbl,.yy9-douniu .game-wrap.round-finished .phase-lbl{position:static;min-height:22px;width:auto;font-size:16px;line-height:1.4;letter-spacing:1px;text-align:center;color:#f3dfad;text-shadow:0 2px 5px #000}
/* Banker cards remain with their actual seat; the old duplicate large hand is
   retained in the DOM for layout/config compatibility, but is not drawn twice. */
.yy9-douniu .center .banker-lbl,.yy9-douniu .center .banker-hand,.yy9-douniu .center .niu-display{display:none!important}
.yy9-douniu .self-area,.yy9-douniu .game-wrap.round-finished .self-area{position:absolute;top:auto;bottom:var(--dn-actions);left:10px;right:10px;width:auto;height:142px;margin:0;padding:8px;display:grid;grid-template-columns:82px minmax(0,1fr);grid-template-rows:1fr 26px;align-items:center;gap:0 5px;background:none;border:0;border-radius:0;box-shadow:none;overflow:visible;z-index:4}
.yy9-douniu .self-row,.yy9-douniu .game-wrap.round-finished .self-row{position:static;grid-column:1;grid-row:1/3;width:auto;padding:0;display:flex;flex-direction:column;gap:3px;align-self:center}
.yy9-douniu .self-av-wrap{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%}
.yy9-douniu .self-avatar-el{width:44px;height:44px;border-radius:12px;border-color:#efcf7b;background-color:#1b2c20;box-shadow:0 3px 12px #0007}
.yy9-douniu .self-name-el{max-width:82px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px}
.yy9-douniu .self-role-el{max-width:none;width:82px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.45;text-align:center;font-size:10px;color:#d6cbab}
.yy9-douniu .self-row>div:last-child,.yy9-douniu .game-wrap.round-finished .self-row>div:last-child{display:none}
.yy9-douniu .self-hand,.yy9-douniu .game-wrap.round-finished .self-hand{grid-column:2;grid-row:1;align-self:end;min-height:60px;padding:0 0 5px;gap:4px;overflow:visible;align-items:flex-end}
.yy9-douniu .self-hand .card,.yy9-douniu .game-wrap.round-finished .self-hand .card{width:37px;height:54px;border-radius:5px}
.yy9-douniu .self-hand .cr{font-size:15px}.yy9-douniu .self-hand .cs{font-size:12px}
.yy9-douniu .self-result,.yy9-douniu .game-wrap.round-finished .self-result{grid-column:2;grid-row:2;align-self:start;padding:0;font-size:13px;line-height:20px;min-height:20px;color:#ffdf83;text-shadow:0 2px 5px #000}
.yy9-douniu .bet-area{position:absolute;left:12px;right:12px;bottom:12px;width:auto;max-width:none;height:82px;margin:0;padding:0;transform:none;display:grid;grid-template-columns:1fr 100px;grid-template-rows:20px 48px;gap:5px 8px;border:0;background:none;box-shadow:none;z-index:8}
.yy9-douniu .bet-label{grid-column:1;grid-row:1;text-align:left;padding-left:5px;font-size:11px;color:#d2c69d}
.yy9-douniu .bet-row{grid-column:1;grid-row:2;gap:4px;align-items:center}
.yy9-douniu .chip-btn{min-width:0;min-height:40px;padding:7px 2px;border-radius:20px;font-size:12px;background:linear-gradient(#183a2f,#081e17);border-color:#bba16d;color:#f9e4ac;box-shadow:inset 0 1px 0 #fff2,0 3px 7px #0006}
.yy9-douniu .chip-btn.sel{background:linear-gradient(#a82c21,#60120f);border-color:#f8d574;color:#fff1bb}
.yy9-douniu .btn-deal{grid-column:2;grid-row:1/3;height:58px;min-height:44px;align-self:center;padding:8px;letter-spacing:2px;font-size:18px;border-radius:14px}
.yy9-douniu .bet-area.round-finished,.yy9-douniu .game-wrap.round-finished .bet-area{display:none}
.yy9-douniu .round-actions{top:auto;bottom:24px;left:12px;right:12px;transform:none;width:auto;max-width:none;height:52px;gap:7px;align-items:stretch}
.yy9-douniu .round-actions button{padding:8px 4px;font-size:13px;min-height:44px;border-radius:12px;letter-spacing:0}
.yy9-douniu .round-actions .continue-btn{flex:1.5;font-size:18px;letter-spacing:2px;min-height:44px}
.yy9-douniu #gw #cw-root,.yy9-douniu #gw.round-finished #cw-root{left:auto;right:10px;bottom:calc(var(--dn-actions) + 148px);width:64px;max-width:64px}
.yy9-douniu #gw #cw-strip{height:30px;padding:0 6px;border-radius:9px;border:1px solid #d4b56b66}
.yy9-douniu #gw #cw-strip-txt{font-size:9px}.yy9-douniu #gw #cw-toggle{font-size:12px}
.yy9-douniu #gw #cw-root:has(#cw-panel[style*="flex"]){width:240px;max-width:min(280px,80%)}
.yy9-douniu .niu-burst{min-width:76px;height:34px;padding:0 8px;font-size:20px;letter-spacing:1px}
.yy9-douniu .niu-burst::before{inset:-8px -10px;filter:blur(10px);opacity:.5}
.yy9-douniu .niu-burst::after{inset:-3px -6px}
@media (orientation:landscape){
  body.yy9-douniu{--dn-header:44px;--dn-actions:63px}
  .yy9-douniu .hdr{display:flex;gap:10px}.yy9-douniu .hdr-title{font-size:15px}.yy9-douniu .wallet-txt{order:2}.yy9-douniu .hdr-actions{order:3}
  .yy9-douniu .game-viewport{background:#062430 url('./assets/table/felt.jpg') center/cover no-repeat}
  .yy9-douniu .table-frame{border-radius:28px}
  .yy9-douniu #slot1{top:9px;width:220px;display:grid;grid-template-columns:46px 1fr;column-gap:7px;row-gap:0;justify-items:center;align-items:center}
  .yy9-douniu #slot1 .p-avatar{grid-column:1;grid-row:1/4}.yy9-douniu #slot1 .p-name{grid-column:2;grid-row:1}.yy9-douniu #slot1 .ai-tag{grid-column:2;grid-row:2}.yy9-douniu #slot1 .p-wallet{grid-column:2;grid-row:3}
  .yy9-douniu #slot1 .p-hand{grid-column:1/3;grid-row:4;margin-top:4px;height:40px;min-height:40px}.yy9-douniu #slot1 .p-result{grid-column:1/3;grid-row:5}
  .yy9-douniu #slot2{left:12px;top:26%;width:160px}.yy9-douniu #slot3{right:12px;top:26%;width:160px}
  .yy9-douniu .p-avatar,.yy9-douniu .game-wrap.round-finished .p-avatar{width:36px;height:36px;min-height:36px;border-radius:10px}
  .yy9-douniu .p-name{font-size:11px;line-height:15px}.yy9-douniu .p-wallet{font-size:10px;line-height:13px;min-height:13px}.yy9-douniu .p-hand,.yy9-douniu .game-wrap.round-finished .p-hand{height:42px;min-height:42px;margin-top:4px}
  .yy9-douniu .card.sm{width:27px;height:39px}.yy9-douniu .p-hand .card.sm+.card.sm{margin-left:-7px}.yy9-douniu .p-result{font-size:10px;line-height:14px;min-height:14px}
  .yy9-douniu .center,.yy9-douniu .game-wrap.round-finished .center{top:45%;width:calc(100% - 350px)}
  .yy9-douniu .phase-lbl,.yy9-douniu .game-wrap.round-finished .phase-lbl{font-size:13px;min-height:18px}
  .yy9-douniu .self-area,.yy9-douniu .game-wrap.round-finished .self-area{left:50%;right:auto;transform:translateX(-50%);width:310px;height:100px;padding:0;grid-template-columns:82px minmax(0,1fr);grid-template-rows:1fr 20px;bottom:var(--dn-actions)}
  .yy9-douniu .self-avatar-el{width:34px;height:34px;border-radius:10px}.yy9-douniu .self-name-el{font-size:11px;line-height:15px}.yy9-douniu .self-role-el{font-size:9px;line-height:1.25}
  .yy9-douniu .self-hand,.yy9-douniu .game-wrap.round-finished .self-hand{min-height:48px;padding:0 0 3px;gap:4px}.yy9-douniu .self-hand .card,.yy9-douniu .game-wrap.round-finished .self-hand .card{width:31px;height:45px}
  .yy9-douniu .self-hand .cr{font-size:13px}.yy9-douniu .self-hand .cs{font-size:10px}.yy9-douniu .self-result,.yy9-douniu .game-wrap.round-finished .self-result{font-size:12px;line-height:18px}
  .yy9-douniu .bet-area{left:50%;right:auto;bottom:9px;width:400px;max-width:calc(100% - 80px);height:46px;grid-template-columns:1fr 110px;grid-template-rows:46px;gap:8px;transform:translateX(-50%)}
  .yy9-douniu .bet-label{display:none}.yy9-douniu .bet-row{grid-row:1}.yy9-douniu .btn-deal{grid-row:1;height:44px;min-height:44px;font-size:17px}.yy9-douniu .chip-btn{min-height:37px;font-size:12px}
  .yy9-douniu .round-actions{left:50%;right:auto;bottom:9px;width:400px;max-width:calc(100% - 80px);height:44px;transform:translateX(-50%)}
  .yy9-douniu #gw #cw-root,.yy9-douniu #gw.round-finished #cw-root{right:10px;bottom:10px}
}
@media (orientation:portrait) and (max-height:720px){
  .yy9-douniu #slot1{top:14px;width:190px;display:grid;grid-template-columns:40px 1fr;column-gap:6px;row-gap:0;justify-items:center;align-items:center}
  .yy9-douniu #slot1 .p-avatar{grid-column:1;grid-row:1/4}.yy9-douniu #slot1 .p-name{grid-column:2;grid-row:1}.yy9-douniu #slot1 .ai-tag{grid-column:2;grid-row:2}.yy9-douniu #slot1 .p-wallet{grid-column:2;grid-row:3}
  .yy9-douniu #slot1 .p-hand{grid-column:1/3;grid-row:4}.yy9-douniu #slot1 .p-result{grid-column:1/3;grid-row:5}
  .yy9-douniu #slot2,.yy9-douniu #slot3{top:26%;width:140px}
  .yy9-douniu .p-avatar,.yy9-douniu .game-wrap.round-finished .p-avatar{width:34px;height:34px;min-height:34px}
  .yy9-douniu .p-hand,.yy9-douniu .game-wrap.round-finished .p-hand{height:42px;min-height:42px;margin-top:2px}
  .yy9-douniu .p-hand .card.sm{width:27px;height:39px}
  .yy9-douniu .p-name{font-size:11px;line-height:15px}.yy9-douniu .p-result{font-size:10px;line-height:14px;min-height:14px}
  .yy9-douniu .center,.yy9-douniu .game-wrap.round-finished .center{top:56%}
  .yy9-douniu .phase-lbl,.yy9-douniu .game-wrap.round-finished .phase-lbl{font-size:14px}
  .yy9-douniu .self-area,.yy9-douniu .game-wrap.round-finished .self-area{height:120px;bottom:91px}
  .yy9-douniu .self-hand .card,.yy9-douniu .game-wrap.round-finished .self-hand .card{width:32px;height:47px}
  .yy9-douniu .bet-area{bottom:8px;height:75px}.yy9-douniu .round-actions{bottom:18px}
  .yy9-douniu #gw #cw-root,.yy9-douniu #gw.round-finished #cw-root{bottom:212px}
}

/* Staged hand: preserve the existing footprint and show selectable face-up cards. */
.yy9-douniu .self-hand .peek-card{appearance:none;position:relative;flex:none;display:block;width:37px;height:54px;padding:0;border:0;background:none;border-radius:5px;touch-action:none;overflow:hidden;cursor:pointer;transition:transform .12s}
.yy9-douniu .self-hand .peek-card .card{margin:0!important;position:absolute;inset:0;width:100%!important;height:100%!important;pointer-events:none}
.yy9-douniu .self-hand .peek-card.picked{transform:translateY(-12px);outline:2px solid #ffe38e;box-shadow:0 0 12px #ffd57680}
.yy9-douniu .peek-help{color:#efdbac;font-size:11px;line-height:1.5;display:block;text-align:left;max-width:100%}
.yy9-douniu #btnNoBanker{min-width:92px;flex:none}
@media(orientation:landscape){.yy9-douniu .self-hand .peek-card{width:31px;height:45px}.yy9-douniu .peek-help{font-size:10px}}
@media(orientation:portrait) and (max-height:720px){.yy9-douniu .self-hand .peek-card{width:32px;height:47px}}
.yy9-douniu .self-role-el{white-space:pre-line;font-size:9px;line-height:1.35;word-break:normal;overflow-wrap:anywhere}

/* Three-card grouping changes presentation only; DOM buttons retain original indices. */
.yy9-douniu .self-hand .peek-card.group-end{margin-inline-end:8px}
