/* Baralho clássico brasileiro: alta legibilidade sem reproduzir identidade de fabricante. */
.mini-card,
.table-card,
.card {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(145deg, #fff 0%, #fffdf8 63%, #eee9df 100%);
  color: #101010;
  border: 1px solid #b9b3a8;
  border-radius: 9px;
  box-shadow: 0 7px 16px #35170a55, inset 0 0 0 2px #fff;
  font-family: Georgia, "Times New Roman", serif;
}

.mini-card { width: 48px; height: 68px; font-size: .72rem; }
.table-card { width: 68px; height: 96px; font-size: 1rem; }
.card {
  width: clamp(78px, 19vw, 104px);
  height: clamp(116px, 27vw, 150px);
  margin-left: -13px;
  font-size: 1.3rem;
  box-shadow: 0 10px 22px #2c0e0875, inset 0 0 0 3px #fff;
}

.card-corner {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  line-height: .78;
  font-style: normal;
}
.card-corner strong { font-size: 1em; font-weight: 900; }
.card-corner i { font-size: .82em; font-style: normal; }
.card-corner.top { left: 7%; top: 6%; }
.card-corner.bottom { right: 7%; bottom: 6%; transform: rotate(180deg); }
.pip-layout { position: absolute; inset: 17% 18%; }
.pip { position: absolute; font-size: .9em; font-style: normal; line-height: 1; transform: translate(-50%, -50%); }
.pip.inverted { transform: translate(-50%, -50%) rotate(180deg); }
.court-figure {
  position: absolute;
  inset: 17% 19%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid currentColor;
  border-radius: 5px;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: inset 0 0 0 2px #fff8;
}
.court-jack { background-image: url('assets/court-jack-v2.webp'); }
.court-queen { background-image: url('assets/court-queen-v2.webp'); }
.court-king { background-image: url('assets/court-king-v2.webp'); }
.court-figure i { position: absolute; right: 5%; top: 3%; font-size: .6em; font-style: normal; }

.manilha {
  color: #4d3200 !important;
  border: 3px solid #ffc928 !important;
  background: radial-gradient(circle at 35% 22%, #fffbe1 0%, #ffe88a 35%, #e6a916 78%, #a96600 100%) !important;
  box-shadow: 0 0 0 3px #7a4b00, 0 10px 28px #ffbd1f99, inset 0 0 18px #fff8b8 !important;
}
.manilha .pip,
.manilha .court-figure { color: #3d2900; text-shadow: 0 1px #fff1a0; }
.manilha-badge {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 999px;
  background: #4b3100;
  color: #ffe56e;
  font-family: Inter, system-ui, sans-serif;
  font-size: .34em;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: .06em;
}
.card.manilha:disabled { filter: saturate(.8) brightness(.82); }

.trick-tracker {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 7px !important;
  border-top: 1px solid #ffffff22;
  background: #041f17;
}
.trick-tracker > span { color: #9ebcaf; font-size: .46rem; font-weight: 900; }
.trick-tracker ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.trick-tracker li { display: flex; align-items: center; gap: 2px; min-width: 36px; padding: 2px 4px; border: 1px solid #ffffff1d; border-radius: 999px; color: #9ebcaf; background: #07291f; }
.trick-tracker li b { display: grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; background: #ffffff18; font-size: .48rem; }
.trick-tracker li small { font-size: .42rem; font-weight: 950; }
.trick-tracker li.ours { color: #baffd7; border-color: #3cda83; background: #07563a; }
.trick-tracker li.theirs { color: #ffd1cc; border-color: #ed6258; background: #6b211c; }
.trick-tracker li.tie { color: #fff0a6; border-color: #e7ba35; background: #71500e; }

.table-card.slap-in.player-me { animation: slap-me .55s cubic-bezier(.12, .8, .2, 1); }
.table-card.slap-in.player-them { animation: slap-them .55s cubic-bezier(.12, .8, .2, 1); }
@keyframes slap-me {
  0% { transform: translateY(210px) scale(1.7) rotate(-16deg); filter: blur(2px); }
  58% { transform: translateY(25px) scale(1.16) rotate(3deg); }
  72% { transform: translateY(39px) scale(.94) rotate(-5deg); }
  100% { transform: translateY(34px) scale(1) rotate(-4deg); }
}
@keyframes slap-them {
  0% { transform: translateY(-210px) scale(1.7) rotate(16deg); filter: blur(2px); }
  58% { transform: translateY(-25px) scale(1.16) rotate(-3deg); }
  72% { transform: translateY(-39px) scale(.94) rotate(5deg); }
  100% { transform: translateY(-34px) scale(1) rotate(4deg); }
}
.plastic-table.table-slap { animation: table-impact .55s ease-out; }
.plastic-table {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  isolation: isolate;
}
.plastic-table::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  clip-path: polygon(0 9%, 8% 9%, 8% 0, 92% 0, 92% 9%, 100% 9%, 100% 91%, 92% 91%, 92% 100%, 8% 100%, 8% 91%, 0 91%);
  background: linear-gradient(145deg,#fffef9,#eee8dc 52%,#cfc4b3);
  box-shadow: inset 0 0 0 3px #fff, inset 0 -25px 35px #c9bcaa;
  filter: drop-shadow(0 18px 0 #b7ab98) drop-shadow(0 33px 25px #230c04a8);
}
.plastic-table .molded-line { inset: 7% 8%; border-radius: 5%; }
@keyframes table-impact {
  0%, 100% { translate: 0 0; }
  18% { translate: 0 6px; }
  30% { translate: -4px -2px; }
  42% { translate: 4px 1px; }
  54% { translate: -2px 0; }
}

.turn-timer {
  position: absolute;
  z-index: 6;
  right: 11%;
  top: 37%;
  width: 54px;
  height: 54px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 4px solid #18a66d;
  border-radius: 50%;
  background: #063a2a;
  color: #fff;
  box-shadow: 0 5px 15px #3a1a0b55;
}
.turn-timer span { font-size: 1.2rem; font-weight: 1000; line-height: 1; }
.turn-timer small { font-size: .42rem; color: #bce5d0; }
.turn-timer.danger { border-color: #ff473d; background: #8f1413; animation: timer-pulse .7s infinite; }
.turn-timer.paused { opacity: .58; }
@keyframes timer-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 18px #ff3d32aa; } }

.hand { min-width: 320px; }
.dealer-foot {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: -42px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #fff4bd;
  border-radius: 50%;
  background: #efb928;
  font-size: 1.45rem;
  filter: drop-shadow(0 3px 3px #0007);
  transform: translateX(-50%) rotate(-12deg);
}
.seat { --timer-color: #55e391; }
.seat.dealer-seat { z-index: 12; }
.seat.active { z-index: 13; }
.seat.active {
  border-color: #fff08a;
  box-shadow: 0 0 0 5px #ffd12e75, 0 0 28px #ffbd19, 0 6px 14px #2b0e0766;
  animation: active-seat-pulse .8s ease-in-out infinite alternate;
}
.seat.active small { color: #fff4a8; font-weight: 1000; }
.seat .avatar,.seat img { position: relative; z-index: 2; }
.seat-timer {
  --progress: 360deg;
  position: absolute;
  z-index: 1;
  left: 1px;
  top: 1px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--timer-color) var(--progress), #351e18 var(--progress));
  box-shadow: 0 0 12px color-mix(in srgb, var(--timer-color) 75%, transparent);
  transition: background .18s linear;
  pointer-events: none;
}
.seat-timer.warning { --timer-color: #ffd23e; }
.seat-timer.danger { --timer-color: #ff3f35; animation: seat-timer-danger .48s infinite alternate; }
.seat-timer b {
  position: absolute;
  z-index: 4;
  right: -7px;
  bottom: -7px;
  min-width: 23px;
  padding: 3px 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #082d21;
  color: #fff;
  font-size: .65rem;
  line-height: 1;
  text-align: center;
}
@keyframes active-seat-pulse { to { box-shadow: 0 0 0 8px #ffd12e38, 0 0 38px #ffbd19, 0 6px 14px #2b0e0766; } }
@keyframes seat-timer-danger { to { scale: 1.08; filter: brightness(1.35); } }
.table-card { transition: transform .28s ease, filter .28s ease, opacity .28s ease; }
.table-card.table-seat-0 { transform: translate(0, 17px) rotate(-3deg); --enter-x: 0; --enter-y: 48vh; }
.table-card.table-seat-1 { transform: translate(-15px, 0) rotate(-7deg); --enter-x: -45vw; --enter-y: 0; }
.table-card.table-seat-2 { transform: translate(0, -17px) rotate(3deg); --enter-x: 0; --enter-y: -48vh; }
.table-card.table-seat-3 { transform: translate(15px, 0) rotate(7deg); --enter-x: 45vw; --enter-y: 0; }
.table-card.winning-card { z-index: 5; filter: brightness(1.04) drop-shadow(0 7px 6px #1e0d0666); }
.table-card.losing-card { z-index: 1; filter: brightness(.72) saturate(.78); }
.table-card.losing-card.table-seat-0 { transform: translate(0, 7px) rotate(-2deg); }
.table-card.losing-card.table-seat-1 { transform: translate(-7px, 0) rotate(-3deg); }
.table-card.losing-card.table-seat-2 { transform: translate(0, -7px) rotate(2deg); }
.table-card.losing-card.table-seat-3 { transform: translate(7px, 0) rotate(3deg); }
.table-card.card-play-in { animation: normal-card-entry .42s cubic-bezier(.12,.8,.2,1) both; }
@keyframes normal-card-entry {
  0% { opacity: 0; translate: var(--enter-x) var(--enter-y); scale: .72; }
  72% { opacity: 1; translate: 0 0; scale: 1.08; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
.lobby-card fieldset:last-of-type { grid-template-columns: repeat(3, 1fr); }
.login-screen { justify-content: center; }
.login-card { max-width: 430px; text-align: center; }
.login-card h1 { margin: 0; color: #ffe16a; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 16px 0; }
.auth-tabs button { padding: 10px; border: 1px solid #ffffff26; border-radius: 10px; background: #062d21; color: #a9c5b6; font-weight: 900; cursor: pointer; }
.auth-tabs button.active { border-color: #ffd64a; color: #ffe67d; background: #704d0d; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 5px; text-align: left; font-weight: 800; }
.auth-form h2 { margin: 4px 0 0; color: #ffe16a; }
.auth-form p { margin: 0 0 4px; color: #b8d0c3; font-size: .82rem; }
.auth-text-button { border: 0; padding: 8px; background: transparent; color: #ffe16a; font-size: .75rem; font-weight: 900; cursor: pointer; }
.auth-form button:disabled { opacity: .55; cursor: wait; }
.lobby-menu-wrap{position:fixed;z-index:90;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left))}.lobby-menu-wrap .game-menu a{min-height:42px;padding:11px;border:1px solid #ffffff20;border-radius:10px;background:#0b563e;color:#fff;text-decoration:none;font-weight:900}.cookie-consent{position:fixed;z-index:150;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(560px,94vw);padding:15px;border:2px solid #e7bd4f;border-radius:16px;background:#03271ef5;box-shadow:0 18px 45px #0009}.cookie-consent p{margin:0 0 10px}.cookie-consent div{display:flex;gap:8px}.cookie-consent button{flex:1;padding:10px;border:1px solid #e7bd4f;border-radius:10px;background:#0b563e;color:#fff;font-weight:900}.cookie-consent a{display:block;margin-top:8px;color:#ffe16a;text-align:center}
.web-ad-slot{width:min(320px,92vw);min-height:50px;margin:12px auto;overflow:hidden;text-align:center}.match-result .web-ad-slot{max-height:90px;margin:8px auto}
.guest-button { width: 100%; padding: 11px; border: 1px solid #70cba5; border-radius: 11px; background: #07563c; color: #fff; font-weight: 900; cursor: pointer; }
.active-match-card { width: min(450px,92vw); margin-bottom: 14px; padding: 15px; border: 2px solid #ffd64a; border-radius: 17px; background: #073e2ccc; box-shadow: 0 10px 35px #001b12a8; text-align: center; }
.install-pwa { margin: 0 0 12px; padding: 10px 16px; border: 2px solid #ffe16a; border-radius: 999px; background: #07583a; color: #fff; box-shadow: 0 7px 20px #001a11a8; font-weight: 1000; cursor: pointer; }
.active-match-card > strong { color: #ffe16a; }
.active-match-card p { margin: 7px 0 12px; }
.active-match-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.active-match-card button { padding: 11px 8px; border: 0; border-radius: 10px; color: #fff; font-weight: 950; cursor: pointer; }
#resume-active-match { background: #12865d; }
#abandon-active-match { background: #812c24; }
.visibility-options { grid-template-columns: 1fr 1fr !important; }
.bet-options { display: grid; grid-template-columns: repeat(4, 1fr) !important; gap: 7px; }
.bet-options label { cursor: pointer; }
.bet-options input { position: absolute; opacity: 0; }
.bet-options span { display: block; padding: 10px 5px; border: 2px solid #ffffff25; border-radius: 10px; text-align: center; font-weight: 950; }
.bet-options input:checked + span { border-color: #ffd64a; background: #916512; color: #fff4b0; }
.bet-options .unavailable { opacity: .34; cursor: not-allowed; }
.partner-button { padding: 12px; border: 1px solid #7de5b5; border-radius: 12px; background: #075c40; color: #fff; font-weight: 950; cursor: pointer; }
.game-wallet { display: block; margin-bottom: 4px; color: #ffe26c; font-weight: 900; text-align: right; }
.waiting-players { display: grid; gap: 5px; min-width: 240px; padding: 12px 16px; border: 1px solid #ffffff24; border-radius: 14px; background: #052d21; color: #d9ecdf; text-align: left; font-weight: 750; }
.leave-waiting { margin-top: 15px; padding: 11px 18px; border: 1px solid #ff9a8866; border-radius: 12px; background: #6d2822; color: #fff; font-weight: 900; cursor: pointer; }
.raise-dialog .raise-actions { grid-template-columns: repeat(3, 1fr); }
.raise-dialog .counter { background: linear-gradient(#ffd95c, #eca70d); color: #3d2700; }
.eleven-dialog { top: 48%; }
.eleven-dialog > p { margin: 0 0 14px; line-height: 1.4; }
.eleven-dialog .eleven-actions { grid-template-columns: 1fr 1fr; }
.eleven-dialog #decline-eleven { color: #fff; background: #792c25; }
.eleven-partner-hand { margin: 0 0 14px; padding: 9px; border-radius: 12px; background: #e8dcc8; }
.eleven-partner-hand > small { display: block; margin-bottom: 6px; color: #674d2b; font-weight: 900; }
.eleven-partner-hand > div { display: flex; justify-content: center; gap: 5px; }

.deck-zone {
  position: absolute;
  z-index: 3;
  left: 10%;
  top: 32%;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.deck-zone .vira-area {
  position: relative;
  inset: auto;
  display: grid;
  justify-items: center;
  color: #765d3c;
  font-weight: 900;
}
.deck-pile {
  position: relative;
  width: 52px;
  height: 72px;
}
.deck-pile i {
  position: absolute;
  inset: 0;
  display: block;
  border: 2px solid #fff;
  border-radius: 7px;
  background: repeating-linear-gradient(45deg, #0f417c 0 4px, #f3d44c 4px 6px, #0f417c 6px 10px);
  box-shadow: 0 4px 10px #2d160a66;
}
.deck-pile i:nth-child(1) { transform: translate(-6px, 5px) rotate(-3deg); }
.deck-pile i:nth-child(2) { transform: translate(-3px, 2px) rotate(-1deg); }
.deck-pile i:nth-child(3) { transform: translate(0, 0); }

.shuffle-effect {
  position: absolute;
  z-index: 15;
  inset: 18% 22%;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #032a1de8;
  box-shadow: 0 18px 55px #1b090599;
}
.shuffle-effect i {
  position: absolute;
  width: 64px;
  height: 92px;
  border: 3px solid #fff;
  border-radius: 9px;
  background: repeating-linear-gradient(45deg, #0f417c 0 5px, #f3d44c 5px 7px, #0f417c 7px 12px);
  box-shadow: 0 8px 16px #0007;
}
.shuffle-effect i:nth-child(1) { animation: shuffle-left .62s ease-in-out infinite alternate; }
.shuffle-effect i:nth-child(2) { animation: shuffle-right .62s .12s ease-in-out infinite alternate; }
.shuffle-effect i:nth-child(3) { animation: shuffle-left .62s .24s ease-in-out infinite alternate-reverse; }
.shuffle-effect i:nth-child(4) { animation: shuffle-right .62s .36s ease-in-out infinite alternate-reverse; }
.shuffle-effect strong {
  align-self: end;
  margin-bottom: 15%;
  color: #ffe064;
  font-family: Inter, system-ui, sans-serif;
  font-size: .76rem;
  letter-spacing: .1em;
}
@keyframes shuffle-left {
  from { transform: translateX(-58px) rotate(-14deg); }
  to { transform: translateX(8px) rotate(4deg); }
}
@keyframes shuffle-right {
  from { transform: translateX(58px) rotate(14deg); }
  to { transform: translateX(-8px) rotate(-4deg); }
}

.match-result {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: min(390px, 90vw);
  display: grid;
  justify-items: center;
  padding: 24px;
  text-align: center;
  border: 5px solid #ffd33f;
  border-radius: 25px;
  background: radial-gradient(circle at 50% 0, #14724e, #032a1d 72%);
  box-shadow: 0 25px 80px #1c0905cc, 0 0 35px #ffc92855;
}
.match-result.lost { border-color: #f05b50; background: radial-gradient(circle at 50% 0, #77221d, #28110f 72%); }
.match-result img { width: 96px; border: 3px solid #ffd33f; border-radius: 22px; }
.match-result strong { margin-top: 10px; color: #ffe05b; font-size: clamp(3rem, 12vw, 5rem); line-height: 1; text-shadow: 0 5px #9b6400; }
.match-result.lost strong { color: #ff786e; text-shadow: 0 5px #661510; }
.match-result p { margin: 10px 0 18px; font-size: 1.05rem; font-weight: 800; }
.match-result button { border: 0; border-radius: 13px; padding: 13px 18px; color: #362200; background: linear-gradient(#ffe36c, #f2ae14); font-weight: 1000; cursor: pointer; }
.match-result button:disabled { opacity: .65; cursor: wait; }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.result-actions button { flex: 1; }
.result-actions #leave-room { color: #fff; background: #6e2822; }
.result-actions #show-cards { order: -1; flex-basis: 100%; color: #fff; background: #195f87; }
.revealed-cards { width: 100%; margin: 0 0 12px; padding: 10px; border: 1px solid #ffe06666; border-radius: 13px; background: #021d15aa; }
.revealed-cards > strong { display: block; margin: 0 0 7px; color: #fff; font-size: .78rem; text-shadow: none; }
.revealed-cards > div { display: flex; justify-content: center; gap: 5px; }
.revealed-cards .mini-card { display: inline-block; margin: 0 2px; }
.rematch-question { width: 100%; margin: 0 0 13px; padding: 12px; border-radius: 14px; background: #021d15b8; }
.rematch-question > strong { display: block; margin: 0 0 10px; color: #fff; font-size: .9rem; text-shadow: none; }
.rematch-question > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rematch-question #leave-rematch { color: #fff; background: #7a2923; }
.rematch-question #accept-rematch { color: #fff; background: #08754e; }

.side-player { top: 48%; min-width: 112px; transform: translateY(-50%) scale(.88); }
.left-player { left: -7%; }
.right-player { right: -7%; }
.side-player .card-backs { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); }

.actions { display: grid; gap: 8px; }
.signals-panel { position: absolute; z-index: 18; left: max(12px,3vw); bottom: 68px; }
.signals-toggle { min-width: 112px; padding: 11px 14px; border: 2px solid #ffe07a; border-radius: 13px; background: linear-gradient(#10694a,#06432f); color: #fff; box-shadow: 0 7px 18px #27100666; font-weight: 1000; cursor: pointer; }
.signals-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: min(330px,88vw); display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; padding: 9px; border: 2px solid #f5c542; border-radius: 16px; background: #03291feF; box-shadow: 0 18px 45px #140704a6; }
.signals-menu button { display: grid; justify-items: center; gap: 3px; min-height: 67px; padding: 7px 4px; border: 1px solid #ffffff24; border-radius: 11px; background: #0b513a; color: #fff; cursor: pointer; }
.signals-menu button:hover,.signals-menu button:focus-visible { border-color: #ffe05e; background: #117253; outline: 0; }
.signals-menu span { font-size: 1.65rem; line-height: 1; }
.signals-menu small { font-size: .69rem; font-weight: 900; }
.partner-signal-bubble { position: absolute; z-index: 19; left: 50%; top: 8%; display: grid; justify-items: center; min-width: 105px; padding: 10px 12px; border: 3px solid #ffe166; border-radius: 18px; background: #043727ee; color: #fff; box-shadow: 0 8px 28px #1d0806a8; transform: translateX(-50%); pointer-events: none; }
.partner-signal-bubble::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 16px; height: 16px; background: #043727; border-right: 3px solid #ffe166; border-bottom: 3px solid #ffe166; transform: translateX(-50%) rotate(45deg); }
.partner-signal-bubble span { font-size: 2.2rem; line-height: 1; }
.partner-signal-bubble strong { margin-top: 4px; color: #ffe775; font-size: .82rem; }
.partner-signal-bubble.playing { animation: partner-signal 1.8s cubic-bezier(.15,.8,.2,1) both; }
@keyframes partner-signal { 0% { opacity: 0; transform: translate(-50%,18px) scale(.55); } 18%,76% { opacity: 1; transform: translate(-50%,0) scale(1); } 100% { opacity: 0; transform: translate(-50%,-12px) scale(.9); } }
.abandon-match { border: 1px solid #ffc4b5; border-radius: 11px; padding: 8px 10px; background: #4f1e1ad9; color: #fff; font-size: .7rem; font-weight: 900; cursor: pointer; }
.fold-hand { border: 1px solid #ffd877; border-radius: 11px; padding: 9px 10px; background: #805912; color: #fff; font-size: .74rem; font-weight: 950; cursor: pointer; }
.abandonment-dialog {
  position: absolute; z-index: 32; left: 50%; top: 45%; transform: translate(-50%,-50%);
  width: min(420px, 90vw); padding: 23px; text-align: center; border: 4px solid #f3ba32; border-radius: 22px;
  background: radial-gradient(circle at top, #175e43, #032a1d 70%); color: #fff; box-shadow: 0 25px 75px #1d0905c9;
}
.abandonment-dialog > strong { display: block; color: #ffd957; font-size: 1.25rem; }
.abandonment-dialog p { line-height: 1.45; }
.abandonment-dialog > div { display: grid; grid-template-columns: 1.4fr 1fr; gap: 9px; }
.abandonment-dialog button { border: 0; border-radius: 12px; padding: 12px 9px; color: #fff; font-weight: 950; cursor: pointer; }
#continue-with-bot { background: #08754e; }
#claim-abandon-win { background: linear-gradient(#efb82c,#b87808); }

.raise-effect { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; overflow: hidden; pointer-events: none; background: radial-gradient(circle at 50% 72%, #ff4d001f, transparent 58%); }
.raise-effect .fire { position: absolute; left: -5%; right: -5%; bottom: -18%; height: 72%; background: radial-gradient(ellipse at 50% 100%, #fff86b 0 7%, #ffad19 17%, #f13a00 38%, #711000aa 58%, transparent 70%); filter: blur(5px) drop-shadow(0 -15px 22px #ff4500); animation: fire-rise 1.7s ease-out both; }
.raise-effect .fire::before,
.raise-effect .fire::after { content: ''; position: absolute; inset: 9% 11% 0; background: repeating-radial-gradient(ellipse at bottom, #ffd94d 0 3%, #ff4d00 5% 9%, transparent 11% 18%); mix-blend-mode: screen; animation: flame-dance .18s infinite alternate; }
.raise-effect .fire::after { inset: 22% 25% 0; filter: blur(8px); animation-direction: alternate-reverse; }
.raise-effect strong { position: relative; color: #fff6a0; font: 1000 clamp(3.2rem, 16vw, 9rem)/.9 Impact, Inter, sans-serif; font-style: italic; letter-spacing: -.04em; text-shadow: 0 5px #a51b00, 0 0 18px #ff7a00, 0 0 45px #ff3100; animation: raise-word 1.5s cubic-bezier(.12,.8,.2,1) both; }
.raise-effect.level-9 { background-color: #6b090918; }
.raise-effect.level-12 { background-color: #9a000026; }
.raise-effect.level-12 .fire { filter: blur(3px) drop-shadow(0 -25px 35px #ff1d00); transform: scale(1.2); }
@keyframes fire-rise { 0% { opacity: 0; transform: translateY(55%) scale(.7); } 30% { opacity: .95; } 78% { opacity: .9; transform: translateY(-8%) scale(1.1); } 100% { opacity: 0; transform: translateY(-28%) scale(1.25); } }
@keyframes flame-dance { from { transform: translate(-2%,2%) scaleY(.92); } to { transform: translate(2%,-3%) scaleY(1.08); } }
@keyframes raise-word { 0% { opacity: 0; transform: scale(.15) rotate(-8deg); } 25% { opacity: 1; transform: scale(1.18) rotate(2deg); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.4); } }

.manilha-effect {
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: #03080628;
}
.manilha-effect .effect-visual { position: absolute; z-index: 2; inset: 0; }
.manilha-effect.zap .effect-visual {
  inset: 3%;
  background: url('assets/zap-claw-v3.webp') center / contain no-repeat;
  filter: drop-shadow(0 0 10px #ff1d1d) drop-shadow(10px 12px 5px #000c);
  animation: claw-open 1.05s cubic-bezier(.08,.8,.2,1) both;
}
.manilha-effect.zap::before,
.manilha-effect.zap::after { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; width: 52%; background: #050707d9; animation: tear-left .95s ease-out both; }
.manilha-effect.zap::before { left: 0; clip-path: polygon(0 0, 100% 0, 93% 19%, 100% 38%, 91% 58%, 99% 78%, 92% 100%, 0 100%); }
.manilha-effect.zap::after { right: 0; transform-origin: right; clip-path: polygon(8% 0, 100% 0, 100% 100%, 7% 100%, 1% 78%, 9% 58%, 0 38%, 7% 19%); animation-name: tear-right; }
.manilha-effect.copeta .effect-visual {
  background: radial-gradient(circle, #fff 0 2%, #fff58d 3% 7%, #ff8a00 9% 16%, #461100bb 22%, transparent 56%);
  animation: muzzle-blast .85s ease-out both;
}
.manilha-effect.copeta .effect-visual::after { content: ''; position: absolute; inset: 25%; border-radius: 50%; border: 18px solid #d6d1c388; filter: blur(18px); animation: smoke-ring 1s ease-out both; }
.manilha-effect.espadilha .effect-visual::before {
  content: '';
  position: absolute;
  left: -20%; top: 43%; width: 140%; height: 4%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px #9ff, 0 0 36px #1bbcff, 0 0 70px #2479ff;
  transform: rotate(-24deg);
  animation: sword-cut .72s cubic-bezier(.1,.85,.2,1) both;
}
.manilha-effect.pica-fumo .effect-visual {
  background: radial-gradient(circle at center, #6a391e55 0 3%, transparent 28%);
}
.manilha-effect.pica-fumo .effect-visual i {
  position: absolute;
  left: 50%; top: 48%;
  width: var(--size); height: calc(var(--size) * .42);
  border: 3px solid #6f3917;
  border-left-color: transparent;
  border-radius: 50%;
  background: #e4ae67;
  box-shadow: 0 2px 3px #1e0c0477;
  animation: shaving-fly 1.25s var(--delay) cubic-bezier(.15,.7,.3,1) both;
}
@keyframes claw-open { 0% { opacity: 0; clip-path: inset(100% 0 0 0); transform: translate(18%,-18%) scale(.78); } 18% { opacity: 1; } 62% { opacity: 1; clip-path: inset(0 0 0 0); transform: translate(0,0) scale(1); } 82% { opacity: 1; transform: scale(1.04); } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes tear-left { 0%, 38% { transform: translateX(0); } 100% { transform: translateX(-24%); opacity: 0; } }
@keyframes tear-right { 0%, 38% { transform: translateX(0); } 100% { transform: translateX(24%); opacity: 0; } }
@keyframes muzzle-blast { 0% { opacity: 0; transform: scale(.05); } 12% { opacity: 1; } 45% { transform: scale(1.35); } 100% { opacity: 0; transform: scale(2); } }
@keyframes smoke-ring { 0% { opacity: .9; transform: scale(.15); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes sword-cut { 0% { opacity: 0; transform: translate(-70%, 90vh) rotate(-24deg); } 18% { opacity: 1; } 70% { opacity: 1; transform: translate(25%, -90vh) rotate(-24deg); } 100% { opacity: 0; transform: translate(45%, -110vh) rotate(-24deg); } }
@keyframes shaving-fly { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); } 12% { opacity: 1; } 72% { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-20% + var(--y))) rotate(var(--r)); } }

@media (max-width: 600px) {
  .topbar { height: 72px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .topbar #mode-label { max-width: 64vw; font-size: .94rem; line-height: 1.15; }
  .scoreboard { width: 88vw; margin-top: 8px; margin-bottom: -33px; }
  .scoreboard div { padding: 5px; }
  .scoreboard strong { font-size: 1.4rem; }
  .table-wrap { height: calc(100dvh - 72px); min-height: 610px; padding-top: 63px; padding-bottom: 62px; }
  .plastic-table { width: 91vw; }
  .seat { min-width: 142px; max-width: 54vw; padding-right: 8px; }
  .seat > div:nth-child(2), .seat > div:nth-child(3) { min-width: 0; }
  .seat strong, .seat small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .seat strong { font-size: .78rem; }
  .seat small { margin-top: 2px; font-size: .59rem; }
  .me { bottom: -31px; }
  .message { bottom: 12%; max-width: 76%; }
  .hand { z-index: 16; bottom: 116px; min-width: 0; width: calc(100% - 12px); pointer-events: none; }
  .hand .card { width: clamp(72px, 24vw, 92px); height: clamp(106px, 34vw, 134px); margin-left: -15px; pointer-events: auto; }
  .hand .card:first-child { margin-left: 0; }
  .actions {
    position: fixed;
    z-index: 40;
    left: 7px;
    right: 7px;
    bottom: max(7px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 6px;
    padding: 6px;
    border: 1px solid #ffd96b55;
    border-radius: 16px;
    background: #2a1008e8;
    box-shadow: 0 -5px 24px #1607049c;
    backdrop-filter: blur(8px);
  }
  .actions > button { width: 100%; min-height: 44px; padding: 6px 4px; border-radius: 11px; line-height: 1.05; }
  .actions .truco { min-height: 46px; font-size: .93rem; border-width: 2px; }
  .actions .fold-hand { font-size: .67rem; }
  .actions .abandon-match { grid-column: 1 / -1; min-height: 31px; padding: 4px; font-size: .61rem; }
  .mini-card { width: 56px; height: 80px; font-size: .82rem; }
  .raise-dialog .raise-actions { grid-template-columns: 1fr; }
  .eleven-dialog {
    position: fixed;
    z-index: 90;
    top: 50%;
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding: 16px;
    border-width: 4px;
  }
  .eleven-dialog strong { margin-bottom: 8px; font-size: 1.05rem; }
  .eleven-dialog > p { margin-bottom: 10px; font-size: .82rem; }
  .eleven-dialog .eleven-actions { grid-template-columns: 1fr; }
  .eleven-dialog .eleven-actions button { min-height: 48px; }
  .deck-zone { left: 6%; gap: 8px; transform: scale(.9); transform-origin: left center; }
  .shuffle-effect { inset: 22% 15%; }
  .side-player { transform: translateY(-50%) scale(.7); }
  .left-player { left: -13%; }
  .right-player { right: -13%; }
  .result-actions { flex-direction: row; }
  .lobby-card fieldset:last-of-type { grid-template-columns: 1fr; }
  .visibility-options { grid-template-columns: 1fr !important; }
  .bet-options { grid-template-columns: repeat(2, 1fr) !important; }
  .abandonment-dialog > div { grid-template-columns: 1fr; }
  .signals-panel { bottom: 174px; left: 8px; }
  .signals-menu { grid-template-columns: repeat(2,1fr); width: 205px; }
  .signals-menu button { min-height: 57px; }
}

@media (max-width: 390px) {
  .actions { grid-template-columns: 1fr 1fr; }
  .actions .truco { font-size: .84rem; }
  .actions .fold-hand { font-size: .61rem; }
  .actions .abandon-match { font-size: .56rem; }
  .hand .card { width: 23.5vw; height: 33vw; }
  .trick-tracker > span { display: none; }
}

/* V18: zonas de jogo independentes para PC, celular vertical e horizontal. */
.game-menu-wrap { position: fixed; z-index: 85; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); }
.game-menu-toggle { width: 44px; height: 44px; border: 2px solid #f4c64e; border-radius: 13px; background: #063a2b; color: #fff; box-shadow: 0 7px 20px #17080588; font-size: 1.25rem; font-weight: 950; cursor: pointer; }
.game-menu { position: absolute; top: calc(100% + 7px); left: 0; width: 220px; display: grid; gap: 6px; padding: 9px; border: 2px solid #e7bd4f; border-radius: 15px; background: #03271eef; box-shadow: 0 18px 45px #170805aa; }
.game-menu button { min-height: 42px; padding: 9px 11px; border: 1px solid #ffffff20; border-radius: 10px; background: #0b563e; color: #fff; text-align: left; font-weight: 900; cursor: pointer; }
.game-menu button.danger { background: #702821; }
.topbar { padding-left: max(68px, calc(env(safe-area-inset-left) + 62px)); }
.add-coins { margin: -7px 0 12px; padding: 8px 13px; border: 1px solid #ffe272; border-radius: 999px; background: #76500d; color: #fff4ae; font-size: .75rem; font-weight: 950; cursor: pointer; }
.lobby-account-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -7px 0 12px; }
.lobby-account-actions .add-coins { margin: 0; }
.logout-account { padding: 8px 13px; border: 1px solid #ffffff35; border-radius: 999px; background: #063b2c; color: #d7e7df; font-size: .72rem; font-weight: 900; cursor: pointer; }

.seat .card-backs { position: absolute; z-index: 0; left: 50%; top: -22px; transform: translateX(-50%); }
.seat { isolation: isolate; }
.seat strong, .seat small { position: relative; z-index: 2; white-space: nowrap; }
.me { left: 18%; transform: none; }

.card .card-front, .card .card-back-face { position: absolute; inset: 0; }
.card .card-front { display: block; }
.card-back-face,
.card-back-on-table { border-radius: inherit; background: repeating-linear-gradient(45deg,#123f78 0 5px,#f3d149 5px 7px,#123f78 7px 12px); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 6px #cfaa31; }
.card .card-back-face { display: none; }
.card.selected-covered .card-front { display: none; }
.card.selected-covered .card-back-face { display: block; }
.card.selected-covered { transform: translateY(-9px) rotateY(180deg); border-color: #ffd449; }
.hold-progress { position: absolute; z-index: 8; inset: 4px; border-radius: 8px; pointer-events: none; }
.card.holding-card .hold-progress { background: conic-gradient(#ffd64a 0 0, transparent 0); animation: cover-progress 2s linear forwards; }
@keyframes cover-progress { to { background: conic-gradient(#ffd64a 0 360deg, transparent 360deg); } }
.card-back-on-table .card-back-face { position: absolute; inset: 0; display: block; }

.between-hands { position: absolute; z-index: 35; inset: 13% 12%; display: grid; align-content: end; justify-items: center; gap: 10px; pointer-events: none; }
.between-hands button { pointer-events: auto; padding: 12px 16px; border: 2px solid #ffe16d; border-radius: 13px; background: #0a6949; color: #fff; font-weight: 1000; cursor: pointer; }
.remaining-reveals { width: 100%; display: grid; gap: 7px; }
.remaining-reveals > div { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 7px; border-radius: 12px; background: #03291ee8; color: #fff; }
.remaining-reveals strong { font-size: .72rem; }
.remaining-reveals span { display: flex; gap: 4px; }

.rotate-tip { position: fixed; z-index: 140; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 12px; border: 2px solid #f4cb55; border-radius: 16px; background: #042c21f2; color: #fff; box-shadow: 0 14px 45px #0009; }
.rotate-tip > span { font-size: 1.9rem; color: #ffd75b; }
.rotate-tip div { display: grid; }
.rotate-tip small { color: #bcd3c7; }
.rotate-tip button { border: 0; background: transparent; color: #fff; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  .game { height: 100dvh; min-height: 0; overflow: hidden; }
  .topbar { height: 64px; padding-top: max(7px, env(safe-area-inset-top)); }
  .topbar #mode-label { max-width: 53vw; font-size: .82rem; }
  .topbar .online-badge { padding: 6px 8px; font-size: .72rem; }
  .scoreboard { width: calc(100vw - 24px); margin: 7px auto -25px; border-width: 2px; }
  .scoreboard div { padding: 4px; }
  .scoreboard strong { font-size: 1.22rem; }
  .scoreboard span { font-size: .53rem; }
  .trick-tracker { height: 23px; padding: 1px 4px !important; }
  .trick-tracker li { min-width: 42px; }
  .trick-tracker li small { font-size: .5rem; }
  .table-wrap { height: calc(100dvh - 64px); min-height: 0; padding: 49px 0 192px; }
  .plastic-table { width: min(92vw, calc((100dvh - 310px) * 1.12)); max-width: none; }
  .opponent { top: 0; }
  .me { left: 9%; bottom: -32px; transform: none; }
  .seat { min-width: 116px; max-width: 46vw; padding: 4px 8px 4px 4px; }
  .seat .avatar,.seat img { width: 37px; height: 37px; }
  .seat strong { max-width: 24vw; overflow: hidden; text-overflow: ellipsis; font-size: .73rem; }
  .seat small { font-size: .61rem; }
  .hand { position: fixed; z-index: 42; left: 50%; bottom: calc(66px + env(safe-area-inset-bottom)); width: calc(100vw - 12px); transform: translateX(-50%); }
  .hand .card { width: clamp(72px, 24vw, 92px); height: clamp(104px, 33vw, 128px); }
  .actions { position: fixed; z-index: 45; left: 7px; right: 7px; bottom: max(6px, env(safe-area-inset-bottom)); grid-template-columns: 1fr 1fr; padding: 5px; }
  .actions > button { min-height: 48px; }
  .signals-panel { position: fixed; z-index: 48; left: 7px; bottom: calc(128px + env(safe-area-inset-bottom)); }
  .signals-toggle { min-width: 88px; padding: 8px; font-size: .7rem; }
  .game-menu-wrap { top: max(7px, env(safe-area-inset-top)); left: 7px; }
  .game-menu-toggle { width: 39px; height: 39px; }
  .raise-dialog, .eleven-dialog { position: fixed; top: 50%; z-index: 90; }
  .message { bottom: 8%; max-width: 72%; }
}

@media (max-height: 700px) and (pointer: coarse) and (orientation: landscape) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .seat {
    height: 86px;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .seat > div:not(.avatar):not(.card-backs) {
    min-width: 104px;
    padding: 5px 7px;
  }
  .game { height: 100dvh; min-height: 0; overflow: hidden; }
  .topbar { height: 48px; padding: 5px max(12px, env(safe-area-inset-right)) 5px max(62px, calc(env(safe-area-inset-left) + 54px)); }
  .scoreboard { position: fixed; z-index: 30; top: 4px; left: 50%; width: 300px; margin: 0; transform: translateX(-50%); }
  .scoreboard div { padding: 2px 5px; }
  .scoreboard strong { font-size: 1.05rem; }
  .scoreboard span { font-size: .48rem; }
  .trick-tracker { height: 19px; }
  .trick-tracker li { min-width: 38px; padding: 1px 3px; }
  .table-wrap { height: calc(100dvh - 48px); min-height: 0; padding-top: 30px; }
  .plastic-table { height: min(72dvh, 520px); width: auto; }
  .me { left: 8%; bottom: 2%; transform: none; }
  .opponent { top: 4%; left: auto; right: 4%; transform: none; }
  .hand { position: fixed; z-index: 42; left: 50%; bottom: max(4px, env(safe-area-inset-bottom)); width: auto; min-width: 250px; transform: translateX(-50%); }
  .hand .card { width: clamp(70px, 10vw, 92px); height: clamp(102px, 28vh, 132px); }
  .actions { position: fixed; z-index: 45; left: auto; right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); grid-template-columns: 1fr 1fr; width: min(300px, 31vw); padding: 5px; }
  .actions > button { min-height: 50px; }
  .signals-panel { position: fixed; left: max(8px, env(safe-area-inset-left)); bottom: max(8px, env(safe-area-inset-bottom)); }
  .raise-dialog,.eleven-dialog { position: fixed; z-index: 90; top: 50%; width: min(430px, 58vw); }
  .game-menu-wrap { top: max(5px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); }
}

/* V20: tampo moldado real, baralho premium e controles sociais. */
.plastic-table::before { display: none; }
.table-shell { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; overflow: visible; filter: url(#table-shadow); }
.table-shell .table-edge { fill: url(#table-edge); }
.table-shell .table-top { fill: url(#table-top); stroke: #fff; stroke-width: 5; }
.plastic-table .molded-line { inset: 8% 8.5%; border: 3px solid #8c7f6924; border-radius: 8%; box-shadow: inset 0 3px 8px #fff9, 0 2px 2px #8377641c; }

.mini-card,.table-card,.card {
  border-color: #9e978b;
  background: linear-gradient(145deg,#fff 0%,#fffefa 58%,#e9e5dd 100%);
  box-shadow: 0 9px 20px #32120762,inset 0 0 0 2px #fff,inset 0 -4px 8px #a99e8b22;
}
.card-corner strong { font-family: Georgia,"Times New Roman",serif; font-weight: 950; letter-spacing: -.08em; }
.court-figure { inset: 14% 16%; border-color: #29251f; background-size: cover; }
.pip { filter: drop-shadow(0 1px 0 #fff); }
.card-back-face,.card-back-on-table,.deck-pile i,.shuffle-effect i {
  background-color: #063e2d;
  background-image: radial-gradient(circle at center,#f7cc3d 0 5%,transparent 5.5%),repeating-linear-gradient(45deg,#063e2d 0 7px,#075a40 7px 12px,#e5b929 12px 14px,#075a40 14px 19px);
  box-shadow: inset 0 0 0 4px #fff,inset 0 0 0 7px #d6aa28,inset 0 0 0 10px #073d2d,0 7px 16px #2c10075c;
}

/* Evita que o título do resultado altere os números e naipes das cartas. */
.match-result > strong { margin-top: 10px; color: #ffe05b; font-size: clamp(3rem,12vw,5rem); line-height: 1; text-shadow: 0 5px #9b6400; }
.match-result.lost > strong { color: #ff786e; text-shadow: 0 5px #661510; }
.match-result .card-corner strong,.match-result .revealed-cards strong { margin: 0; font-size: 1em; line-height: .78; text-shadow: none; }
.match-result .revealed-cards > strong { display: block; margin-bottom: 7px; color: #fff; font: 800 .78rem Inter,system-ui,sans-serif; line-height: 1.2; }

.quick-chat { position: fixed; z-index: 48; left: max(14px,env(safe-area-inset-left)); bottom: 70px; }
.quick-chat-toggle,.signals-toggle { border: 2px solid #eac34e; border-radius: 999px; padding: 9px 12px; background: #073f2f; color: #fff; font-size: .72rem; font-weight: 950; box-shadow: 0 8px 20px #1e09058a; }
.quick-chat-menu { position: absolute; left: 0; bottom: calc(100% + 7px); width: 230px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px; border: 2px solid #edc650; border-radius: 14px; background: #03291ff2; box-shadow: 0 15px 35px #160804aa; }
.quick-chat-menu button { min-height: 38px; border: 1px solid #ffffff1c; border-radius: 9px; background: #0a6044; color: #fff; font-size: .7rem; font-weight: 850; }
.quick-message-bubble { position: absolute; z-index: 28; left: 50%; top: 17%; transform: translateX(-50%); display: flex; gap: 5px; max-width: 78%; padding: 9px 15px; border: 2px solid #f0c94e; border-radius: 18px 18px 18px 4px; background: #fffdf2; color: #34200c; box-shadow: 0 10px 25px #220c0570; white-space: nowrap; }
.quick-message-bubble.playing { animation: chat-pop .28s ease-out; }
@keyframes chat-pop { from { opacity: 0; scale: .75; translate: 0 10px; } }

.mascot-signal { position: relative; display: block; width: 48px; height: 48px; overflow: hidden; border: 2px solid #efc43e; border-radius: 50%; background: #07533b url('assets/sinais-trucuzin-v1.png') 0 0/300% 300% no-repeat; }
.mascot-signal img { display:none; }
.mascot-signal.zap{background-position:0 0}.mascot-signal.copeta{background-position:50% 0}.mascot-signal.espadilha{background-position:100% 0}.mascot-signal.pica-fumo{background-position:0 50%}.mascot-signal.three{background-position:50% 50%}.mascot-signal.two{background-position:100% 50%}.mascot-signal.ace{background-position:0 100%}.mascot-signal.full{background-position:50% 100%}.mascot-signal.empty{background-position:100% 100%}
.signals-menu { grid-template-columns: repeat(3,1fr); width: 270px; max-height: min(390px,70dvh); overflow: auto; }
.signals-menu button { min-width: 0; }
.signals-menu button > span { margin: auto; }

@media (max-width:700px) and (pointer:coarse) and (orientation:portrait) {
  .game .topbar { height: max(58px,calc(env(safe-area-inset-top) + 45px)); }
  .game .scoreboard { top: max(61px,calc(env(safe-area-inset-top) + 48px)); }
  .game .table-wrap { padding-top: max(136px,calc(env(safe-area-inset-top) + 122px)); padding-bottom: 174px; }
  .game .plastic-table { width: min(95vw,calc((100dvh - 305px) * 1.12)); min-width: 304px; }
  .game .hand { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .game .hand .card { width: clamp(72px,24vw,92px); height: clamp(104px,34vw,132px); }
  .game .actions { bottom: max(4px,env(safe-area-inset-bottom)); }
  .game .signals-panel { left: 6px; bottom: calc(166px + env(safe-area-inset-bottom)); }
  .game .quick-chat { left: auto; right: 6px; bottom: calc(166px + env(safe-area-inset-bottom)); }
  .quick-chat-toggle,.signals-toggle { padding: 7px 9px; font-size: .62rem; }
  .quick-chat-menu { left: auto; right: 0; width: 215px; }
  .signals-menu { width: 246px; }
  .match-result { top: 52%; width: calc(100vw - 20px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 14px; border-width: 3px; }
  .match-result img { width: 65px; }
  .match-result > strong { font-size: 2.6rem; }
  .match-result p { margin: 5px 0 10px; }
  .result-actions button,.rematch-question button { padding: 10px; }
}

@media (max-height:700px) and (pointer:coarse) and (orientation:landscape) {
  .game .quick-chat { left: max(6px,env(safe-area-inset-left)); bottom: 52px; }
  .game .signals-panel { bottom: 5px; }
  .quick-chat-menu { bottom: 0; left: calc(100% + 6px); }
  .signals-menu { bottom: 0; left: calc(100% + 6px); grid-template-columns: repeat(3,1fr); }
  .match-result { top: 52%; max-height: 94dvh; overflow-y: auto; padding: 12px 18px; }
  .match-result img { width: 58px; }
  .match-result > strong { font-size: 2.35rem; }
}

/* V22: verso oficial, mão sem sobreposição e zonas absolutas de jogada. */
.card-back-face,.card-back-on-table,.deck-pile i,.shuffle-effect i,.card-backs i {
  background-color:#07533b;
  background-image:url('assets/verso-trucuzin-v1.webp');
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}
.game .hand {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  align-items:end;
  justify-content:center;
  gap:clamp(6px,1.3vw,12px);
  width:max-content;
  max-width:calc(100vw - 12px);
  min-width:0;
}
.game .hand .card,
.game .hand .card:first-child {
  position:relative;
  margin:0 !important;
  flex:none;
  isolation:isolate;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.game .hand .card::after {
  content:'';
  position:absolute;
  inset:-3px;
  z-index:-1;
  border-radius:inherit;
  pointer-events:none;
}
.game .trick {
  inset:24% 22%;
  min-width:0;
  min-height:0;
  overflow:hidden;
  contain:layout paint;
}
.game .trick .table-card {
  position:absolute;
  width:clamp(52px,7vw,68px);
  height:clamp(74px,9.8vw,96px);
  margin:0;
}
.game .trick .table-seat-0 { left:50%; top:74%; transform:translate(-50%,-50%) rotate(-3deg) !important; }
.game .trick .table-seat-1 { left:25%; top:50%; transform:translate(-50%,-50%) rotate(-6deg) !important; }
.game .trick .table-seat-2 { left:50%; top:26%; transform:translate(-50%,-50%) rotate(3deg) !important; }
.game .trick .table-seat-3 { left:75%; top:50%; transform:translate(-50%,-50%) rotate(6deg) !important; }

@media (max-width:700px) and (pointer:coarse) and (orientation:portrait) {
  .game .hand { gap:6px; width:max-content; }
  .game .hand .card { width:clamp(68px,22vw,84px); height:clamp(99px,31vw,121px); }
  .game[data-match-type="duplas"] .trick { inset:27% 15% 25%; }
  .game .trick .table-card { width:52px; height:74px; }
}

@media (max-height:700px) and (pointer:coarse) and (orientation:landscape) {
  .game .hand { gap:5px; }
  .game .hand .card { width:clamp(56px,7vw,76px); height:clamp(81px,21dvh,108px); }
  .game[data-match-type="duplas"] .trick { inset:22% 18%; }
}

/* V19: tabuleiro por zonas. A mesa nunca disputa espaço com mão e ações. */
.game .topbar { position: fixed; z-index: 24; inset: 0 0 auto; }
.game .scoreboard { position: fixed; z-index: 30; top: 7px; left: 50%; width: min(360px, 38vw); margin: 0; transform: translateX(-50%); }
.game .table-wrap { width: 100vw; height: 100dvh; min-height: 0; padding: 82px 170px 150px; }
.game .plastic-table { width: min(780px, calc(100vw - 330px), calc((100dvh - 215px) * 1.12)); max-width: none; }
.game .hand { position: fixed; z-index: 42; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; min-width: 270px; transform: translateX(-50%); pointer-events: none; }
.game .hand .card { width: clamp(70px, 7.2vw, 94px); height: clamp(102px, 10.4vw, 136px); pointer-events: auto; }
.game .actions { position: fixed; z-index: 45; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: min(220px, 18vw); }
.game .actions > button { width: 100%; min-height: 48px; }
.game .signals-panel { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); }
.game .message { z-index: 10; bottom: 9%; max-width: 54%; }
.game .dealer-foot { left: -7px; top: -13px; width: 27px; height: 27px; font-size: .95rem; transform: rotate(-12deg); }
.game .seat > div:not(.avatar):not(.card-backs) { display: grid; min-width: 0; }
.game .seat strong,.game .seat small { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.game[data-match-type="individual"] .opponent { top: 47%; left: auto; right: -88px; transform: translateY(-50%); }
.game[data-match-type="individual"] .me { left: -88px; bottom: auto; top: 53%; transform: translateY(-50%); }
.game[data-match-type="duplas"] .opponent { top: -5px; }
.game[data-match-type="duplas"] .me { left: 8%; bottom: -25px; }
.game[data-match-type="duplas"] .left-player { left: -9%; }
.game[data-match-type="duplas"] .right-player { right: -9%; }

@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  .game .topbar { height: 58px; padding: max(7px, env(safe-area-inset-top)) 9px 6px 58px; }
  .game .topbar #mode-label { max-width: 48vw; font-size: .76rem; }
  .game .topbar span { font-size: .58rem; }
  .game .topbar .game-wallet { font-size: .64rem; }
  .game .topbar .online-badge { padding: 5px 7px; font-size: .61rem; }
  .game .game-menu-toggle { width: 38px; height: 38px; }
  .game .scoreboard { top: 62px; width: calc(100vw - 16px); }
  .game .scoreboard strong { font-size: 1.05rem; }
  .game .scoreboard span { font-size: .49rem; }
  .game .trick-tracker { height: 21px; }
  .game .trick-tracker li { min-width: 37px; }
  .game .table-wrap { padding: 137px 0 205px; }
  .game .plastic-table { width: min(94vw, calc((100dvh - 355px) * 1.12)); min-width: 290px; }
  .game[data-match-type="individual"] .opponent { top: 0; left: 50%; right: auto; transform: translate(-50%,-50%); }
  .game[data-match-type="individual"] .me { left: 4%; top: auto; bottom: -27px; transform: none; }
  .game .seat { min-width: 112px; max-width: 48vw; }
  .game .seat strong { max-width: 26vw; font-size: .7rem; }
  .game .seat small { max-width: 28vw; font-size: .56rem; }
  .game .seat .avatar,.game .seat img { width: 35px; height: 35px; }
  .game .seat-timer { width: 43px; height: 43px; }
  .game .hand { bottom: calc(62px + env(safe-area-inset-bottom)); width: calc(100vw - 8px); min-width: 0; }
  .game .hand .card { width: clamp(66px, 22vw, 84px); height: clamp(96px, 31vw, 121px); margin-left: -13px; }
  .game .actions { left: 6px; right: 6px; bottom: max(5px, env(safe-area-inset-bottom)); width: auto; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; }
  .game .actions > button { min-height: 46px; }
  .game .actions .truco { font-size: .86rem; }
  .game .actions .fold-hand { font-size: .62rem; }
  .game .signals-panel { left: 7px; bottom: calc(184px + env(safe-area-inset-bottom)); }
  .game .message { bottom: 8%; max-width: 68%; font-size: .66rem; }
  .game .deck-zone { left: 5%; top: 31%; transform: scale(.76); }
  .game .mini-card { width: 49px; height: 70px; }
}

@media (max-height: 700px) and (pointer: coarse) and (orientation: landscape) {
  .game .topbar { height: 44px; padding: 4px max(10px, env(safe-area-inset-right)) 4px max(54px, calc(env(safe-area-inset-left) + 48px)); }
  .game .topbar #mode-label { max-width: 25vw; font-size: .7rem; }
  .game .topbar span,.game .online-badge { font-size: .56rem; }
  .game .scoreboard { top: 3px; width: min(330px, 34vw); }
  .game .scoreboard strong { font-size: .93rem; }
  .game .scoreboard span { font-size: .43rem; }
  .game .trick-tracker { height: 17px; }
  .game .table-wrap { padding: 52px 180px 96px; }
  .game .plastic-table { width: min(66vw, calc((100dvh - 118px) * 1.12)); height: auto; }
  .game[data-match-type="individual"] .opponent { top: 47%; left: auto; right: -92px; transform: translateY(-50%) scale(.88); }
  .game[data-match-type="individual"] .me { left: -92px; top: 53%; bottom: auto; transform: translateY(-50%) scale(.88); }
  .game .hand { bottom: max(3px, env(safe-area-inset-bottom)); min-width: 220px; }
  .game .hand .card { width: clamp(58px, 7.2vw, 78px); height: clamp(84px, 22dvh, 112px); margin-left: -11px; }
  .game .actions { right: max(6px, env(safe-area-inset-right)); bottom: max(5px, env(safe-area-inset-bottom)); width: min(240px, 25vw); gap: 5px; }
  .game .actions > button { min-height: 42px; }
  .game .actions .truco { font-size: .84rem; }
  .game .actions .fold-hand { font-size: .59rem; }
  .game .signals-panel { left: max(6px, env(safe-area-inset-left)); bottom: max(5px, env(safe-area-inset-bottom)); }
  .game .message { bottom: 8%; max-width: 50%; }
  .game .deck-zone { transform: scale(.74); transform-origin: left center; }
}

/* V20 final responsive precedence. */
@media (max-width:700px) and (pointer:coarse) and (orientation:portrait) {
  .game .topbar { height:max(58px,calc(env(safe-area-inset-top) + 45px)); }
  .game .scoreboard { top:max(61px,calc(env(safe-area-inset-top) + 48px)); }
  .game .table-wrap { padding:max(136px,calc(env(safe-area-inset-top) + 122px)) 0 174px; }
  .game .plastic-table { width:min(95vw,calc((100dvh - 305px) * 1.12)); min-width:304px; }
  .game .hand { bottom:calc(58px + env(safe-area-inset-bottom)); }
  .game .hand .card { width:clamp(72px,24vw,92px); height:clamp(104px,34vw,132px); }
  .game .actions { bottom:max(4px,env(safe-area-inset-bottom)); }
  .game .signals-panel { left:6px; bottom:calc(166px + env(safe-area-inset-bottom)); }
  .game .quick-chat { left:auto; right:6px; bottom:calc(166px + env(safe-area-inset-bottom)); }
}
@media (max-height:700px) and (pointer:coarse) and (orientation:landscape) {
  .game .quick-chat { left:max(6px,env(safe-area-inset-left)); bottom:52px; }
  .game .signals-panel { bottom:5px; }
}

/* V21: assentos 2x2 livres do placar e cartas da vaza em cruz. */
.game[data-match-type="duplas"] .opponent {
  top: 9%;
  left: 50%;
  right: auto;
  transform: translateX(-50%) scale(.9);
}
.game[data-match-type="duplas"] .me {
  left: 7%;
  bottom: 2%;
  transform: none;
}
.game[data-match-type="duplas"] .left-player {
  left: 1%;
  top: 48%;
  transform: translateY(-50%) scale(.82);
  transform-origin: left center;
}
.game[data-match-type="duplas"] .right-player {
  right: 1%;
  top: 48%;
  transform: translateY(-50%) scale(.82);
  transform-origin: right center;
}
.game[data-match-type="duplas"] .trick {
  inset: 32% 34%;
  min-width: 180px;
  min-height: 150px;
}
.game[data-match-type="duplas"] .table-card.table-seat-0 { transform: translate(0,42px) rotate(-3deg); }
.game[data-match-type="duplas"] .table-card.table-seat-1 { transform: translate(-55px,0) rotate(-6deg); }
.game[data-match-type="duplas"] .table-card.table-seat-2 { transform: translate(0,-42px) rotate(3deg); }
.game[data-match-type="duplas"] .table-card.table-seat-3 { transform: translate(55px,0) rotate(6deg); }
.game[data-match-type="duplas"] .table-card.losing-card.table-seat-0 { transform: translate(0,42px) rotate(-3deg); }
.game[data-match-type="duplas"] .table-card.losing-card.table-seat-1 { transform: translate(-55px,0) rotate(-6deg); }
.game[data-match-type="duplas"] .table-card.losing-card.table-seat-2 { transform: translate(0,-42px) rotate(3deg); }
.game[data-match-type="duplas"] .table-card.losing-card.table-seat-3 { transform: translate(55px,0) rotate(6deg); }

@media (max-width:700px) and (pointer:coarse) and (orientation:portrait) {
  .game[data-match-type="duplas"] .opponent { top:8%; max-width:44vw; transform:translateX(-50%) scale(.78); }
  .game[data-match-type="duplas"] .me { left:4%; bottom:1%; transform:scale(.86); transform-origin:left bottom; }
  .game[data-match-type="duplas"] .left-player { left:2px; transform:translateY(-50%) scale(.68); }
  .game[data-match-type="duplas"] .right-player { right:2px; transform:translateY(-50%) scale(.68); }
  .game[data-match-type="duplas"] .trick { inset:35% 29%; min-width:150px; min-height:132px; }
  .game[data-match-type="duplas"] .table-card { width:56px; height:79px; }
  .game[data-match-type="duplas"] .table-card.table-seat-0,
  .game[data-match-type="duplas"] .table-card.losing-card.table-seat-0 { transform:translate(0,36px) rotate(-3deg); }
  .game[data-match-type="duplas"] .table-card.table-seat-1,
  .game[data-match-type="duplas"] .table-card.losing-card.table-seat-1 { transform:translate(-45px,0) rotate(-6deg); }
  .game[data-match-type="duplas"] .table-card.table-seat-2,
  .game[data-match-type="duplas"] .table-card.losing-card.table-seat-2 { transform:translate(0,-36px) rotate(3deg); }
  .game[data-match-type="duplas"] .table-card.table-seat-3,
  .game[data-match-type="duplas"] .table-card.losing-card.table-seat-3 { transform:translate(45px,0) rotate(6deg); }
}

@media (max-height:700px) and (pointer:coarse) and (orientation:landscape) {
  .game[data-match-type="duplas"] .opponent { top:7%; transform:translateX(-50%) scale(.7); }
  .game[data-match-type="duplas"] .me { left:2%; bottom:2%; transform:scale(.72); transform-origin:left bottom; }
  .game[data-match-type="duplas"] .left-player { left:1%; transform:translateY(-50%) scale(.68); }
  .game[data-match-type="duplas"] .right-player { right:1%; transform:translateY(-50%) scale(.68); }
}

/* V22 final: estas zonas vencem regras antigas e nunca extrapolam o tampo. */
.game[data-match-type="duplas"] .trick {
  inset:24% 18% !important;
  min-width:0 !important;
  min-height:0 !important;
  overflow:hidden !important;
  contain:layout paint;
}
@media (max-width:700px) and (pointer:coarse) and (orientation:portrait) {
  .game[data-match-type="duplas"] .trick { inset:27% 14% 25% !important; }
}
@media (max-height:700px) and (pointer:coarse) and (orientation:landscape) {
  .game[data-match-type="duplas"] .trick { inset:22% 17% !important; }
}

/* V23: layout deterministico para smartphone. O desktop permanece intocado. */
html[data-device="smartphone"] .game .plastic-table {
  overflow: visible;
}
html[data-device="smartphone"] .game .deck-zone {
  z-index: 6;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  gap: 7px;
  transform: translate(-50%,-50%) scale(.72) !important;
  transform-origin: center !important;
}
html[data-device="smartphone"] .game .trick,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick {
  inset: 18% 10% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  contain: strict;
  pointer-events: none;
}
html[data-device="smartphone"] .game .trick .table-card {
  width: 48px !important;
  height: 68px !important;
  max-width: 16%;
  max-height: 34%;
}
html[data-device="smartphone"] .game .trick .table-seat-0 {
  left: 50%; top: 86%; transform: translate(-50%,-50%) rotate(-3deg) !important;
}
html[data-device="smartphone"] .game .trick .table-seat-1 {
  left: 15%; top: 50%; transform: translate(-50%,-50%) rotate(-6deg) !important;
}
html[data-device="smartphone"] .game .trick .table-seat-2 {
  left: 50%; top: 14%; transform: translate(-50%,-50%) rotate(3deg) !important;
}
html[data-device="smartphone"] .game .trick .table-seat-3 {
  left: 85%; top: 50%; transform: translate(-50%,-50%) rotate(6deg) !important;
}
html[data-device="smartphone"] .game .message {
  z-index: 8;
  bottom: 5%;
  max-width: 62%;
  padding: 6px 11px;
  pointer-events: none;
}
html[data-device="smartphone"] .game .result-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
html[data-device="smartphone"] .game .result-actions #show-cards {
  grid-column: 1 / -1;
}
html[data-device="smartphone"] .game .result-actions #leave-room,
html[data-device="smartphone"] .game .result-actions #play-again {
  min-width: 0;
}
html[data-device="smartphone"] .game.match-finished .signals-panel,
html[data-device="smartphone"] .game.match-finished .quick-chat,
html[data-device="smartphone"] .game.match-finished .actions {
  display: none !important;
}

html[data-device="smartphone"][data-orientation="portrait"] .game .plastic-table {
  width: min(95vw, calc((var(--viewport-height) - 345px) * 1.12)) !important;
  min-width: 300px;
}
html[data-device="smartphone"][data-orientation="portrait"] .game .hand {
  bottom: calc(58px + env(safe-area-inset-bottom));
}
html[data-device="smartphone"][data-orientation="portrait"] .game .match-result {
  top: 50%;
  width: calc(100vw - 18px);
  max-height: calc(var(--viewport-height) - 18px);
  padding: 12px;
  overflow-y: auto;
}

html[data-device="smartphone"][data-orientation="landscape"] .game .table-wrap {
  padding: 48px 170px 92px;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .plastic-table {
  width: min(62vw, calc((var(--viewport-height) - 108px) * 1.12)) !important;
  min-width: 300px;
  height: auto !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .deck-zone {
  transform: translate(-50%,-50%) scale(.62) !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .trick .table-card {
  width: 43px !important;
  height: 61px !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .match-result {
  top: 51%;
  width: min(520px, 72vw);
  max-height: calc(var(--viewport-height) - 12px);
  padding: 10px 14px;
  overflow-y: auto;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .match-result img { width: 52px; }
html[data-device="smartphone"][data-orientation="landscape"] .game .match-result > strong { font-size: 2.1rem; }
html[data-device="smartphone"][data-orientation="landscape"] .game .match-result p { margin: 3px 0 7px; }

/* V24: composicao aprovada — assentos, vaza e monte ocupam zonas independentes. */
.game .plastic-table {
  --played-card-width: clamp(52px, 6.2vw, 68px);
  --played-card-height: clamp(74px, 8.8vw, 96px);
}
.game .deck-zone {
  z-index: 7;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 78px;
  height: 78px;
  display: block;
  transform: translate(-50%,-50%) !important;
  transform-origin: center !important;
  pointer-events: none;
}
.game .deck-zone .deck-pile {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.game .deck-zone .vira-area {
  position: absolute !important;
  z-index: 1;
  left: 30px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateY(-50%);
}
.game .deck-zone .vira-area small {
  position: absolute;
  z-index: 3;
  right: -2px;
  top: -13px;
  font-size: .48rem;
  line-height: 1;
  text-shadow: 0 1px #fff;
}
.game .trick,
.game[data-match-type="duplas"] .trick {
  inset: 15% 10% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  contain: strict;
  pointer-events: none;
}
.game .trick .table-card,
.game[data-match-type="duplas"] .trick .table-card {
  position: absolute;
  width: var(--played-card-width) !important;
  height: var(--played-card-height) !important;
  margin: 0 !important;
}
.game .trick .table-seat-0,
.game .trick .losing-card.table-seat-0 {
  left: 50%; top: 86%; transform: translate(-50%,-50%) rotate(-3deg) !important;
}
.game .trick .table-seat-1,
.game .trick .losing-card.table-seat-1 {
  left: 20%; top: 50%; transform: translate(-50%,-50%) rotate(-5deg) !important;
}
.game .trick .table-seat-2,
.game .trick .losing-card.table-seat-2 {
  left: 50%; top: 14%; transform: translate(-50%,-50%) rotate(3deg) !important;
}
.game .trick .table-seat-3,
.game .trick .losing-card.table-seat-3 {
  left: 80%; top: 50%; transform: translate(-50%,-50%) rotate(5deg) !important;
}
.game[data-match-type="duplas"] .opponent,
.game[data-match-type="individual"] .opponent {
  top: 3%;
  left: 50%;
  right: auto;
  transform: translate(-50%,-50%) scale(.9);
  transform-origin: center;
}
.game[data-match-type="duplas"] .me,
.game[data-match-type="individual"] .me {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 1%;
  transform: translate(-50%,50%) scale(.9);
  transform-origin: center;
}
.game[data-match-type="duplas"] .left-player {
  left: 1%;
  right: auto;
  top: 50%;
  transform: translate(-18%,-50%) scale(.82);
  transform-origin: left center;
}
.game[data-match-type="duplas"] .right-player {
  right: 1%;
  left: auto;
  top: 50%;
  transform: translate(18%,-50%) scale(.82);
  transform-origin: right center;
}
.game .opponent .card-backs {
  top: calc(100% + 3px) !important;
  bottom: auto !important;
}
.game .me .card-backs {
  top: auto !important;
  bottom: calc(100% + 3px) !important;
}
.game .left-player .card-backs {
  left: calc(100% + 3px) !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}
.game .right-player .card-backs {
  right: calc(100% + 3px) !important;
  left: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}
.game .message {
  bottom: 9% !important;
  max-width: 56%;
  pointer-events: none;
}
.game .hand {
  column-gap: clamp(7px,1.2vw,12px) !important;
}

html[data-device="smartphone"] .game .plastic-table {
  --played-card-width: 46px;
  --played-card-height: 65px;
}
html[data-device="smartphone"] .game .deck-zone {
  width: 67px;
  height: 68px;
  transform: translate(-50%,-50%) scale(.78) !important;
}
html[data-device="smartphone"] .game .trick,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick {
  inset: 16% 9% !important;
}
html[data-device="smartphone"] .game .message {
  bottom: 8% !important;
  max-width: 62%;
}

html[data-device="smartphone"][data-orientation="portrait"] .game[data-match-type="duplas"] .opponent,
html[data-device="smartphone"][data-orientation="portrait"] .game[data-match-type="individual"] .opponent {
  top: 5%;
  transform: translate(-50%,-50%) scale(.76);
}
html[data-device="smartphone"][data-orientation="portrait"] .game[data-match-type="duplas"] .me,
html[data-device="smartphone"][data-orientation="portrait"] .game[data-match-type="individual"] .me {
  bottom: 2%;
  transform: translate(-50%,50%) scale(.76);
}
html[data-device="smartphone"][data-orientation="portrait"] .game[data-match-type="duplas"] .left-player {
  left: 1px;
  transform: translate(-13%,-50%) scale(.67);
}
html[data-device="smartphone"][data-orientation="portrait"] .game[data-match-type="duplas"] .right-player {
  right: 1px;
  transform: translate(13%,-50%) scale(.67);
}
html[data-device="smartphone"][data-orientation="portrait"] .game .hand {
  column-gap: 6px !important;
}

html[data-device="smartphone"][data-orientation="landscape"] .game .plastic-table {
  --played-card-width: 42px;
  --played-card-height: 59px;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .deck-zone {
  transform: translate(-50%,-50%) scale(.66) !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .opponent,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="individual"] .opponent {
  top: 4%;
  transform: translate(-50%,-50%) scale(.68);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .me,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="individual"] .me {
  bottom: 2%;
  transform: translate(-50%,50%) scale(.68);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .left-player {
  left: 0;
  transform: translate(-18%,-50%) scale(.62);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .right-player {
  right: 0;
  transform: translate(18%,-50%) scale(.62);
}
html[data-device="smartphone"][data-orientation="landscape"] .game .hand {
  column-gap: 5px !important;
}

/* V25: paisagem aprovada. Não altera retrato nem desktop. */
html[data-device="smartphone"][data-orientation="landscape"] .game .table-wrap {
  box-sizing: border-box;
  min-height: var(--viewport-height);
  padding: 50px 14vw 82px !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .plastic-table {
  --played-card-width: clamp(45px, 5.2vw, 62px);
  --played-card-height: clamp(64px, 7.35vw, 88px);
  width: min(68vw, 1080px) !important;
  min-width: 430px !important;
  height: min(calc(var(--viewport-height) - 126px), 650px) !important;
  min-height: 235px;
  aspect-ratio: auto !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .scoreboard {
  top: max(3px, env(safe-area-inset-top));
  width: min(450px, 43vw);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .opponent,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="individual"] .opponent {
  left: 50%; top: 3%; right: auto; bottom: auto;
  transform: translate(-50%,-50%) scale(.70);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .me,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="individual"] .me {
  left: 50%; top: auto; right: auto; bottom: 1%;
  transform: translate(-50%,50%) scale(.70);
  transform-origin: center;
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .left-player {
  left: 1%; top: 50%; right: auto; bottom: auto;
  transform: translate(-48%,-50%) scale(.66);
  transform-origin: center;
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .right-player {
  left: auto; top: 50%; right: 1%; bottom: auto;
  transform: translate(48%,-50%) scale(.66);
  transform-origin: center;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .trick,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .trick {
  inset: 14% 8% !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .trick .table-seat-0 { left:50%; top:83%; }
html[data-device="smartphone"][data-orientation="landscape"] .game .trick .table-seat-1 { left:15%; top:50%; }
html[data-device="smartphone"][data-orientation="landscape"] .game .trick .table-seat-2 { left:50%; top:17%; }
html[data-device="smartphone"][data-orientation="landscape"] .game .trick .table-seat-3 { left:85%; top:50%; }
html[data-device="smartphone"][data-orientation="landscape"] .game .deck-zone {
  transform: translate(-50%,-50%) scale(.70) !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .hand {
  bottom: max(3px, env(safe-area-inset-bottom));
  width: max-content;
  min-width: 0;
  column-gap: 7px !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .hand .card {
  width: clamp(58px, 6.6vw, 82px);
  height: clamp(84px, 19.5dvh, 116px);
  margin-left: 0 !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .signals-panel {
  left: max(8px, env(safe-area-inset-left)); bottom: max(6px, env(safe-area-inset-bottom));
}
html[data-device="smartphone"][data-orientation="landscape"] .game .quick-chat {
  left: max(112px, calc(env(safe-area-inset-left) + 112px)); right: auto;
  bottom: max(6px, env(safe-area-inset-bottom));
}
html[data-device="smartphone"][data-orientation="landscape"] .game .actions {
  left: auto; right: max(8px, env(safe-area-inset-right));
  bottom: max(6px, env(safe-area-inset-bottom)); width: min(31vw, 360px);
}
html[data-device="smartphone"][data-orientation="landscape"] .game .message {
  bottom: 7% !important; max-width: 46%;
}

/* Assento compacto: cartas em leque, retrato/relógio e faixa de nome. */
html[data-device="smartphone"][data-orientation="landscape"] .game .seat {
  width: 102px; height: 76px; min-width: 102px;
  display: block; padding: 0;
  border: 0; border-radius: 0; background: transparent;
  box-shadow: none;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat.active {
  animation: none; box-shadow: none;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat .avatar,
html[data-device="smartphone"][data-orientation="landscape"] .game .seat > img {
  position: absolute; z-index: 3; left: 50%; top: 8px;
  width: 48px; height: 48px; transform: translateX(-50%);
  border: 3px solid #efc43e; box-shadow: 0 5px 13px #25100688;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat.active .avatar,
html[data-device="smartphone"][data-orientation="landscape"] .game .seat.active > img {
  border-color: #fff38b; box-shadow: 0 0 0 4px #58ed7b88, 0 0 18px #ffd22d;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat > div:not(.avatar):not(.card-backs) {
  position: absolute; z-index: 5; left: 50%; bottom: 0;
  width: 102px; min-width: 0; padding: 3px 7px;
  transform: translateX(-50%); text-align: center;
  border: 1px solid #edc33e; border-radius: 5px;
  background: #087047eF; box-shadow: 0 4px 10px #210b0566;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat strong {
  max-width: 88px; font-size: .63rem;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat small {
  max-width: 88px; margin-top: 0; font-size: .46rem;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat .seat-timer {
  z-index: 4; left: 50%; top: 6px; width: 52px; height: 52px;
  transform: translateX(-50%);
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat .card-backs,
html[data-device="smartphone"][data-orientation="landscape"] .game .opponent .card-backs,
html[data-device="smartphone"][data-orientation="landscape"] .game .left-player .card-backs,
html[data-device="smartphone"][data-orientation="landscape"] .game .right-player .card-backs {
  position: absolute !important; z-index: 1; left: 50% !important; right: auto !important;
  top: -7px !important; bottom: auto !important; transform: translateX(-50%) !important;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat .card-backs i {
  width: 22px; height: 32px; margin-left: -12px;
  transform-origin: 50% 100%;
}
html[data-device="smartphone"][data-orientation="landscape"] .game .seat .card-backs i:first-child { transform: rotate(-16deg) translateY(3px); }
html[data-device="smartphone"][data-orientation="landscape"] .game .seat .card-backs i:last-child { transform: rotate(16deg) translateY(3px); }
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .opponent,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="individual"] .opponent {
  top: 7%; transform: translate(-50%,0) scale(.88);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .me,
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="individual"] .me {
  bottom: 1%; transform: translate(-50%,50%) scale(.88);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .left-player {
  left: 1%; transform: translate(-48%,-50%) scale(.84);
}
html[data-device="smartphone"][data-orientation="landscape"] .game[data-match-type="duplas"] .right-player {
  right: 1%; transform: translate(48%,-50%) scale(.84);
}

/* V28: uma unica composicao de carta para WebKit e Chromium.
   A figura ocupa apenas o miolo e usa cover para nao criar faixas brancas.
   Os indices ficam livres, sem placa ou sombra sobre J/Q/K. */
.court-figure {
  inset: 19% 20% !important;
  z-index: 1;
  overflow: hidden !important;
  border: 1px solid currentColor !important;
  border-radius: 4px;
  background-color: transparent !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  box-shadow: none !important;
  clip-path: none !important;
}
.card-corner {
  z-index: 5;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* A manilha continua dourada, mas o valor e os naipes obedecem ao baralho:
   copas/ouros vermelhos; paus/espadas pretos. */
.manilha { color: #101010 !important; }
.manilha.red { color: #c91f26 !important; }
.manilha .card-corner,
.manilha .pip,
.manilha .court-figure { color: inherit !important; text-shadow: none !important; }

/* O arquivo do dorso tem uma margem clara na extremidade. O pequeno zoom
   recorta somente essa sobra e preserva a moldura dourada do Trucuzin. */
.card-back-face,
.card-back-on-table,
.deck-pile i,
.shuffle-effect i,
.card-backs i {
  border-color: #c99c22 !important;
  background-color: #06452f !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 112% auto !important;
  box-shadow: 0 6px 13px #2b100656 !important;
}
.card .card-back-face { border: 0 !important; }
.card-back-on-table { border-width: 1px !important; }
.deck-pile i,
.shuffle-effect i,
.card-backs i { border-width: 1px !important; }
.mascot-signal.full {
  background-image: url('assets/sinal-cheio-trucuzin-v2.webp') !important;
  background-size: cover !important;
  background-position: center !important;
}
.quick-chat-menu {
  max-height: min(440px, 72dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.card-corner strong.rank { letter-spacing: -.035em; line-height: .84; }
.card-corner strong.rank-6 { text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .08em; }
.pip-layout { inset: 19% 20%; }
.pip { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }

/* V29: frente aprovada. O dorso nao participa destas regras. */
.mini-card:not(.card-back-on-table):not(.manilha),
.table-card:not(.card-back-on-table):not(.manilha),
.card:not(.manilha) .card-front {
  background: #fff !important;
}
.mini-card:not(.card-back-on-table):not(.manilha),
.table-card:not(.card-back-on-table):not(.manilha),
.card:not(.manilha) {
  border-color: #aaa7a0;
  box-shadow: 0 8px 17px #2b100657 !important;
}
.card .card-front { border-radius: inherit; }
.court-figure {
  top: 12% !important;
  right: 22% !important;
  bottom: 12% !important;
  left: 22% !important;
  display: block;
  overflow: hidden !important;
  border: 1px solid currentColor !important;
  border-radius: 3px;
  background: #fff !important;
  box-shadow: none !important;
}
.court-figure img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.card-corner.top { left: 6%; top: 5%; }
.card-corner.bottom { right: 6%; bottom: 5%; }
.card-corner strong.rank { font-weight: 900; letter-spacing: -.04em; line-height: .82; }
.card-corner i { line-height: .9; }
.mini-card:not(.red) > .card-corner,
.table-card:not(.red) > .card-corner,
.card:not(.red) .card-corner { color: #0b0b0b; }
.red .card-corner { color: #d01920; }
.clean-deck-choice { grid-column: 1 / -1; }

/* V30: uma unica face vetorial para mao, mesa, vira e resultado.
   Todas as medidas internas usam o mesmo viewBox; reduzir a carta nao remonta
   indices, naipes ou figuras. O dorso nao participa destas regras. */
.mini-card > .card-front,
.table-card > .card-front,
.card > .card-front {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: #fff !important;
}
.card-face-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.card-face-art .card-rank,
.card-face-art .card-suit,
.card-face-art .card-pip {
  fill: currentColor;
  text-anchor: middle;
  dominant-baseline: middle;
}
.card-face-art .card-rank { font-size: 23px; font-weight: 900; }
.card-face-art .card-suit { font-size: 16px; font-weight: 800; }
.card-face-art .card-pip { font-size: 18px; font-weight: 700; }
.card-face-art .court-art rect {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 1.2px;
}
.card-face-art .court-art image { pointer-events: none; }
.card-face-art .manilha-label rect { fill: #4b3100; }
.card-face-art .manilha-label text {
  fill: #ffe56e;
  font-family: Inter, system-ui, sans-serif;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: .6px;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* A manilha preserva a mesma frente branca. Ouro apenas na moldura e brilho. */
.mini-card.manilha,
.table-card.manilha,
.card.manilha {
  background: #fff !important;
  border: 3px solid #ffc928 !important;
  box-shadow: 0 0 0 2px #7a4b00, 0 8px 22px #ffbd1f88 !important;
}
.manilha > .card-front { background: #fff !important; }

/* A carta jogada nunca troca cor, contraste ou desenho conforme o resultado. */
.game .trick .table-card.winning-card,
.game .trick .table-card.losing-card {
  filter: none !important;
}
.game .trick .table-card.winning-card {
  box-shadow: 0 0 0 2px #e7b92f, 0 8px 18px #2b100657 !important;
}

/* V31: frentes fechadas do conjunto aprovado. Letra, naipe, pips e figura
   pertencem a uma unica imagem; nenhum navegador pode remonta-los. */
.mini-card:not(.card-back-on-table),
.table-card:not(.card-back-on-table),
.card:not(.selected-covered) {
  overflow: hidden !important;
  background: transparent !important;
  border-color: transparent !important;
}
.mini-card > .card-front,
.table-card > .card-front,
.card > .card-front {
  background: transparent !important;
}
.card-face-sprite {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.card-face-sprite image { pointer-events: none; }
.game .hand .card:disabled,
.game .hand .card.manilha:disabled {
  opacity: 1 !important;
  filter: none !important;
}
.mini-card.manilha,
.table-card.manilha,
.card.manilha {
  border-color: #ffc928 !important;
}

/* V32: a manilha continua sendo a mesma carta, sem moldura duplicada.
   Somente um brilho externo indica a força. */
.mini-card.manilha,
.table-card.manilha,
.card.manilha {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 0 0 13px 3px #ffc928aa, 0 7px 15px #2b100657 !important;
}
@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  .game .quick-chat {
    bottom: calc(220px + env(safe-area-inset-bottom)) !important;
  }
}

/* V37: mapa fixo aprovado — jogadores nos cantos e vaza em cruz alinhada. */
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick {
  inset: 12% 12% !important;
}
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-card,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-card.losing-card {
  margin: 0 !important;
}
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-0,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-0 {
  left: 50% !important;
  top: 76% !important;
  transform: translate(-50%,-50%) rotate(0deg) !important;
}
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-1,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-1 {
  left: 24% !important;
  top: 50% !important;
  transform: translate(-50%,-50%) rotate(0deg) !important;
}
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-2,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-2 {
  left: 50% !important;
  top: 24% !important;
  transform: translate(-50%,-50%) rotate(0deg) !important;
}
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-3,
html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-3 {
  left: 76% !important;
  top: 50% !important;
  transform: translate(-50%,-50%) rotate(0deg) !important;
}

@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .left-player {
    left: 4% !important; right: auto !important; top: 5% !important; bottom: auto !important;
    transform: scale(.68) !important; transform-origin: left top !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .opponent {
    left: auto !important; right: 4% !important; top: 5% !important; bottom: auto !important;
    transform: scale(.68) !important; transform-origin: right top !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .me {
    left: 4% !important; right: auto !important; top: auto !important; bottom: 5% !important;
    transform: scale(.68) !important; transform-origin: left bottom !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .right-player {
    left: auto !important; right: 4% !important; top: auto !important; bottom: 5% !important;
    transform: scale(.68) !important; transform-origin: right bottom !important;
  }
}

@media (max-height: 700px) and (pointer: coarse) and (orientation: landscape) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .left-player {
    left: 5% !important; right: auto !important; top: 5% !important; bottom: auto !important;
    transform: scale(.76) !important; transform-origin: left top !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .opponent {
    left: auto !important; right: 5% !important; top: 5% !important; bottom: auto !important;
    transform: scale(.76) !important; transform-origin: right top !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .me {
    left: 5% !important; right: auto !important; top: auto !important; bottom: 5% !important;
    transform: scale(.76) !important; transform-origin: left bottom !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .right-player {
    left: auto !important; right: 5% !important; top: auto !important; bottom: 5% !important;
    transform: scale(.76) !important; transform-origin: right bottom !important;
  }
}

/* V33: estados aprovados. A arte e as proporcoes da carta permanecem iguais. */
.game .quick-message-bubble {
  position: absolute;
  z-index: 29;
  width: max-content;
  max-width: min(230px, 58%);
  min-width: 0;
  padding: 7px 12px;
  border: 2px solid #efc443;
  border-radius: 15px 15px 15px 4px;
  background: #fffdf2;
  color: #34200c;
  font-size: clamp(.65rem, 1.7vw, .78rem);
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  pointer-events: none;
}
.game .quick-message-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 11px;
  height: 11px;
  background: #fffdf2;
  border-right: 2px solid #efc443;
  border-bottom: 2px solid #efc443;
  transform: translateX(-50%) rotate(45deg);
}
.game .quick-message-bubble.bubble-below::after {
  top: -7px;
  bottom: auto;
  border: 0;
  border-left: 2px solid #efc443;
  border-top: 2px solid #efc443;
}
.game .trick .table-card.winning-card {
  box-shadow: 0 0 0 2px #08a665, 0 8px 18px #2b100657 !important;
}
.mini-card.manilha > .card-front::after,
.table-card.manilha > .card-front::after,
.card.manilha > .card-front::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, #fff1a05e 0%, #efb92872 50%, #c98b1454 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.mini-card.manilha,
.table-card.manilha,
.card.manilha {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 0 0 11px 2px #e8b52291, 0 7px 15px #2b100657 !important;
}
.game .trick .table-card.manilha.winning-card {
  box-shadow: 0 0 0 2px #08a665, 0 0 11px 3px #e8b52291, 0 8px 18px #2b100657 !important;
}

/* V34: central de recompensas sem interferir na mesa ou nas cartas. */
.rewards-modal {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: #031b14c9;
  backdrop-filter: blur(7px);
}
.rewards-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(760px, calc(100dvh - 28px));
  overflow-y: auto;
  padding: 22px;
  border: 3px solid #efc443;
  border-radius: 22px;
  background: linear-gradient(155deg, #07543c, #032c21 68%);
  color: #fff;
  box-shadow: 0 25px 70px #120703c7;
  overscroll-behavior: contain;
}
.rewards-card h2 { margin: 0; font-size: 1.55rem; }
.rewards-balance { margin: 5px 0 16px; color: #cfe4d9; }
.rewards-balance strong { color: #ffe36c; }
.rewards-close {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 38px;
  height: 38px;
  border: 1px solid #ffffff2e;
  border-radius: 50%;
  background: #001c15b8;
  color: #fff;
  font-size: 1.5rem;
}
.rewards-card section {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #ffffff20;
  border-radius: 14px;
  background: #ffffff0b;
}
.rewards-card section > div:first-child { display: grid; gap: 3px; }
.rewards-card small { color: #bcd4c7; line-height: 1.3; }
.rewards-card button {
  min-height: 42px;
  border: 1px solid #f3cf59;
  border-radius: 10px;
  background: linear-gradient(#fddd68, #eaa918);
  color: #392300;
  font-weight: 950;
}
.rewards-card button:disabled { opacity: .55; filter: grayscale(.65); }
.referral-entry, .ad-free-options { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.referral-entry input {
  min-width: 0;
  border: 1px solid #ffffff36;
  border-radius: 10px;
  padding: 10px;
  background: #021f17;
  color: #fff;
  text-transform: uppercase;
}
.ad-free-options { grid-template-columns: repeat(3, 1fr); }
.ad-free-options button { padding: 7px 5px; font-size: .7rem; }
.virtual-coins-note {
  margin: 14px 3px 0;
  color: #aac8b8;
  font-size: .72rem;
  line-height: 1.35;
  text-align: center;
}
.vip-reward { border-color: #f2c94c80 !important; background: linear-gradient(145deg, #5d3f081f, #ffffff08) !important; }
.vip-points { margin: 0; color: #d8e8df; font-size: .83rem; }
.vip-points b { color: #ffe36c; }
.vip-trial-notice {
  padding: 9px;
  border: 1px solid #f3c94d66;
  border-radius: 9px;
  background: #2c210b85;
  color: #f8e8aa;
  font-size: .69rem;
  line-height: 1.4;
}
.vip-missions { display: grid; gap: 7px; }
.vip-missions article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid #ffffff1f;
  border-radius: 10px;
  background: #001c156b;
}
.vip-missions article > div { display: grid; gap: 2px; }
.vip-missions article small { color: #f3c94d; font-size: .57rem; font-weight: 900; letter-spacing: .08em; }
.vip-missions article strong { font-size: .83rem; }
.vip-missions article span { color: #bcd4c7; font-size: .65rem; }
.vip-missions article button { min-height: 36px; padding: 5px 8px; font-size: .64rem; }
.vip-renew-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
@media (max-width: 520px) {
  .rewards-card { padding: 18px 14px; }
  .ad-free-options { grid-template-columns: 1fr; }
  .vip-renew-options { grid-template-columns: 1fr; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .rewards-card { width: min(760px, 92vw); padding: 13px 16px; }
  .rewards-card h2 { font-size: 1.15rem; }
  .rewards-card section { grid-template-columns: 1fr 1fr; margin-top: 6px; padding: 8px; }
  .referral-reward, .ad-free-reward { grid-template-columns: 1fr 1fr !important; }
  .virtual-coins-note { margin-top: 7px; }
}

/* V35: piloto aprovado — somente organizacao responsiva da mesa e informacoes. */
.seat-balance {
  display: block;
  position: relative;
  z-index: 2;
  margin-top: 2px;
  color: #ffe36c;
  font-size: .56rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.seat-timer { font-size: 0; }
.seat-timer::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #07513b;
}
.quick-message-bubble strong { margin-right: 4px; }
.daily-streak {
  display: grid;
  grid-template-columns: repeat(6, minmax(52px, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.daily-streak > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 3px;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  background: #021f17a8;
  text-align: center;
}
.daily-streak > span.current { border-color: #ffe26a; box-shadow: 0 0 0 2px #f3c83d33; }
.daily-streak > span.claimed { background: #0b6646; }
.daily-streak small { font-size: .48rem; }
.daily-streak b { color: #ffe36c; font-size: .57rem; white-space: nowrap; }

/* O vira fica a esquerda, parcialmente coberto pelo monte, sempre sem rotacao. */
.game .deck-zone .vira-area {
  left: 0 !important;
  transform: translateY(-50%) rotate(0deg) !important;
}
.game .deck-zone .deck-pile { left: 30px !important; }
.game .deck-zone .vira-area small { left: -1px; right: auto; }
.game .deck-zone .mini-card,
.game .deck-zone .mini-card .card-front,
.game .deck-zone .card-face-sprite { transform: none !important; }

/* Duplas em smartphone: quatro cantos independentes e centro livre. */
html[data-device="smartphone"] .game[data-match-type="duplas"] .seat .card-backs {
  position: absolute !important;
  z-index: 1 !important;
  left: 50% !important;
  right: auto !important;
  top: -25px !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
}
html[data-device="smartphone"] .game[data-match-type="duplas"] .seat > div:not(.avatar):not(.card-backs) {
  position: relative;
  z-index: 5;
}

@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  html[data-device="smartphone"] .game .table-wrap { padding-bottom: 208px; }
  html[data-device="smartphone"] .game .plastic-table {
    width: min(96vw, calc((100dvh - 350px) * 1.12));
    min-width: 300px;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .opponent {
    left: auto; right: 1%; top: 5%; bottom: auto;
    transform: translate(10%,-50%) scale(.70);
    transform-origin: right center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .left-player {
    left: 1%; right: auto; top: 5%; bottom: auto;
    transform: translate(-10%,-50%) scale(.70);
    transform-origin: left center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .right-player {
    left: auto; right: 1%; top: auto; bottom: 5%;
    transform: translate(10%,50%) scale(.70);
    transform-origin: right center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .me {
    left: 1%; right: auto; top: auto; bottom: 5%;
    transform: translate(-10%,50%) scale(.70);
    transform-origin: left center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick { inset: 17% 12% !important; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-0 { left:34%; top:77%; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-1 { left:28%; top:27%; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-2 { left:66%; top:23%; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-3 { left:72%; top:73%; }
  html[data-device="smartphone"] .game .hand { column-gap: clamp(6px, 2vw, 9px) !important; }
  html[data-device="smartphone"] .game .hand .card { margin-left: 0 !important; }
  .daily-streak { grid-template-columns: repeat(3, 1fr); }
}

@media (max-height: 700px) and (pointer: coarse) and (orientation: landscape) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .opponent {
    left: auto; right: 7%; top: 9%; bottom: auto;
    transform: translate(0,-35%) scale(.82);
    transform-origin: right center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .left-player {
    left: 7%; right: auto; top: 9%; bottom: auto;
    transform: translate(0,-35%) scale(.82);
    transform-origin: left center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .right-player {
    left: auto; right: 7%; top: auto; bottom: 9%;
    transform: translate(0,35%) scale(.82);
    transform-origin: right center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .me {
    left: 7%; right: auto; top: auto; bottom: 9%;
    transform: translate(0,35%) scale(.82);
    transform-origin: left center;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick { inset: 12% 13% !important; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-0 { left:37%; top:76%; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-1 { left:31%; top:26%; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-2 { left:63%; top:24%; }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-3 { left:69%; top:74%; }
}

@media (max-width: 360px) and (pointer: coarse) and (orientation: portrait),
       (max-height: 380px) and (pointer: coarse) and (orientation: landscape) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .seat {
    --avatar-size: 58px;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .seat-balance {
    font-size: .52rem;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick {
    --played-card-w: 42px;
    --played-card-h: 59px;
  }
}

/* V36: correcao da regressao de viewport e cantos da v35. */
html,
body,
body > main,
.screen {
  width: 100%;
  max-width: none;
}
html,
body,
body > main {
  min-width: 100%;
  overflow-x: hidden;
}
.lobby {
  width: 100%;
  min-width: 100%;
}

@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .opponent {
    left: auto; right: 3%; top: 7%; bottom: auto;
    transform: scale(.70);
    transform-origin: right top;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .left-player {
    left: 3%; right: auto; top: 7%; bottom: auto;
    transform: scale(.70);
    transform-origin: left top;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .right-player {
    left: auto; right: 3%; top: auto; bottom: 7%;
    transform: scale(.70);
    transform-origin: right bottom;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .me {
    left: 3%; right: auto; top: auto; bottom: 7%;
    transform: scale(.70);
    transform-origin: left bottom;
  }
}

@media (max-height: 700px) and (pointer: coarse) and (orientation: landscape) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .opponent {
    left: auto; right: 7%; top: 7%; bottom: auto;
    transform: scale(.78);
    transform-origin: right top;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .left-player {
    left: 7%; right: auto; top: 7%; bottom: auto;
    transform: scale(.78);
    transform-origin: left top;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .right-player {
    left: auto; right: 7%; top: auto; bottom: 7%;
    transform: scale(.78);
    transform-origin: right bottom;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .me {
    left: 7%; right: auto; top: auto; bottom: 7%;
    transform: scale(.78);
    transform-origin: left bottom;
  }
}

/* V38: piloto final aprovado — vaza em grade e atalhos acima da mao.
   Este bloco precisa permanecer por ultimo para vencer as regras legadas. */
@media (max-width: 700px) and (pointer: coarse) and (orientation: portrait) {
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick {
    inset: 12% 10% !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-card,
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-card.losing-card {
    margin: 0 !important;
    transform: translate(-50%, -50%) rotate(0deg) !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-0,
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-0 {
    left: 26% !important;
    top: 73% !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-1,
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-1 {
    left: 26% !important;
    top: 27% !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-2,
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-2 {
    left: 74% !important;
    top: 27% !important;
  }
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .table-seat-3,
  html[data-device="smartphone"] .game[data-match-type="duplas"] .trick .losing-card.table-seat-3 {
    left: 74% !important;
    top: 73% !important;
  }

  html[data-device="smartphone"] .game .signals-panel,
  html[data-device="smartphone"] .game .quick-chat {
    position: fixed !important;
    top: auto !important;
    bottom: calc(236px + env(safe-area-inset-bottom)) !important;
  }
  html[data-device="smartphone"] .game .signals-panel {
    left: max(8px, env(safe-area-inset-left)) !important;
    right: auto !important;
  }
  html[data-device="smartphone"] .game .quick-chat {
    left: auto !important;
    right: max(8px, env(safe-area-inset-right)) !important;
  }
}
