:root{--glass-bg:rgba(5,8,12,.54);--glass-bg-strong:rgba(4,6,10,.70);--glass-border:rgba(235,205,127,.22);--glass-shadow:0 14px 34px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.055)}
html[data-table-theme] :is(.top,.home-card,.entry-auth-card,.profile-page-head,.profile-page-hero,.profile-section.profile-panel,.profile-page-stat,.profile-mode-card,.profile-mission,.profile-achievement,.profile-detail-row,.profile-level-row,.lobby-hero,.profile-card,.match-card,.friend-action-card,.search-stage,.found-stage,.private-room-panel,.dialog-card,.score-history-card,.last-trick-card,.pause-card,.resume-card,.offline-settings-card,.result-card,.player-action-card,.confirm-card,.history-row,.match-history-row,.ranking-row,.network-banner,.choice-panel,.trump-picker,.game-menu-card){border-color:var(--glass-border)!important;background:var(--glass-bg)!important;background-image:none!important;box-shadow:var(--glass-shadow)!important;backdrop-filter:blur(13px) saturate(112%)!important;-webkit-backdrop-filter:blur(13px) saturate(112%)!important}
html[data-table-theme] :is(.screen:not(.game),.page,.box,.shell:not(.game-active) main){background-color:transparent!important;background-image:none!important}
html[data-table-theme] :is(.lobby-tool-btn,.match-mode,.profile-page-action,.profile-frame-btn,.found-player,.stat,.player-summary-stat,.player-summary-details,.result-progress,.rematch-status,.offline-result-actions .ghost,.ghost,.danger){background:rgba(5,8,12,.48)!important;background-image:none!important;border-color:rgba(235,205,127,.18)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}
html[data-table-theme] .card-settings-dialog{background:transparent!important;box-shadow:0 24px 70px rgba(0,0,0,.46)!important}
html[data-table-theme] .card-settings-dialog::backdrop{background:rgba(0,2,5,.56)!important;backdrop-filter:blur(7px)!important;-webkit-backdrop-filter:blur(7px)!important}
html[data-table-theme] .card-settings-shell{background:rgba(4,6,10,.52)!important;background-image:none!important;backdrop-filter:blur(18px) saturate(112%)!important;-webkit-backdrop-filter:blur(18px) saturate(112%)!important}
html[data-table-theme] .card-settings-head,html[data-table-theme] .card-settings-footer{background:rgba(2,4,8,.42)!important;background-image:none!important;border-color:rgba(235,205,127,.16)!important}
html[data-table-theme] .card-settings-body{background:transparent!important;background-image:none!important}
html[data-table-theme] .card-settings-dialog :is(.appearance-section,.table-theme-option,.card-theme-option,.motion-setting-option,.hand-layout-option){background:rgba(5,8,12,.44)!important;background-image:none!important;border-color:rgba(235,205,127,.16)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.045)!important;backdrop-filter:blur(9px)!important;-webkit-backdrop-filter:blur(9px)!important}
html[data-table-theme] .card-settings-dialog :is(.table-theme-option,.card-theme-option,.motion-setting-option,.hand-layout-option).selected{background:rgba(28,24,13,.54)!important;background-image:none!important;border-color:rgba(246,215,132,.72)!important;box-shadow:0 0 0 2px rgba(238,200,106,.12),inset 0 1px 0 rgba(255,255,255,.07)!important}
html[data-table-theme] .royal-scoreboard{background:rgba(4,7,11,.48)!important;background-image:none!important;backdrop-filter:blur(10px) saturate(110%)!important;-webkit-backdrop-filter:blur(10px) saturate(110%)!important}
html[data-table-theme] .player-info,html[data-table-theme] .team-trick-counter{background:rgba(3,6,10,.62)!important;background-image:none!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important}
html[data-table-theme] dialog{background:transparent!important}
@media(prefers-reduced-transparency:reduce){html[data-table-theme] :is(.top,.home-card,.entry-auth-card,.profile-page-head,.profile-page-hero,.profile-section.profile-panel,.lobby-hero,.profile-card,.match-card,.dialog-card,.score-history-card,.result-card,.card-settings-shell){background:rgba(5,8,12,.86)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}}

