.game-viewport.canvas-table.truco-table {
  --dock-height: 230px;
  --left-rail: 190px;
  --right-rail: 294px;
  --play-top: 72px;
  background: #fff8e6;
}
.game-viewport.canvas-table.truco-table .game-map {
  inset: 82px var(--right-rail) calc(var(--dock-height) + 12px) var(--left-rail);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.truco-table .game-players {
  top: 82px;
}
.truco-table .game-dock {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  height: var(--dock-height);
  gap: 4px;
  padding: 8px 12px;
  background: #fffaf0e8;
  border: 1px solid #e4d6bb;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}
.truco-table .table-toolbar {
  flex-shrink: 0;
  min-height: 38px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.truco-table .mesa-hand {
  flex: 1;
  min-height: 0;
  border: 0;
  box-shadow: none;
  padding: 0 8px;
  background: none;
  backdrop-filter: none;
  --card-width: 78px;
}
.truco-table .mesa-hand-table {
  display: none;
}
.truco-table .mesa-hand-heading {
  font-size: 12px;
  margin: 0;
}
.truco-table .mesa-hand-cards {
  justify-content: center;
  padding: 11px 4px 8px;
  height: 143px;
}
.truco-table .mesa-hand-confirmation {
  position: absolute;
  bottom: calc(var(--dock-height) + 8px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: max-content;
  max-width: 95%;
  padding: 9px;
  background: #fffaf0f5;
  border: 1px solid #dfcba7;
  border-radius: 14px;
  box-shadow: 0 4px 18px #39342b19;
  z-index: 18;
}
.truco-table .mesa-card:not(:disabled)[data-hand-card] {
  box-shadow: 0 4px 0 #2446ed66;
  border-color: #2446ed;
}
.truco-table .mesa-card:disabled {
  opacity: 0.85;
}
.truco-board {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px;
}
.truco-scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
  width: 100%;
  max-width: 470px;
}
.truco-team {
  text-align: center;
  padding: 12px;
  border: 1px solid #e1d2b5;
  background: #fffaf0d9;
  border-radius: 18px;
  min-width: 0;
}
.truco-team.is-own-team {
  border-color: #2446ed;
  box-shadow: inset 0 -4px 0 #2446ed25;
}
.truco-team > span {
  font-size: 12px;
  font-weight: 800;
}
.truco-team > strong {
  display: block;
  font-size: 38px;
  line-height: 1.1;
  color: #2446ed;
}
.truco-team strong small {
  font-size: 14px;
  color: #625744;
}
.truco-team p {
  font-size: 12px;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.truco-score-divider {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 22px;
}
.truco-middle {
  width: 100%;
  display: grid;
  grid-template-columns: 125px 1fr;
  align-items: center;
  gap: 18px;
}
.truco-vira {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  --card-width: 82px;
}
.truco-vira > span:not(.mesa-card) {
  font-size: 12px;
}
.truco-trick {
  padding: 14px;
  border: 1px solid #dfcba7;
  background: #fffaf0b8;
  border-radius: 22px;
  min-width: 0;
}
.truco-trick > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.truco-trick > header span {
  color: #625744;
}
.truco-trick-cards {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  min-height: 160px;
  padding: 10px 0;
  --card-width: 72px;
}
.truco-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.truco-play-name {
  font-size: 11px;
  font-weight: 800;
  max-width: 85px;
  overflow-wrap: anywhere;
}
.truco-play small {
  font-size: 10px;
}
.truco-trick-empty {
  align-self: center;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: #625744;
  max-width: 200px;
}
.truco-rounds {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.truco-rounds span {
  background: #e6dcc480;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 11px;
}
.truco-request {
  padding: 10px 16px;
  border-radius: 16px;
  background: #ffda55;
  box-shadow: 0 4px 0 #a66f2524;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: truco-request-in 0.22s ease-out;
}
.truco-request span {
  font-size: 12px;
}
.truco-partner {
  width: 100%;
  border: 1px solid #2446ed55;
  border-radius: 16px;
  background: #fffaf0e8;
  padding: 10px;
  text-align: center;
  font-size: 12px;
}
.truco-partner > div {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 10px;
  --card-width: 54px;
}
.truco-previous {
  width: 100%;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fffaf0b8;
}
.truco-previous summary {
  cursor: pointer;
}
.truco-previous .truco-trick-cards {
  min-height: 0;
  --card-width: 52px;
  flex-wrap: wrap;
}
.truco-cover {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}
.truco-cover input {
  width: 20px;
  height: 20px;
  accent-color: #2446ed;
}
.truco-hand-value {
  font-size: 12px;
  color: #625744;
}
.truco-preview {
  text-align: center;
  padding: 24px;
}
.truco-preview > div {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 34px;
  --card-width: 104px;
}
.truco-preview .mesa-card:first-child {
  transform: rotate(-12deg);
}
.truco-preview .mesa-card:last-child {
  transform: rotate(12deg);
}
.truco-preview h2 {
  font-size: clamp(28px, 3vw, 44px);
  margin: 22px 0 12px;
}
.truco-preview p {
  color: #625744;
  line-height: 1.5;
}
@keyframes truco-request-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (max-width: 900px) {
  .game-viewport.canvas-table.truco-table {
    --left-rail: 0px;
    --right-rail: 0px;
    --dock-height: 218px;
    --play-top: 64px;
  }
  .game-viewport.canvas-table.truco-table .game-map {
    inset: calc(var(--play-top) + 56px) 6px calc(var(--dock-height) + 8px);
    align-items: flex-start;
  }
  .game-viewport.canvas-table.truco-table:has(.player-expanded) .game-map {
    top: calc(var(--play-top) + 148px);
  }
  .truco-table .game-players {
    top: var(--play-top);
  }
  .truco-board {
    padding: 6px;
    gap: 10px;
  }
  .truco-scoreboard {
    gap: 20px;
  }
  .truco-team {
    padding: 8px;
  }
  .truco-team > strong {
    font-size: 30px;
  }
  .truco-team p {
    font-size: 11px;
  }
  .truco-middle {
    grid-template-columns: 76px 1fr;
    gap: 8px;
  }
  .truco-vira {
    --card-width: 60px;
    gap: 4px;
    text-align: center;
  }
  .truco-vira > span:not(.mesa-card) {
    font-size: 10px;
  }
  .truco-trick {
    padding: 10px 7px;
  }
  .truco-trick-cards {
    --card-width: 53px;
    gap: 7px;
    min-height: 133px;
    flex-wrap: wrap;
  }
  .truco-play-name {
    max-width: 60px;
    font-size: 10px;
  }
  .truco-trick > header {
    font-size: 11px;
  }
  .truco-rounds span {
    font-size: 10px;
    padding: 3px 5px;
  }
  .truco-table .game-dock {
    padding: 7px 6px;
  }
  .truco-table .table-toolbar {
    gap: 6px;
  }
  .truco-table .mesa-hand {
    --card-width: 68px;
    padding: 0 3px;
  }
  .truco-table .mesa-hand-cards {
    height: 124px;
  }
  .truco-table .mesa-hand-confirmation {
    padding: 7px;
  }
  .truco-table .mesa-hand-confirmation .button {
    padding: 7px 12px;
  }
  .truco-table .table-toolbar .button {
    padding: 8px 11px;
    font-size: 12px;
  }
  .truco-request {
    padding: 9px 10px;
  }
  .truco-partner > div {
    --card-width: 45px;
  }
  .truco-hand-value {
    font-size: 11px;
  }
}
@media (max-height: 650px) {
  .game-viewport.canvas-table.truco-table {
    --dock-height: 180px;
  }
  .truco-table .mesa-hand {
    --card-width: 54px;
  }
  .truco-table .mesa-hand-cards {
    height: 101px;
  }
  .truco-board {
    gap: 8px;
  }
  .truco-team {
    padding: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .truco-request {
    animation: none;
  }
  .truco-table * {
    scroll-behavior: auto;
  }
}
