/* Pokerzin Fullscreen Reference V1 — mobile-only, never changes Truco.
   Uses the real table/seat/card DOM: the mockup is NOT a background image. */
/* Outside mobile the original Pokerzin top bar remains in charge. */
html body #game[data-match-type="poker"] #poker-menu-room-info{display:none;}
@media (max-width:900px) and (orientation:portrait), (max-height:600px) and (orientation:landscape) {
 html body #game[data-match-type="poker"] {
   --pk-header:0px!important;
   grid-template-rows:0px minmax(0,1fr) var(--pk-dock)!important;
   background:radial-gradient(ellipse at 50% 12%,#174b39 0%,#08281e 65%,#041510 100%)!important;
 }
 html body #game[data-match-type="poker"] > .topbar {
   display:none!important;visibility:hidden!important;
 }
 html body #game[data-match-type="poker"] > .game-menu-wrap {
   position:fixed!important;top:calc(8px + env(safe-area-inset-top,0px))!important;
   left:calc(9px + env(safe-area-inset-left,0px))!important;
   right:auto!important;bottom:auto!important;z-index:160!important;
 }
 html body #game[data-match-type="poker"] #game-menu-toggle{
   display:flex!important;align-items:center!important;justify-content:center!important;
   width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;
   border:2px solid #ebc36e!important;border-radius:15px!important;
   background:linear-gradient(155deg,#155a40,#04291e)!important;
   box-shadow:0 3px 13px #0009!important;
 }
 html body #game[data-match-type="poker"] #game-menu{
   position:absolute!important;top:calc(100% + 6px)!important;left:0!important;
   width:min(290px,calc(100vw - 24px))!important;
   max-height:calc(100dvh - 85px)!important;overflow-y:auto!important;
   z-index:170!important;
 }
 html body #game[data-match-type="poker"] #poker-menu-room-info {
   display:grid;gap:4px;margin:5px 3px 9px;padding:9px 10px;
   border:1px solid #bd9e58;border-radius:9px;background:#05231b;
   color:#f1e1ba;font-size:12px;line-height:1.4;
 }
 html body #game[data-match-type="poker"] #poker-menu-room-info strong{color:#ffdb7d;}
 html body #game[data-match-type="poker"] .table-wrap {
   grid-row:2!important;min-height:0!important;
   background:transparent!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .poker-card-backs{
   z-index:18!important;visibility:visible!important;opacity:1!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-revealed-holes{
   gap:3px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .poker-seat-plate{
   z-index:20!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .avatar{z-index:7!important;}
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .aura-v5-badge{z-index:22!important;}
 html body #game[data-match-type="poker"] #poker-action-dock{
   background:linear-gradient(180deg,#071d1655,#03150ff5)!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions > button{
   border-radius:13px!important;
 }
}
/* Landscape reference: racetrack dominates space. Card backs and showdown faces
   scale together, maintaining a single place for hidden and revealed cards. */
@media (max-height:600px) and (orientation:landscape) {
 html body #game[data-match-type="poker"]{
   --pk-dock:calc(clamp(55px,15dvh,79px) + var(--pk-bottom))!important;
   --pk3-round:clamp(43px,13.5dvh,61px)!important;
   --pk3-plate:clamp(85px,11.5vw,135px)!important;
 }
 html body #game[data-match-type="poker"][data-poker-dock-panel="showdown"]{
   --pk-dock:calc(clamp(76px,20dvh,92px) + var(--pk-bottom))!important;
 }
 html body #game[data-match-type="poker"][data-poker-dock-panel="result"]{
   --pk-dock:calc(clamp(100px,27dvh,126px) + var(--pk-bottom))!important;
 }
 html body #game[data-match-type="poker"] .table-wrap{
   padding-top:1px!important;padding-bottom:2px!important;
 }
 html body #game[data-match-type="poker"] .table-wrap::before{
   background-size:contain!important;opacity:1!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .poker-card-backs{
   top:4px!important;gap:2px!important;
 }
 /* Opponent cards are styled in a single contract below, for closed and shown cards. */
 html body #game[data-match-type="poker"] #me.poker-hero-round{
   transform:translateY(-12px)!important;
 }
 html body #game[data-match-type="poker"] #hand{
   transform:translateY(-7px)!important;
 }
 html body #game[data-match-type="poker"] .poker-pot-panel{
   transform:translateY(0)!important;
 }
}
/* Portrait is its own composition; never stretch the racetrack artwork to fake landscape. */
@media (max-width:900px) and (orientation:portrait){
 html body #game[data-match-type="poker"]{
   --pk-dock:calc(clamp(62px,10dvh,83px) + var(--pk-bottom))!important;
   --pk3-round:clamp(39px,10vw,47px)!important;
 }
 html body #game[data-match-type="poker"][data-poker-dock-panel="showdown"]{
   --pk-dock:calc(104px + var(--pk-bottom))!important;
 }
 html body #game[data-match-type="poker"][data-poker-dock-panel="result"]{
   --pk-dock:calc(148px + var(--pk-bottom))!important;
 }
 html body #game[data-match-type="poker"] .table-wrap::before{
   background-size:contain!important;
 }
 /* Portrait uses the same closed/revealed sizing tokens defined below. */
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .poker-card-backs{
   top:2px!important;gap:1px!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions{
   grid-template-columns:repeat(3,minmax(0,1fr))!important;
 }
}