/* Saltanat 0.3.181 — translucent in-game messages keep cards visible underneath. */
html[data-table-theme] #gameScreen :is(
  .table-status,
  .hand-hidden,
  .game-reconnect-banner,
  .network-banner,
  .quick-chat-bubble,
  .royal-trump-announcement,
  .royal-bid-announcement,
  .royal-cut-badge
),
html[data-table-theme] .toasts .toast{
  background:rgba(4,7,11,.42)!important;
  background-image:linear-gradient(145deg,rgba(255,255,255,.045),rgba(0,0,0,.055))!important;
  border-color:rgba(242,213,139,.30)!important;
  color:#fff8e9!important;
  box-shadow:0 10px 26px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.075)!important;
  backdrop-filter:blur(8px) saturate(108%)!important;
  -webkit-backdrop-filter:blur(8px) saturate(108%)!important;
  text-shadow:0 1px 3px rgba(0,0,0,.72)!important;
}
html[data-table-theme] #gameScreen .table-status{
  background:rgba(3,6,10,.34)!important;
  border-color:rgba(242,213,139,.24)!important;
  box-shadow:0 7px 18px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.06)!important;
  backdrop-filter:blur(6px) saturate(106%)!important;
  -webkit-backdrop-filter:blur(6px) saturate(106%)!important;
}
html[data-table-theme] #gameScreen :is(.royal-trump-announcement,.royal-bid-announcement){
  background:rgba(4,7,11,.48)!important;
  border-color:rgba(244,211,126,.38)!important;
}
html[data-table-theme] #gameScreen .royal-cut-badge{
  color:#fff7df!important;
  background:rgba(9,8,6,.46)!important;
  border-color:rgba(255,224,142,.42)!important;
}
html[data-table-theme] #gameScreen .royal-cut-badge i::before,
html[data-table-theme] #gameScreen .royal-cut-badge i::after{background:#ffe6a3!important}
html[data-table-theme] #gameScreen .quick-chat-bubble{
  color:#fff8e8!important;
  background:rgba(5,7,11,.40)!important;
}
html[data-table-theme] .toasts .toast{
  background:rgba(4,7,11,.46)!important;
}
@media(prefers-reduced-transparency:reduce){
  html[data-table-theme] #gameScreen :is(.table-status,.hand-hidden,.game-reconnect-banner,.network-banner,.quick-chat-bubble,.royal-trump-announcement,.royal-bid-announcement,.royal-cut-badge),
  html[data-table-theme] .toasts .toast{
    background:rgba(4,7,11,.82)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
}


/* Saltanat 0.3.181 — rules stay dark glass so the selected background remains visible. */
html[data-table-theme] #rulesModal .modal-card{background:linear-gradient(155deg,rgba(9,13,18,.70),rgba(3,6,10,.84))!important;background-image:none!important;border-color:rgba(241,213,142,.18)!important;backdrop-filter:blur(18px) saturate(110%)!important;-webkit-backdrop-filter:blur(18px) saturate(110%)!important}
html[data-table-theme] #rulesModal .rules-grid article,html[data-table-theme] #rulesModal .rules-suit-card{background:rgba(5,8,12,.38)!important;background-image:none!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}


/* Saltanat 0.3.212 — remove the rectangular compositing halo around the top teammate seat. */
html[data-table-theme] #gameScreen .seat-player.top,
#gameScreen .seat-player.top{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html[data-table-theme] #gameScreen .seat-player.top .player-seat-wrap,
#gameScreen .seat-player.top .player-seat-wrap{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html[data-table-theme] #gameScreen .seat-player.top .player-info,
#gameScreen .seat-player.top .player-info{
  box-shadow:none!important;
  filter:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
#gameScreen .seat-player.top::before,
#gameScreen .seat-player.top::after,
#gameScreen .seat-player.top .player-seat-wrap::before,
#gameScreen .seat-player.top .player-seat-wrap::after{
  content:none!important;
  display:none!important;
  box-shadow:none!important;
  filter:none!important;
}
#gameScreen .seat-player.top .player-info .avatar{
  box-shadow:none!important;
}
#gameScreen .seat-player.top .player-info .avatar::after{
  filter:none!important;
}

/* Saltanat 0.3.216 — preserve the original trick landing coordinates; vary only card rotation. */
#gameScreen .royal-scoreboard,
#gameScreen .game-tools,
#gameScreen .offline-stop-btn,
#gameScreen .offline-history-btn,
#gameScreen .match-target-badge,
#gameScreen .table-status{
  z-index:90!important;
}
#gameScreen .table-card-fan.top{
  z-index:12!important;
}
#gameScreen #trickLayer .played{
  transform:translate(-50%,-50%) translate(var(--trick-x,0px),var(--trick-y,0px)) rotate(var(--trick-rot,0deg))!important;
}
#gameScreen #trickLayer .played .playing-card{
  transform:rotate(var(--trick-jitter,0deg))!important;
  transform-origin:50% 50%!important;
}

/* Saltanat 0.3.218 — restore the compact pre-jitter trick layout; rotate only the card face. */
#gameScreen #trickLayer .played.top{
  left:50%!important;
  top:0!important;
  right:auto!important;
  bottom:auto!important;
  transform:translateX(-50%) rotate(-4deg)!important;
}
#gameScreen #trickLayer .played.bottom{
  left:50%!important;
  bottom:0!important;
  right:auto!important;
  top:auto!important;
  transform:translateX(-50%) rotate(4deg)!important;
}
#gameScreen #trickLayer .played.left{
  left:18px!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  transform:translateY(-50%) rotate(-10deg)!important;
}
#gameScreen #trickLayer .played.right{
  right:18px!important;
  top:50%!important;
  left:auto!important;
  bottom:auto!important;
  transform:translateY(-50%) rotate(10deg)!important;
}
#gameScreen #trickLayer .played .playing-card{
  transform:rotate(var(--trick-jitter,0deg))!important;
}
@media(max-width:360px){
  #gameScreen #trickLayer .played.left{left:12px!important}
  #gameScreen #trickLayer .played.right{right:12px!important}
}

/* Keep the reconnect action legible after the shared ghost-button theme is loaded. */
#networkRetryBtn.network-retry{
  min-width:104px!important;
  height:40px!important;
  padding:0 13px!important;
  color:#1b1205!important;
  border:1px solid #ffe6a0!important;
  background:linear-gradient(180deg,#fff0b8 0%,#d7a33f 100%)!important;
  box-shadow:0 7px 16px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.42)!important;
  text-shadow:none!important;
  opacity:1!important;
  font-size:12px!important;
  font-weight:900!important;
}
