.cabo-scene {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, #231b1408, #24160b24 62%, #170f09a3),
    url('/assets/card-room.webp') center 47% / cover no-repeat,
    radial-gradient(ellipse at 62% 0%, #8a5734, #33231c 55%, #1d1714);
  touch-action: manipulation;
}

.cabo-canvas, .cabo-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cabo-canvas { display: block; }
.cabo-labels { pointer-events: none; font-family: 'DM Sans', system-ui, sans-serif; }
.cabo-scene [hidden] { display: none; }

.cabo-seat {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 142px;
  width: max-content;
  padding: 4px 8px 4px 4px;
  color: #fcf0d8;
  background: #112620f2;
  border: 1px solid #d2ad6a58;
  border-radius: 99px;
  box-shadow: 0 4px 9px #070d09a0;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition: box-shadow .25s ease, border-color .25s ease;
  font-size: 11px;
  line-height: 1.15;
}

.cabo-seat[data-active='true'] {
  border-color: #eac173;
  box-shadow: 0 0 0 3px #eac17329, 0 3px 11px #160e09b5;
}

.cabo-seat[data-caller='true'] {
  border-color: #f3cb77;
  background: #624728;
  animation: cabo-call .72s ease-out;
}

@keyframes cabo-call {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  38% { transform: translate(-50%, -50%) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .cabo-seat { transition: none; }
  .cabo-seat[data-caller='true'] { animation: none; }
}

.cabo-seat-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #c98861, #7a442e);
  color: #fff0da;
  font-weight: 800;
  overflow: hidden;
}

.cabo-seat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cabo-seat-copy { display: grid; gap: 1px; min-width: 0; }
.cabo-seat-copy b, .cabo-seat-copy small { overflow: hidden; text-overflow: ellipsis; }
.cabo-seat-copy small { color: #decbab; font-size: 9px; }

.cabo-pile-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #fff4d9;
  background: #0e241bdf;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cabo-target {
  position: absolute;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  appearance: none;
  box-shadow: none;
  pointer-events: none;
}

.cabo-target:focus-visible { outline: 2px solid #fff0b1; outline-offset: 2px; }

.cabo-fallback {
  position: absolute;
  inset: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  align-items: center;
  gap: 12px;
  padding: 18px;
  color: #f4e8cd;
}

.cabo-fallback section, .cabo-fallback nav { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.cabo-fallback button { min-width: 44px; min-height: 44px; color: #faebca; background: #204532; border: 1px solid #c7a674; border-radius: 7px; }
.cabo-fallback button[aria-pressed='true'] { outline: 2px solid #ffe195; }

@media (max-width: 600px) {
  .cabo-seat { max-width: 103px; font-size: 10px; gap: 4px; padding-right: 6px; }
  .cabo-seat-avatar { flex-basis: 22px; width: 22px; height: 22px; }
  .cabo-pile-label { font-size: 8px; }
}

@media (orientation: portrait) {
  .cabo-scene { background-position: center, 57% top, center; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .cabo-scene { background-position: center, center 39%, center; }
}
