/* Follow the authoritative active seat. The light stays outside the portrait
   and underneath the cup, leaving the dice, calls and player details readable. */
body.depth-theme.first-person-demo.at-table .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .seat-avatar {
  border-color: #fff9d5;
  box-shadow: 0 0 0 2px #805b20, 0 0 0 5px #ffdb67,
    0 0 0 7px #8effe9b3, 0 0 21px 5px #61ffe4b8;
  animation: table-turn-portrait-glow 1.8s ease-in-out infinite;
}

body.depth-theme.first-person-demo.at-table .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .seat-name {
  color: #512c65;
  background: linear-gradient(#fff4bf, #ffd776);
  box-shadow: inset 0 0 0 1px #fff9d9, 0 1px 2px #82589c55;
  text-shadow: none;
}

body.depth-theme.first-person-demo.at-table .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .cup-model::before {
  /* Older revealed-hand styling hides this base; the active turn still needs
     its light when the local player's visible dice live inside the cup. */
  display: block;
  border: 2px solid #fff2a4;
  background: radial-gradient(ellipse, #fff1a889 0%, #8dffde8c 47%, #35d7bc52 72%);
  box-shadow: 0 0 0 2px #6df2d4b3, 0 0 12px 5px #a8ffe4cc,
    inset 0 0 8px #fff4a8cc;
  animation: table-turn-cup-glow 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes table-turn-portrait-glow {
  0%, 100% {
    box-shadow: 0 0 0 2px #805b20, 0 0 0 5px #ffdb67,
      0 0 0 7px #8effe98f, 0 0 15px 3px #61ffe499;
  }
  50% {
    box-shadow: 0 0 0 2px #805b20, 0 0 0 5px #ffe894,
      0 0 0 8px #8effe9cc, 0 0 23px 6px #61ffe4cc;
  }
}

@keyframes table-turn-cup-glow {
  0%, 100% {
    box-shadow: 0 0 0 2px #6df2d499, 0 0 9px 3px #a8ffe4a6,
      inset 0 0 6px #fff4a8b3;
  }
  50% {
    box-shadow: 0 0 0 3px #6df2d4cc, 0 0 15px 6px #a8ffe4e6,
      inset 0 0 10px #fff4a8e6;
  }
}

/* Match the in-game room-animation setting as well as the OS preference.
   The base rules keep the gold/mint highlight visible without any motion. */
body.depth-theme.first-person-demo.at-table:is(.ktv-motion-off, .ktv-page-hidden) .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .seat-avatar,
body.depth-theme.first-person-demo.at-table:is(.ktv-motion-off, .ktv-page-hidden) .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .cup-model::before {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  body.depth-theme.first-person-demo.at-table .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .seat-avatar,
  body.depth-theme.first-person-demo.at-table .table.is-playing .seats .seat.is-turn:not(.is-waiting):not(.is-empty) .cup-model::before {
    animation: none;
  }
}