/* SINGLE RESPONSIVE CONTRACT: real opponent cards, not faded miniatures.
   Higher priority than poker-seat-premium-v3 and poker-mobile-final.
   No shared Truco selectors, no card images or gameplay rules changed. */
@media (max-width:900px) and (orientation:portrait), (max-height:600px) and (orientation:landscape) {
 html body #game[data-match-type="poker"]{
   --poker-opponent-card-width:clamp(28px,3.7vw,40px);
   --poker-opponent-card-height:clamp(40px,5.2vw,56px);
   --poker-revealed-rank-size:clamp(13px,1.7vw,18px);
   --poker-revealed-suit-size:clamp(18px,2.4vw,25px);
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .poker-card-backs {
   height:var(--poker-opponent-card-height)!important;
   min-height:var(--poker-opponent-card-height)!important;
   overflow:visible!important;opacity:1!important;filter:none!important;
   align-items:flex-start!important;gap:3px!important;z-index:18!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-card-backs > i,
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole.poker-card {
   box-sizing:border-box!important;
   display:block!important;flex:0 0 var(--poker-opponent-card-width)!important;
   width:var(--poker-opponent-card-width)!important;min-width:var(--poker-opponent-card-width)!important;
   max-width:var(--poker-opponent-card-width)!important;
   height:var(--poker-opponent-card-height)!important;min-height:var(--poker-opponent-card-height)!important;
   max-height:var(--poker-opponent-card-height)!important;
   border:2px solid #dfbb6b!important;border-radius:5px!important;
   opacity:1!important;filter:none!important;mix-blend-mode:normal!important;
   transform:none!important;box-shadow:0 3px 7px #0008!important;
   backface-visibility:visible!important;visibility:visible!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round > .poker-revealed-holes {
   transform:none!important;overflow:visible!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole.poker-card {
   position:relative!important;padding:0!important;overflow:hidden!important;
   background:#fffdfa!important;color:#111!important;
   font-family:Georgia,'Times New Roman',serif!important;
   font-size:var(--poker-revealed-rank-size)!important;
   line-height:1!important;font-weight:900!important;
   -webkit-text-fill-color:currentColor;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole.poker-card.red {
   color:#c41b2c!important;-webkit-text-fill-color:#c41b2c!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole .poker-corner.top {
   display:grid!important;position:absolute!important;inset:2px auto auto 2px!important;
   line-height:1!important;gap:0!important;justify-items:start!important;
   opacity:1!important;filter:none!important;transform:none!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole .poker-corner.top strong {
   display:block!important;font-size:var(--poker-revealed-rank-size)!important;
   font-weight:900!important;line-height:1!important;color:inherit!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole .poker-corner.top i {
   display:block!important;font-size:calc(var(--poker-revealed-rank-size)*.72)!important;
   font-style:normal!important;line-height:1!important;color:inherit!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole .poker-corner.bottom {
   display:none!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-mini-hole .poker-suit-center {
   display:block!important;position:absolute!important;
   left:58%!important;top:57%!important;
   font-size:var(--poker-revealed-suit-size)!important;
   line-height:1!important;opacity:1!important;filter:none!important;
   color:inherit!important;transform:translate(-50%,-50%)!important;
 }
 html body #game[data-match-type="poker"] .poker-seat.poker-seat-round .poker-cards-won .poker-mini-hole.poker-card{
   border-color:#ffda66!important;outline:2px solid #ffda66!important;
   box-shadow:0 0 10px #fcd450,0 2px 7px #000b!important;
 }
}
@media (max-width:900px) and (orientation:portrait) {
 html body #game[data-match-type="poker"]{
   --poker-opponent-card-width:clamp(19px,5.5vw,26px);
   --poker-opponent-card-height:clamp(29px,7.6vw,38px);
   --poker-revealed-rank-size:clamp(11px,2.7vw,14px);
   --poker-revealed-suit-size:clamp(13px,3.8vw,18px);
 }
}
@media (max-height:355px) and (orientation:landscape){
 html body #game[data-match-type="poker"]{
   --poker-opponent-card-width:clamp(26px,3.4vw,35px);
   --poker-opponent-card-height:clamp(37px,4.7vw,48px);
 }
}
