/* Local layout proposal: table fitting affects direct table cards only.
   Played card owns an independent viewport band, never the fitted table flow. */
body .game .table-stage .table-round[data-fit=overlap],body .game .table-stage .table-round[data-fit=overflow]{row-gap:var(--rg,9px)!important;padding-top:5px!important;padding-bottom:calc(var(--ov,0px) + 5px)!important;align-content:center}
body .game .table-stage .table-round[data-fit=overlap] > .playing-card,body .game .table-stage .table-round[data-fit=overflow] > .playing-card{margin-bottom:calc(-1*var(--ov,0px))}
body .game .table-stage .table-round[data-scaled] > .playing-card{width:calc(var(--bw)*var(--k))!important;min-width:0!important;height:calc(var(--bh)*var(--k))!important}
body .game .table-stage .table-round[data-scaled] > .playing-card .corner{font-size:calc(16px*var(--k));line-height:calc(15px*var(--k))}
body .game .table-stage .table-round[data-scaled] > .playing-card .corner small{font-size:calc(12px*var(--k));line-height:calc(12px*var(--k))}
body .game .table-stage .table-round[data-scaled] > .playing-card .pip{font-size:calc(24px*var(--k));top:calc(36px*var(--k));line-height:calc(26px*var(--k))}
body .game .table-stage .table-round[data-fit=overlap] > .playing-card.chosen,body .game .table-stage .table-round[data-fit=overflow] > .playing-card.chosen{outline-offset:-4px;background:#f6e9b8}
body .compact-basra .game .table-stage .table-round .played-move{position:fixed;inset:auto auto 12px 50%;transform:translateX(-50%);width:130px;max-width:none;margin:0;padding:7px;z-index:20;background:#124331;border:1px dashed #cdb97b;box-shadow:0 2px 12px #0005}
body .compact-basra .game .table-stage .table-round:has(.played-move){overflow:visible}
.character-scene-pair{display:none}
/* One fixed-budget landscape proposal. Local only, no rule/ACK changes. */
@media (orientation:landscape) and (max-height:500px){
 body .compact-basra .game{height:100dvh!important;min-height:0!important;max-width:880px!important;overflow:hidden}
 body .compact-basra .game .opponent{top:2px!important;left:28%!important;right:28%!important;height:21px!important;min-height:21px!important;padding:0!important;justify-content:center;gap:8px}
 body .compact-basra .game .opponent strong{font-size:12px}
 body .compact-basra .game .table-top{position:absolute;top:25px!important;left:21%!important;right:21%!important;height:16px;margin:0!important;font-size:10px!important;gap:5px;flex-wrap:nowrap;white-space:nowrap;z-index:6}
 body .compact-basra .game .table-top span{color:#fff0cb!important}
 body .compact-basra .game .table-score{top:43px!important;left:24%!important;right:24%!important;min-height:34px!important;height:34px;padding:1px 5px!important}
 body .compact-basra .game .table-score b{font-size:17px}
 body .compact-basra .game .table-score span{font-size:10px}
 body .compact-basra .game .table-score small{font-size:8px}
 body .compact-basra .game .dealer-beside-table{position:absolute;top:78px!important;left:38%;right:38%;margin:0!important;font-size:10px;line-height:16px;height:16px;min-height:0;padding:0 3px;z-index:6}
 body .compact-basra .game .table-stage .table-round,body .compact-basra .game .table-stage .table-round:has(.played-move){top:96px!important;left:19%;right:auto;width:62%!important;height:135px!important;padding:0!important;gap:5px!important;z-index:4!important;align-content:center;overflow:visible}
 body .compact-basra .game .table-stage .table-round > .playing-card{width:43px!important;min-width:43px!important;height:65px!important;margin:0!important}
 body .compact-basra .game .table-stage .table-round > .playing-card .corner{font-size:17px!important;line-height:16px!important;left:3px;top:3px}
 body .compact-basra .game .table-stage .table-round > .playing-card .corner small{font-size:12px!important;line-height:12px!important}
 body .compact-basra .game .table-stage .table-round > .playing-card .pip{font-size:22px!important;line-height:23px!important;top:26px!important}
 body .compact-basra .game .character-scene{opacity:0!important;top:48px!important;height:300px!important;width:100%!important;pointer-events:none}
 body .compact-basra .game .character-scene-pair{display:block;position:absolute;top:48px;left:0;width:100%;height:300px;pointer-events:none;z-index:0}
 body .compact-basra .game .character-side{position:absolute;top:0;height:300px;width:19%;overflow:hidden}
 body .compact-basra .game .character-side-left{left:0}
 body .compact-basra .game .character-side-right{right:0}
 body .compact-basra .game .character-side img{position:absolute;top:0;width:450px!important;height:300px!important;max-width:none!important;object-fit:contain}
 body .compact-basra .game .character-side-left img{left:0}
 body .compact-basra .game .character-side-right img{right:0}
 body .compact-basra .game .hand-header{position:absolute;top:232px!important;left:calc(50% - 95px);right:auto;width:190px;margin:0;font-size:10px;height:15px}
 body .compact-basra .game .round-cards:not(.table-round){top:248px!important;left:25%;right:25%;min-height:65px!important;gap:6px}
 body .compact-basra .game .round-cards:not(.table-round) .playing-card{width:43px!important;min-width:43px!important;height:65px!important}
 body .compact-basra .game .round-cards:not(.table-round) .corner{font-size:17px!important;line-height:16px!important}
 body .compact-basra .game .round-cards:not(.table-round) .corner small{font-size:12px!important;line-height:12px!important}
 body .compact-basra .game .round-cards:not(.table-round) .pip{font-size:22px!important;line-height:23px!important;top:26px!important}
 body .compact-basra .game .round-instruction.essential{position:absolute;top:43px!important;left:2%!important;right:auto!important;width:19%;margin:0!important;padding:2px!important;min-height:0;font-size:10px!important;line-height:12px}
 body .compact-basra .game .table-stage .table-round .played-move{left:auto;right:19%;top:235px;bottom:auto;width:100px;padding:3px;transform:none}
 body .compact-basra .game .table-stage .played-move .playing-card{width:50px!important;min-width:50px!important;height:76px!important}
 body .compact-basra .game .table-stage .played-move .corner{font-size:20px!important;line-height:19px!important}
 body .compact-basra .game .table-stage .played-move .corner small{font-size:14px!important;line-height:14px!important}
 body .compact-basra .game .table-stage .played-move .pip{font-size:25px!important;line-height:26px!important;top:31px!important}
 body .compact-basra .game .dealer-table-notice{inset:0;max-height:100%}
 body .compact-basra .match-controls>.previous-reports{position:fixed;bottom:0;left:20%;right:20%;width:60%!important;max-width:none;z-index:22;margin:0!important;font-size:11px;border-radius:8px 8px 0 0}
 body .compact-basra .previous-reports>summary{min-height:28px!important;height:28px;line-height:28px;padding:0!important;box-sizing:border-box}
 body .compact-basra .previous-reports[open]{max-height:80dvh;overflow:auto;box-shadow:0 0 0 100vmax #0008}
 body:has(.compact-basra .game) .dealer-mark-note{top:78px!important;padding:0 10px!important;height:16px;line-height:16px;font-size:11px}
 body .compact-basra .game .table-stage .played-move>small{display:block;font-size:9px;line-height:10px}
 body .compact-basra .game .table-stage{isolation:auto}
}

/* Separate local portrait proposal: pending card belongs to table's lower band. */
@media (orientation:portrait){
 body .compact-basra .game:has(.played-move){height:calc(100dvh - 44px)!important;min-height:730px!important}
 body .compact-basra .game .table-stage .table-round .played-move{position:absolute;top:calc(100% + 8px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:130px;padding:7px}
 body .compact-basra .game:has(.played-move) .hand-header{top:552px!important}
 body .compact-basra .game:has(.played-move) .round-cards:not(.table-round){top:572px!important}
 body .compact-basra .game:has(.played-move) .round-instruction.essential{top:677px!important}
}

/* Approved count presentation: the existing server-fed hand count stays visible. */
.compact-basra .game .opponent small{display:block!important;font-size:14px!important;line-height:18px;color:#f4e6bf;font-weight:700;white-space:nowrap}
.compact-basra .game .opponent{height:42px!important;min-height:42px!important}
.compact-basra .game .opponent strong{font-size:12px}
@media(orientation:landscape) and (max-height:500px){
 body .compact-basra .game .opponent{height:21px!important;min-height:21px!important}
 body .compact-basra .game .opponent>div:not(.card-backs){display:flex;align-items:center;gap:8px}
}

/* Approved grip and option2 burgundy. Decorative card backs only. */
.held-character-pair{position:absolute;inset:135px 0 auto;height:200px;pointer-events:none;z-index:0;display:block}
.held-character-pair>img{position:absolute;top:0;width:84px!important;height:200px!important;max-width:none!important;object-fit:contain}
.held-character-left{left:0}.held-character-right{right:0}
@media(orientation:landscape) and (max-height:500px){body .compact-basra .game .held-character-pair{top:48px;height:300px}body .compact-basra .game .held-character-pair>img{width:126px!important;height:300px!important}}
/* Keep landscape header text inside the table frame, preserving separate bands. */
@media(orientation:landscape) and (max-height:500px){
 body .compact-basra .game .opponent{top:18px!important}
 body .compact-basra .game .table-top{top:41px!important}
 body .compact-basra .game .table-score{top:59px!important}
 body .compact-basra .game .dealer-beside-table{top:94px!important}
 body:has(.compact-basra .game) .dealer-mark-note{top:94px!important}
 body .compact-basra .game .table-stage .table-round,body .compact-basra .game .table-stage .table-round:has(.played-move){top:112px!important}
 body .compact-basra .game .hand-header{top:248px!important}
 body .compact-basra .game .round-cards:not(.table-round){top:264px!important}
 body .compact-basra .game .table-stage .table-round .played-move{top:251px}
}

/* Legibility fix: light badge on the light table, in both languages. */
body .compact-basra .game .table-stage .empty-message{background:#fff4d8!important;color:#2b4551!important;border:1px solid #c2ad79;border-radius:8px;padding:6px 10px}
/* Reveal help sits below the decorative character, clear of its face. */
@media(orientation:landscape) and (max-height:500px){
 body .compact-basra .game .round-instruction.essential{top:316px!important;left:6%!important;right:auto!important;width:18%;max-width:152px;font-size:9px!important;line-height:11px}
}

/* Clean table: retain reports/data/export code, hide only lower report panels. */
.end-details,.previous-reports{display:none!important}
