:root {
  --bg: #131313;
  --surface: #201f1f;
  --surface-high: #2a2a2a;
  --ink: #e5e2e1;
  --muted: #dcbed4;
  --outline: #564052;
  --pink: #ffabf3;
  --magenta: #ff00ff;
  --cyan: #00fbfb;
  --yellow: #fff000;
  --lime: #abd600;
  --error: #ffb4ab;
  --black: #0e0e0e;
  --board-safe-left: 29rem;
  --board-safe-top: 9rem;
  --board-safe-width: calc(100vw - 58rem);
  --board-safe-height: calc(100vh - 12.625rem);
}

* { box-sizing: border-box; }

.hidden {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0.82;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15), rgba(0,0,0,0.15) 1px, transparent 1px, transparent 2px);
}

a { color: inherit; }

.obs-scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 0, 255, 0.25), transparent 32vw),
    radial-gradient(circle at 78% 72%, rgba(0, 251, 251, 0.22), transparent 34vw),
    radial-gradient(circle at 50% 58%, rgba(171, 214, 0, 0.22), transparent 22vw),
    linear-gradient(110deg, #120017, #10081e 45%, #061d20 100%);
}

.digital-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 40px 40px;
}

.video-layer {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.12;
  filter: saturate(0.8) contrast(1.05);
  overflow: hidden;
  pointer-events: none;
}

.youtube-host,
.youtube-host iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 25%, rgba(0,0,0,0.18));
}

.arena-topbar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.875rem;
  align-items: center;
  height: 5.125rem;
  padding: 1rem 2.125rem 0.5rem;
  pointer-events: none;
}

.telemetry-block,
.chaos-pill,
.header-buy {
  background: rgba(32, 31, 31, 0.72);
  border: 0.125rem solid rgba(164, 137, 157, 0.52);
  border-radius: 62.4rem;
  box-shadow: inset 0 0 1.125rem rgba(255,255,255,0.06), 0 0 1.375rem rgba(0,0,0,0.34);
}

.telemetry-block {
  padding: 0.625rem 1rem;
}

.telemetry-block span,
.chaos-pill span {
  display: block;
  color: var(--muted);
  font-size: clamp(0.5rem, 0.7vw, 0.65rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.telemetry-block strong {
  display: block;
  margin-top: 0.1875rem;
  color: #fff;
  font-size: clamp(1.2rem, 1.8vw, 1.625rem);
  line-height: 1;
}

.telemetry-block.wide strong {
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
}

.switcher-block {
  padding: 0.5rem 0.875rem;
  display: flex;
  flex-direction: column;
}

.game-selector-dropdown {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  font-weight: 800;
  margin-top: 0.1rem;
  padding-right: 0.5rem;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.game-selector-dropdown option {
  background: #201f1f;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: bold;
}


.arena-topbar h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 3.8vw, 3.25rem);
  font-weight: 800;
  font-style: italic;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 0.625rem var(--magenta), 0 0 1.5rem rgba(255,0,255,0.45);
  white-space: nowrap;
  transform: scale(0.7);
  transform-origin: center;
}

.chaos-pill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.875rem;
  align-items: center;
  padding: 0.75rem 1rem;
}

.chaos-pill span {
  color: var(--error);
}

.chaos-pill i {
  display: block;
  width: 3.875rem;
  height: 1.125rem;
  overflow: hidden;
  background: rgba(255,255,255,0.18);
  border-radius: 62.4rem;
}

.chaos-pill b {
  display: block;
  width: 0;
  height: 100%;
  background: var(--error);
  border-radius: inherit;
  transition: width 500ms ease;
}

.chaos-pill strong {
  color: var(--error);
  font-size: clamp(0.9rem, 1.2vw, 1.25rem);
}

.header-buy {
  padding: 0.8125rem 0.875rem;
  color: var(--black);
  background: var(--pink);
  border-color: #fff;
  font-size: clamp(0.6rem, 0.75vw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  pointer-events: auto;
}

.event-banner {
  position: absolute;
  z-index: 4;
  top: 5.625rem;
  left: 50%;
  width: min(53.75rem, 58vw);
  min-height: 9.125rem;
  padding: 1.625rem 2.25rem 1.25rem;
  color: var(--black);
  background: linear-gradient(135deg, rgba(0,251,251,0.95), rgba(0,221,221,0.92));
  border: 0.25rem solid #fff;
  border-radius: 2.375rem;
  box-shadow: 0 0 1.75rem rgba(0,251,251,0.65), 0 1.625rem 5.625rem rgba(0,0,0,0.32);
  transform: translateX(-50%) scale(0.7);
  transform-origin: top center;
  text-align: center;
  container-type: inline-size;
}

.event-code {
  position: absolute;
  right: 2.625rem;
  top: -1.125rem;
  padding: 0.5rem 1.3125rem;
  color: var(--black);
  background: #fff;
  border: 0.1875rem solid var(--black);
  border-radius: 62.4rem;
  font-size: clamp(0.6rem, 0.75vw, 0.75rem);
  font-weight: 800;
}

.event-banner h2 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(1.25rem, 4.8cqw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-banner p {
  max-width: 48.75rem;
  margin: 0.75rem auto 0.875rem;
  overflow: hidden;
  font-size: clamp(0.75rem, 2.2cqw, 1.1rem);
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-moves {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  font-size: clamp(0.55rem, 1.8cqw, 0.7rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.best-moves span,
.best-moves em {
  padding: 0.5625rem 1rem;
  color: #fff;
  background: rgba(19,19,19,0.82);
  border: 0.125rem solid rgba(255,255,255,0.4);
  border-radius: 62.4rem;
  font-style: normal;
}

.arena-layout {
  position: absolute;
  z-index: 3;
  inset: 9rem 2.5rem 3.625rem;
  display: grid;
  grid-template-columns: 24rem 1fr;
  grid-template-rows: minmax(0, 1fr);
}

.game-arena {
  position: fixed;
  left: var(--board-safe-left);
  top: var(--board-safe-top);
  width: var(--board-safe-width);
  height: var(--board-safe-height);
  grid-column: auto;
}

.ludo-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.ludo-board {
  position: relative;
  width: min(850px, 60vw, calc(100vh - 220px));
  height: min(850px, 60vw, calc(100vh - 220px));
  min-width: 580px;
  min-height: 580px;
  background: rgba(32,31,31,0.62);
  border: 1px solid rgba(164,137,157,0.45);
  box-shadow: inset 0 0 26px rgba(0,251,200,0.1), 0 0 55px rgba(0,0,0,0.55);
  backdrop-filter: blur(16px);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.home-base {
  display: flex;
  position: absolute;
  width: 31%;
  height: 31%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  z-index: 2;
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.home-base.cyan { left: 4%; top: 4%; color: var(--cyan); }
.home-base.yellow { right: 4%; top: 4%; color: var(--yellow); }
.home-base.magenta { right: 4%; bottom: 4%; color: var(--magenta); }
.home-base.locked { left: 4%; bottom: 4%; color: #555555; }

.home-base-avatar {
  width: 45%;
  height: 45%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px double currentColor;
  margin-bottom: 0.35rem;
}

.home-base span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  display: none;
}

/* Fallback visible state */
.show-fallback .home-base {
  display: flex !important;
  background: rgba(14, 14, 14, 0.45) !important;
  border: 2px solid currentColor !important;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.05) !important;
}

.show-fallback .home-base span {
  display: block !important;
}

.center-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 23%;
  height: 23%;
  place-items: center;
  padding: 0.75rem;
  color: #fff;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  container-type: inline-size;
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.show-fallback .center-hub {
  background: radial-gradient(circle, rgba(0,251,251,0.24), rgba(14,14,14,0.9) 70%) !important;
  border: 0.125rem solid var(--cyan) !important;
  box-shadow: 0 0 1.75rem rgba(0,251,251,0.28) !important;
}

.center-hub span {
  color: var(--cyan);
  font-size: clamp(0.45rem, 6cqw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.center-hub strong {
  font-family: "Bricolage Grotesque", sans-serif;
  overflow: hidden;
  max-width: 96%;
  font-size: clamp(0.55rem, 11cqw, 1.1rem);
  line-height: 1.05;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.center-hub small {
  color: var(--muted);
  overflow: hidden;
  max-width: 96%;
  font-size: clamp(0.45rem, 6cqw, 0.75rem);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixi-board {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pixi-board canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.track-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.token-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.track-layer,
.token-layer {
  display: none;
}

.ludo-cell {
  position: absolute;
  display: grid;
  width: 5.6%;
  height: 5.6%;
  place-items: center;
  background: rgba(14,14,14,0.8);
  border: 1px solid rgba(164,137,157,0.38);
  box-shadow: inset 0 0 8px rgba(255,255,255,0.04);
  transform: translate(-50%, -50%);
}

.ludo-cell.safe-cyan { border-color: var(--cyan); background: rgba(0,251,251,0.16); }
.ludo-cell.safe-yellow { border-color: var(--yellow); background: rgba(255,240,0,0.16); }
.ludo-cell.safe-magenta { border-color: var(--magenta); background: rgba(255,0,255,0.16); }
.ludo-cell.safe-lime { border-color: var(--lime); background: rgba(171,214,0,0.16); }

.game-player {
  position: absolute;
  z-index: 8;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--black);
  background: currentColor;
  border: 4px solid #fff;
  border-radius: 999px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 0 18px currentColor;
  transform: translate(-50%, -50%);
  transition: left 900ms cubic-bezier(.22,.9,.22,1), top 900ms cubic-bezier(.22,.9,.22,1), scale 260ms ease;
}

.game-player.active {
  scale: 1.14;
  animation: token-pop 900ms ease both;
}

.game-player.cyan { color: var(--cyan); }
.game-player.yellow { color: var(--yellow); }
.game-player.magenta { color: var(--magenta); }

.dice-console {
  position: absolute;
  right: calc(50% - min(425px, 30vw, 50vh - 110px) - 148px);
  top: 50%;
  width: 128px;
  padding: 14px 12px;
  color: #fff;
  background: rgba(32,31,31,0.72);
  border: 2px solid var(--pink);
  box-shadow: inset 0 0 20px rgba(255,171,243,0.18), 0 0 22px rgba(255,0,255,0.2);
  transform: translateY(-50%);
  text-align: center;
}

.dice-console span {
  color: var(--pink);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.dice-wrapper {
  width: 3.75rem;
  height: 3.75rem;
  margin: 0.75rem auto;
  perspective: 300px;
}

.dice-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
}

.dice-face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--pink);
  background: rgba(32, 31, 31, 0.88);
  border: 0.1875rem solid var(--pink);
  border-radius: 0.875rem;
  box-shadow: inset 0 0 1rem rgba(255, 171, 243, 0.25), 0 0 1.25rem rgba(255, 0, 255, 0.3);
  backface-visibility: hidden;
}

/* Position faces in 3D (dimension 3.75rem -> half is 1.875rem) */
.face-front  { transform: rotateY(0deg) translateZ(1.875rem); }
.face-back   { transform: rotateY(180deg) translateZ(1.875rem); }
.face-right  { transform: rotateY(90deg) translateZ(1.875rem); }
.face-left   { transform: rotateY(-90deg) translateZ(1.875rem); }
.face-top    { transform: rotateX(90deg) translateZ(1.875rem); }
.face-bottom { transform: rotateX(-90deg) translateZ(1.875rem); }

/* Roll Animations */
.dice-cube.roll-1 { animation: roll-face-1 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.05) both; }
.dice-cube.roll-2 { animation: roll-face-2 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.05) both; }
.dice-cube.roll-3 { animation: roll-face-3 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.05) both; }
.dice-cube.roll-4 { animation: roll-face-4 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.05) both; }
.dice-cube.roll-5 { animation: roll-face-5 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.05) both; }
.dice-cube.roll-6 { animation: roll-face-6 1.2s cubic-bezier(0.2, 0.8, 0.25, 1.05) both; }

@keyframes roll-face-1 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(720deg) rotateY(1080deg) rotateZ(0deg); }
}
@keyframes roll-face-2 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(630deg) rotateY(1080deg) rotateZ(0deg); }
}
@keyframes roll-face-3 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(720deg) rotateY(1170deg) rotateZ(0deg); }
}
@keyframes roll-face-4 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(720deg) rotateY(990deg) rotateZ(0deg); }
}
@keyframes roll-face-5 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(810deg) rotateY(1080deg) rotateZ(0deg); }
}
@keyframes roll-face-6 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(900deg) rotateY(1080deg) rotateZ(0deg); }
}

.dice-console p {
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.agent-dock {
  position: absolute;
  z-index: 46;
  left: 2rem;
  top: 8.5rem;
  grid-column: 1;
  display: flex;
  width: 22rem;
  flex-direction: column;
  gap: 2rem;
}

.game-pawn-to-queen .agent-dock {
  position: fixed;
  left: var(--agent-dock-left, 2rem);
  top: var(--agent-dock-top, 8.5rem);
  width: var(--agent-card-width, 22rem);
  gap: var(--agent-dock-gap, 2rem);
}

.agent-mini {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: currentColor;
  background: rgba(19, 19, 19, 0.88);
  border: 4px solid currentColor;
  border-radius: 4px;
  transform: skewX(-10deg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.3s ease;
}

.game-pawn-to-queen .agent-mini {
  gap: clamp(0.45rem, calc(var(--agent-card-height, 150px) * 0.065), 1rem);
  width: var(--agent-card-width, 22rem);
  height: var(--agent-card-height, auto);
  padding: var(--agent-card-pad-y, 0.75rem) var(--agent-card-pad-x, 1rem);
}

.agent-mini.cyan { color: var(--cyan); }
.agent-mini.yellow { color: var(--yellow); }
.agent-mini.magenta { color: var(--magenta); }

.agent-mini.active {
  transform: scale(1.06) skewX(-10deg);
  background: rgba(30, 30, 30, 0.95);
  box-shadow: inset 0 0 1.5rem color-mix(in srgb, currentColor 45%, transparent), 0 0 2.5rem currentColor;
}

.game-pawn-to-queen .agent-mini.active {
  transform: scale(1.025) skewX(-10deg);
}

/* Persona Portrait Styling */
.persona-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 5.5rem;
  height: 5.5rem;
  transform: skewX(10deg);
}

.game-pawn-to-queen .persona-avatar-wrap {
  width: var(--agent-avatar-size, 5.5rem);
  height: var(--agent-avatar-size, 5.5rem);
}

.persona-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px double currentColor;
  overflow: hidden;
  background: #141414;
  box-shadow: 0 0 15px color-mix(in srgb, currentColor 50%, transparent);
}

.persona-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.persona-badge {
  position: absolute;
  bottom: -0.5rem;
  right: -0.25rem;
  padding: 0.15rem 0.5rem;
  color: var(--black);
  background: #fff;
  border: 2px solid var(--black);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--black);
  transform: rotate(-5deg);
}

/* Persona Info Plate */
.persona-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: skewX(10deg);
}

.game-pawn-to-queen .persona-info {
  gap: clamp(0.18rem, calc(var(--agent-card-height, 150px) * 0.032), 0.5rem);
}

.persona-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid color-mix(in srgb, currentColor 40%, transparent);
  padding-bottom: 0.25rem;
}

.persona-name {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 2px 0 var(--black);
  letter-spacing: 0.04em;
}

.game-pawn-to-queen .persona-name {
  font-size: var(--agent-name-size, 1.15rem);
}

.persona-mood {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  background: currentColor;
  color: var(--black);
  border-radius: 2px;
  box-shadow: 1px 1px 0 var(--black);
}

.game-pawn-to-queen .persona-mood {
  font-size: var(--agent-meta-size, 0.65rem);
}

/* Stats (Score and metrics bars) */
.persona-stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.game-pawn-to-queen .persona-stats {
  gap: clamp(0.16rem, calc(var(--agent-card-height, 150px) * 0.025), 0.4rem);
}

.persona-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Space Grotesk", sans-serif;
}

.persona-score-row .stat-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
}

.game-pawn-to-queen .persona-score-row .stat-label {
  font-size: var(--agent-meta-size, 0.6rem);
}

.persona-score-row .stat-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 2px 2px 0 var(--black);
  font-family: "Bricolage Grotesque", sans-serif;
}

.game-pawn-to-queen .persona-score-row .stat-value {
  font-size: var(--agent-score-size, 1.35rem);
}

.persona-bars {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.game-pawn-to-queen .persona-bars {
  gap: clamp(0.1rem, calc(var(--agent-card-height, 150px) * 0.016), 0.25rem);
}

.persona-bar-item {
  position: relative;
  height: 0.85rem;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transform: skewX(-15deg);
}

.game-pawn-to-queen .persona-bar-item {
  height: var(--agent-bar-height, 0.85rem);
}

.persona-bar-item .bar-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.persona-bar-item.attention .bar-fill {
  background: linear-gradient(90deg, #ff4c4c, #ff8c00);
  box-shadow: 0 0 10px rgba(255, 76, 76, 0.6);
}

.persona-bar-item.trust .bar-fill {
  background: linear-gradient(90deg, #ffb300, #ffee55);
  box-shadow: 0 0 10px rgba(255, 179, 0, 0.6);
}

.persona-bar-item.kindness .bar-fill {
  background: linear-gradient(90deg, #00d9b4, #00fbc8);
  box-shadow: 0 0 10px rgba(0, 251, 200, 0.6);
}

.persona-bar-item .bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  text-shadow: 1px 1px 1px var(--black);
  transform: skewX(15deg);
}

.game-pawn-to-queen .persona-bar-item .bar-text {
  font-size: var(--agent-meta-size, 0.55rem);
}

/* Comment Speech Bubbles in active HUD card */
.agent-bubble-anchor {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) skewX(10deg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 15rem;
  padding-left: 1.25rem;
  z-index: 100;
  pointer-events: none;
}

.game-pawn-to-queen .agent-bubble-anchor {
  display: var(--agent-bubble-display, flex);
  width: var(--agent-bubble-width, 15rem);
  padding-left: min(1.25rem, max(0.5rem, calc(var(--agent-bubble-width, 240px) * 0.08)));
}

.agent-bubble-anchor .comment-bubble {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  text-align: left !important;
  background: rgba(14, 14, 14, 0.94);
  border: 3px solid currentColor;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px color-mix(in srgb, currentColor 30%, transparent);
  clip-path: none;
  border-radius: 8px;
  animation: bubble-appear 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
  transform: none !important;
}

.agent-bubble-anchor .comment-bubble::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 2rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 15px 10px 0;
  border-color: transparent currentColor transparent transparent;
  display: block;
  z-index: 2;
}

.agent-bubble-anchor .comment-bubble::after {
  content: "";
  position: absolute;
  left: -11px;
  top: 2rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 15px 10px 0;
  border-color: transparent rgba(14, 14, 14, 0.94) transparent transparent;
  display: block;
  z-index: 3;
}

@keyframes bubble-appear {
  from { opacity: 0; transform: scale(0.8) translateX(-10px); }
  to { opacity: 1; transform: scale(1) translateX(0); }
}

.commentary-layer {
  position: absolute;
  z-index: 12;
  inset: 0;
  pointer-events: none;
}

.comment-bubble {
  position: absolute;
  width: min(23.75rem, 24vw);
  padding: 0.8125rem 1.0625rem;
  background: rgba(14,14,14,0.82);
  border: 0.125rem solid currentColor;
  box-shadow: 0 0 1.5rem color-mix(in srgb, currentColor 28%, transparent);
  clip-path: polygon(0.875rem 0, 100% 0, 100% calc(100% - 0.875rem), calc(100% - 0.875rem) 100%, 0 100%, 0 0.875rem);
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

.comment-bubble.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
}

.comment-bubble.primary {
  left: 2.5rem;
  bottom: 11.5rem;
  color: var(--cyan);
}

.comment-bubble.secondary {
  right: 2.5rem;
  bottom: 18.5rem;
  color: var(--yellow);
  text-align: right;
}

.comment-bubble.trash-talk {
  right: 2.5rem;
  bottom: 11.5rem;
  color: var(--pink);
  box-shadow: 0 0 1.5rem color-mix(in srgb, var(--pink) 28%, transparent);
  text-align: right;
}

.comment-bubble span {
  display: block;
  margin-bottom: 0.375rem;
  font-size: clamp(0.55rem, 0.7vw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.1em;
}

.comment-bubble p {
  margin: 0;
  color: #fff;
  font-family: "Bricolage Grotesque", sans-serif;
  overflow: hidden;
  display: -webkit-box;
  font-size: clamp(0.85rem, 1vw, 1.25rem);
  line-height: 1.15;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.right-console {
  position: absolute;
  z-index: 45;
  right: 3rem;
  top: 8.5rem;
  width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  pointer-events: auto;
}

.console-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.console-section .section-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.25rem;
}

.countdown-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 2.5vw, 3rem);
  font-weight: 800;
  color: var(--pink);
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 171, 243, 0.4), 2px 2px 2px rgba(0, 0, 0, 0.9);
}

.next-players-list,
.recent-rolls-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.next-player-item,
.recent-roll-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.9rem, 1vw, 1.15rem);
  line-height: 1.3;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.next-player-item .bullet {
  font-weight: 700;
}

.next-player-item .name {
  font-weight: 700;
}

.next-player-item .next-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--pink);
  letter-spacing: 0.05em;
  margin-left: auto;
  text-shadow: 0 0 6px rgba(255, 171, 243, 0.3);
}

.next-player-item.active {
  animation: pulseActivePlayer 1.5s infinite ease-in-out;
}

.recent-roll-item .name {
  font-weight: 700;
}

.recent-roll-item .roll-value {
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.recent-roll-item .emotion {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.game-grid-conquest .recent-roll-item.critical-hit .roll-value {
  color: #0b0505;
  background: #ff4040;
  box-shadow: 0 0 14px rgba(255, 64, 64, 0.7);
  animation: gridDramaPulse 0.9s infinite alternate;
}

.game-grid-conquest .recent-roll-item.perfect-parry .roll-value {
  color: #070707;
  background: var(--yellow);
  box-shadow: 0 0 14px rgba(228, 238, 68, 0.78);
}

.game-grid-conquest .recent-roll-item.chaos-event .roll-value {
  color: #070707;
  background: var(--pink);
  box-shadow: 0 0 18px rgba(255, 171, 243, 0.82), 0 0 28px rgba(255, 0, 255, 0.35);
  animation: gridChaosFlicker 0.7s steps(2, end) infinite;
}

@keyframes gridDramaPulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.08); filter: brightness(1.25); }
}

@keyframes gridChaosFlicker {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.55); }
}

@keyframes pulseActivePlayer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.game-feed {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  z-index: 45;
  right: 3rem;
  bottom: 5.5rem;
  width: 22rem;
  height: 25rem;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
}

#tacticalLog,
#gameScoreboard {
  display: none !important;
}

.chat-header {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.25rem;
  flex-shrink: 0;
}

#gameFeedItems {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#gameFeedItems::-webkit-scrollbar {
  width: 6px;
}

#gameFeedItems::-webkit-scrollbar-track {
  background: transparent;
}

#gameFeedItems::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.chat-line {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.85rem, 0.95vw, 1.1rem);
  line-height: 1.4;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
  word-break: break-word;
  animation: fadeInChat 0.3s ease-out forwards;
}

.chat-line .chat-author {
  font-weight: 700;
  text-transform: none;
}

.chat-line .chat-text {
  font-weight: 400;
  color: #e5e2e1;
}

.chat-line.trash-talk .chat-text.spicy {
  color: var(--pink);
  font-style: italic;
}

@keyframes fadeInChat {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-words > span {
  position: absolute;
  z-index: 15;
  left: 0;
  top: 0;
  width: min(190px, 13vw);
  min-height: 58px;
  padding: 9px 11px 10px;
  color: var(--pink);
  background: rgba(14,14,14,0.78);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: clamp(8px, 0.62vw, 11px);
  font-weight: 800;
  line-height: 1.16;
  box-shadow: inset 0 0 18px rgba(255,171,243,0.12), 0 0 22px rgba(0,0,0,0.42);
  pointer-events: none;
}

.floating-words > span::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
}

.fomo-kicker,
.fomo-copy,
.floating-words small {
  display: block;
}

.fomo-kicker {
  margin-bottom: 4px;
  color: currentColor;
  font-size: 7px;
  letter-spacing: 0.16em;
}

.fomo-user {
  display: block;
  color: var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(13px, 0.92vw, 17px);
  line-height: 1;
}

.fomo-copy {
  margin-top: 4px;
  color: var(--ink);
}

.floating-words small {
  margin-top: 5px;
  color: rgba(229,226,225,0.58);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.now-playing {
  display: none;
}

.ticker {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  height: 40px;
  align-items: center;
  overflow: hidden;
  background: rgba(14,14,14,0.96);
  border-top: 1px solid rgba(86,64,82,0.82);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-status {
  flex: 0 0 auto;
  padding: 0 20px;
  color: rgba(220,190,212,0.55);
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 32px;
  color: var(--lime);
  animation: ticker 30s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
}

.burst {
  position: absolute;
  z-index: 60;
  left: 50%;
  top: 50%;
  padding: 20px 36px;
  color: var(--black);
  background: var(--pink);
  border: 3px solid #fff;
  font-size: clamp(34px, 5vw, 80px);
  font-weight: 800;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  box-shadow: 0 0 80px rgba(255,0,255,0.75);
  pointer-events: none;
}

.burst.show {
  animation: burst 1.2s ease-out forwards;
}

.debug-panel {
  position: absolute;
  z-index: 90;
  right: 18px;
  bottom: 58px;
  width: min(560px, 42vw);
  max-height: 42vh;
  overflow: auto;
  margin: 0;
  padding: 14px;
  color: #afffe1;
  background: rgba(0,0,0,0.82);
  border: 1px solid rgba(171,214,0,0.55);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes event-line {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

@keyframes burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-5deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.04) rotate(1deg); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-1deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18) rotate(2deg); }
}

@keyframes dice-roll {
  0% { transform: rotate(0deg) scale(0.92); }
  35% { transform: rotate(18deg) scale(1.1); }
  70% { transform: rotate(-12deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes token-pop {
  50% { filter: brightness(1.4); }
}

@media (max-width: 80rem), (max-height: 51.25rem) {
  .arena-topbar {
    height: 4.75rem;
    grid-template-columns: auto auto 1fr auto auto;
    padding: 0.875rem 1.5rem 0.5rem;
  }
  .telemetry-block strong { font-size: clamp(1.1rem, 1.6vw, 1.5rem); }
  .arena-topbar h1 { font-size: clamp(1.5rem, 4.2vw, 2.75rem); }
  .event-banner {
    top: 5.5rem;
    width: min(48.75rem, 58vw);
    min-height: 9.125rem;
    padding: 1.5rem 2.125rem 1.25rem;
    border-radius: 2.25rem;
  }
  .event-banner h2 { font-size: clamp(1.2rem, 3vw, 2.25rem); }
  .event-banner p { font-size: clamp(0.75rem, 1vw, 1rem); margin: 0.75rem auto 0.875rem; }
  .arena-layout {
    inset: 15.625rem 2rem 3.875rem;
    grid-template-columns: 24rem 1fr;
    grid-template-rows: minmax(0, 1fr) 5.625rem;
  }
  .ludo-board {
    min-width: 23.75rem;
    min-height: 23.75rem;
  }
  .agent-mini { padding: 0.5rem 0.875rem; }
  .comment-bubble.primary { bottom: 11rem; }
  .comment-bubble.secondary { bottom: 17.5rem; }
  .comment-bubble.trash-talk { bottom: 11rem; }
  .game-feed {
    right: 1.5rem;
    bottom: 4.5rem;
    width: 15rem;
    height: 18rem;
  }
  .right-console {
    right: 1.5rem;
    top: 5rem;
    width: 15rem;
    gap: 0.85rem;
  }
}

@media (max-width: 81.25rem) and (max-height: 43.75rem) {
  .arena-topbar {
    height: 4.125rem;
    grid-template-columns: auto auto 1fr auto auto;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem 0.375rem;
  }
  .telemetry-block { padding: 0.5rem 0.75rem; }
  .telemetry-block span,
  .chaos-pill span { font-size: clamp(0.45rem, 0.6vw, 0.55rem); }
  .telemetry-block strong { font-size: clamp(1rem, 1.5vw, 1.375rem); }
  .telemetry-block.wide strong { font-size: clamp(0.95rem, 1.4vw, 1.25rem); }
  .arena-topbar h1 { font-size: clamp(1.4rem, 4.8vw, 2.5rem); }
  .chaos-pill {
    gap: 0.625rem;
    padding: 0.5625rem 0.75rem;
  }
  .chaos-pill i {
    width: 3.375rem;
    height: 0.9375rem;
  }
  .chaos-pill strong { font-size: clamp(0.8rem, 1.1vw, 1.05rem); }
  .header-buy {
    padding: 0.625rem 0.75rem;
    font-size: clamp(0.55rem, 0.75vw, 0.65rem);
  }

  .event-banner {
    position: fixed;
    top: 4.75rem;
    left: 0;
    right: 0;
    z-index: 42;
    width: 100vw;
    min-height: 1.875rem;
    height: 1.875rem;
    padding: 0;
    overflow: hidden;
    color: var(--cyan);
    background: rgba(14,14,14,0.84);
    border: 0;
    border-top: 0.0625rem solid rgba(0,251,251,0.7);
    border-bottom: 0.0625rem solid rgba(255,171,243,0.45);
    border-radius: 0;
    box-shadow: 0 0 1.375rem rgba(0,251,251,0.22);
    transform: none;
    text-align: left;
  }
  .event-code,
  .event-banner p,
  .best-moves { display: none; }
  .event-banner h2 {
    display: inline-block;
    margin: 0;
    padding: 0.4375rem 0;
    color: var(--cyan);
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    line-height: 1;
    letter-spacing: 0.12em;
    text-shadow: 0 0 0.75rem rgba(0,251,251,0.75);
    white-space: nowrap;
    animation: event-line 16s linear infinite;
  }
  .event-banner h2::before {
    content: "LIVE COUNCIL / ";
    color: var(--pink);
  }

  .arena-layout {
    inset: 8.875rem 1.5rem 2.625rem;
    grid-template-columns: 17rem 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }
  .ludo-board {
    width: min(27rem, 42vw, calc(100vh - 12rem));
    height: min(27rem, 42vw, calc(100vh - 12rem));
    min-width: 23rem;
    min-height: 23rem;
  }
  .center-hub {
    padding: 0.5rem;
    border-width: 0.0625rem;
  }
  .center-hub span,
  .center-hub small { font-size: clamp(0.4rem, 5cqw, 0.65rem); }
  .center-hub strong { font-size: clamp(0.5rem, 9cqw, 0.95rem); }

  .dice-console {
    left: calc(50% + min(13.5rem, 21vw, 50vh - 6rem) + 1.5rem);
    right: auto;
    width: 5.75rem;
    padding: 0.625rem 0.5rem;
  }
  .dice-console span { font-size: clamp(0.4rem, 5cqw, 0.65rem); }
  .dice-wrapper {
    width: 3rem;
    height: 3rem;
    margin: 0.5rem auto;
  }
  .dice-face {
    font-size: 1.35rem;
    border-width: 0.125rem;
    border-radius: 0.625rem;
    box-shadow: inset 0 0 0.8rem rgba(255, 171, 243, 0.25), 0 0 1rem rgba(255, 0, 255, 0.3);
  }
  .face-front  { transform: rotateY(0deg) translateZ(1.5rem); }
  .face-back   { transform: rotateY(180deg) translateZ(1.5rem); }
  .face-right  { transform: rotateY(90deg) translateZ(1.5rem); }
  .face-left   { transform: rotateY(-90deg) translateZ(1.5rem); }
  .face-top    { transform: rotateX(90deg) translateZ(1.5rem); }
  .face-bottom { transform: rotateX(-90deg) translateZ(1.5rem); }
  .dice-console p {
    font-size: clamp(0.45rem, 5cqw, 0.65rem);
    -webkit-line-clamp: 2;
  }

  .agent-dock {
    left: 1rem;
    top: 6rem;
    width: 15rem;
    gap: 1rem;
  }

  .game-pawn-to-queen .agent-dock {
    position: fixed;
    z-index: 46;
    left: var(--agent-dock-left, 1rem);
    top: var(--agent-dock-top, 6rem);
    width: var(--agent-card-width, 15rem);
    gap: var(--agent-dock-gap, 1rem);
  }

  .agent-mini {
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-width: 2px;
    transform: skewX(-10deg);
  }

  .game-pawn-to-queen .agent-mini {
    width: var(--agent-card-width, 15rem);
    height: var(--agent-card-height, auto);
    padding: var(--agent-card-pad-y, 0.5rem) var(--agent-card-pad-x, 0.75rem);
    gap: clamp(0.35rem, calc(var(--agent-card-height, 130px) * 0.055), 0.5rem);
  }

  .agent-mini.active {
    transform: scale(1.03) skewX(-10deg);
  }

  .game-pawn-to-queen .agent-mini.active {
    transform: scale(1.015) skewX(-10deg);
  }

  .persona-avatar-wrap {
    width: 3.5rem;
    height: 3.5rem;
  }

  .game-pawn-to-queen .persona-avatar-wrap {
    width: var(--agent-avatar-size, 3.5rem);
    height: var(--agent-avatar-size, 3.5rem);
  }

  .persona-avatar {
    border-width: 2px;
  }

  .persona-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.35rem;
    bottom: -0.3rem;
  }

  .persona-info {
    gap: 0.25rem;
  }

  .game-pawn-to-queen .persona-info {
    gap: clamp(0.16rem, calc(var(--agent-card-height, 130px) * 0.024), 0.25rem);
  }

  .persona-name {
    font-size: 0.85rem;
  }

  .game-pawn-to-queen .persona-name {
    font-size: var(--agent-name-size, 0.85rem);
  }

  .persona-mood {
    font-size: 0.5rem;
    padding: 0.1rem 0.3rem;
  }

  .game-pawn-to-queen .persona-mood {
    font-size: var(--agent-meta-size, 0.5rem);
  }

  .persona-score-row .stat-label {
    font-size: 0.5rem;
  }

  .game-pawn-to-queen .persona-score-row .stat-label {
    font-size: var(--agent-meta-size, 0.5rem);
  }

  .persona-score-row .stat-value {
    font-size: 1rem;
  }

  .game-pawn-to-queen .persona-score-row .stat-value {
    font-size: var(--agent-score-size, 1rem);
  }

  .persona-bar-item {
    height: 0.65rem;
  }

  .game-pawn-to-queen .persona-bar-item {
    height: var(--agent-bar-height, 0.65rem);
  }

  .persona-bar-item .bar-text {
    font-size: 0.45rem;
  }

  .game-pawn-to-queen .persona-bar-item .bar-text {
    font-size: var(--agent-meta-size, 0.45rem);
  }

  .agent-bubble-anchor {
    width: 12rem;
    padding-left: 0.75rem;
    gap: 0.5rem;
  }

  .agent-bubble-anchor .comment-bubble {
    border-width: 2px;
  }

  .agent-bubble-anchor .comment-bubble::before {
    left: -10px;
    top: 1.5rem;
    border-width: 6px 10px 6px 0;
  }

  .agent-bubble-anchor .comment-bubble::after {
    left: -7px;
    top: 1.5rem;
    border-width: 6px 10px 6px 0;
  }

  .comment-bubble.secondary {
    position: fixed;
    right: 1.5rem;
    bottom: 3.5rem;
    top: auto;
    left: auto;
    width: 18rem;
  }

  .comment-bubble span {
    margin-bottom: 0.25rem;
    font-size: clamp(0.45rem, 0.6vw, 0.65rem);
  }

  .comment-bubble p {
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    -webkit-line-clamp: 2;
  }

  .floating-words > span {
    width: 10rem;
    min-height: 3.25rem;
    font-size: clamp(0.45rem, 0.6vw, 0.55rem);
  }
  .fomo-user { font-size: clamp(0.7rem, 0.85vw, 0.875rem); }
  .footer-status { display: none; }
  .ticker {
    height: 2rem;
    font-size: clamp(0.5rem, 0.6vw, 0.6rem);
  }
}

.floating-words {
  display: none !important;
}

.comment-bubble.secondary {
  display: none !important;
}

.event-banner {
  display: none !important;
}

.ad-slot-box {
  position: absolute;
  z-index: 46;
  left: 2rem;
  top: 0.5rem;
  grid-column: 1;
  width: 22rem;
  height: 7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--pink);
  background: rgba(14, 14, 14, 0.82);
  border: 3px double currentColor;
  box-shadow: 0 0 15px color-mix(in srgb, var(--pink) 30%, transparent);
  border-radius: 4px;
  transform: skewX(-10deg);
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.3s ease;
  overflow: hidden;
}

.ad-slot-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 171, 243, 0.05),
    rgba(255, 171, 243, 0.05) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

.ad-slot-box:hover {
  transform: scale(1.03) skewX(-10deg);
  box-shadow: 0 0 25px var(--pink), inset 0 0 15px rgba(255, 171, 243, 0.2);
}

.ad-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s ease;
}

.ad-slide.active {
  opacity: 1;
  visibility: visible;
}

.ad-slot-box .ad-kicker {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
  opacity: 0.85;
  transform: skewX(10deg);
  margin-bottom: 0.25rem;
}

.ad-slot-box .ad-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 2px 0 var(--black);
  letter-spacing: 0.04em;
  transform: skewX(10deg);
}

@media (max-width: 81.25rem) and (max-height: 43.75rem) {
  .ad-slot-box {
    position: fixed;
    top: 0.5rem;
    left: 1rem;
    width: 15rem;
    height: 4.8rem;
  }
  .ad-slot-box .ad-kicker {
    font-size: 0.5rem;
    margin-bottom: 0.15rem;
  }
  .ad-slot-box .ad-title {
    font-size: 0.95rem;
  }
}

/* ==========================================
   TEXAS HOLD'EM POKER TABLE STYLING
   ========================================== */
.hex-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.game-arena.hex-stage {
  position: fixed;
  left: var(--board-safe-left);
  top: var(--board-safe-top);
  width: var(--board-safe-width);
  height: var(--board-safe-height);
}

.hex-board {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  background: rgba(10, 15, 12, 0.72);
  border: 3px solid #00ffaa;
  box-shadow: 0 0 40px rgba(0, 255, 170, 0.25), inset 0 0 60px rgba(0, 255, 170, 0.18);
  border-radius: 40px; /* Rounded card-style hex board */
  backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 2.4vw, 2rem);
  margin-top: 0;
}

.game-council-arena .hex-board {
  grid-template-columns: minmax(0, 24%) minmax(0, 1fr) minmax(0, 24%);
  grid-template-rows: minmax(7.5rem, max-content) minmax(0, 1fr) minmax(7.5rem, max-content);
  grid-template-areas:
    "seat-nn marker-top seat-mv"
    "marker-left map marker-right"
    "marker-bottom seat-lp marker-bottom-right";
  gap: clamp(0.75rem, 1.4vw, 1.5rem);
  align-items: stretch;
  justify-items: stretch;
}

.game-grid-conquest .hex-board {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "map";
}

.game-grid-conquest .hex-board .agent-seat {
  display: none;
}

.hex-svg-container {
  grid-area: map;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  place-self: stretch;
}

.pixi-board {
  grid-area: map;
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: none;
  pointer-events: none;
}

.game-grid-conquest .pixi-board {
  display: block;
}

.game-grid-conquest .hex-svg-container {
  display: none;
}

.game-council-arena .pixi-board,
.game-pawn-to-queen .pixi-board {
  display: none;
}

.game-council-arena .hex-board.council-mode .hex-svg-container {
  grid-area: 1 / 1 / -1 / -1;
  display: flex;
  position: relative;
  z-index: 2;
  padding: clamp(0.75rem, 1.1vw, 1.25rem);
  pointer-events: none;
}

.game-council-arena .council-arena-board {
  transform-box: fill-box;
  transform-origin: center;
}

.game-council-arena .hex-board.council-mode .agent-seat {
  z-index: 15;
}

#hexGridSvg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.agent-seat {
  position: relative;
  width: min(100%, 25rem);
  max-width: 25rem;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  background: rgba(18, 18, 18, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 8px 25px rgba(0,0,0,0.65);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 15;
  align-self: stretch;
  justify-self: stretch;
  overflow: hidden;
}

#seat-NN {
  grid-area: seat-nn;
  justify-self: start;
  align-self: start;
  color: #e4ee44;
  border-color: rgba(228, 238, 68, 0.3);
}
#seat-NN.active {
  border-color: #e4ee44;
  box-shadow: 0 0 25px rgba(228, 238, 68, 0.6), inset 0 0 10px rgba(228, 238, 68, 0.2);
}

#seat-MV {
  grid-area: seat-mv;
  justify-self: end;
  align-self: start;
  color: #00f5ff;
  border-color: rgba(0, 245, 255, 0.3);
}
#seat-MV.active {
  border-color: #00f5ff;
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.6), inset 0 0 10px rgba(0, 245, 255, 0.2);
}

#seat-LP {
  grid-area: seat-lp;
  justify-self: center;
  align-self: end;
  color: #ffabf3;
  border-color: rgba(255, 171, 243, 0.3);
}
#seat-LP.active {
  border-color: #ffabf3;
  box-shadow: 0 0 25px rgba(255, 171, 243, 0.6), inset 0 0 10px rgba(255, 171, 243, 0.2);
}

.seat-badge-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.role-badge {
  background: currentColor;
  color: #000;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: "Space Grotesk", sans-serif;
  box-shadow: 0 0 5px currentColor;
}

.status-badge {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255,255,255,0.15);
  color: #888;
  padding: 1px 5px;
  border-radius: 3px;
}
.status-badge.active-status {
  background: #ff2a5f;
  color: #fff;
  border-color: #ff2a5f;
  box-shadow: 0 0 8px rgba(255,42,95,0.4);
}
.status-badge.eliminated-status {
  background: rgba(30, 10, 10, 0.8);
  color: #ff5555;
  border-color: #ff3333;
}

.seat-player-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.seat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px double currentColor;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.seat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.seat-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
}

.seat-stats {
  font-size: 0.72rem;
  color: #00ffaa;
  font-weight: 800;
  text-shadow: 0 0 4px rgba(0,255,170,0.3);
}

.thoughts-box {
  margin-top: 0.4rem;
  background: rgba(6, 6, 6, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-size: 0.65rem;
  height: 54px;
  overflow-y: auto;
  font-family: monospace;
  color: #88c0d0;
  line-height: 1.3;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
}
.thoughts-header {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #61afef;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 2px;
  text-transform: uppercase;
}

/* Hex cells styling */
.game-grid-conquest .hex-cell {
  fill: rgba(14, 18, 16, 0.85);
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 2.5;
  transition: all 0.35s ease;
  transform-origin: 0 0;
}

.game-grid-conquest .hex-cell:hover {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.45);
}

/* Owner-specific classes */
.game-grid-conquest .hex-cell.owner-NN {
  fill: rgba(228, 238, 68, 0.22);
  stroke: #e4ee44;
  filter: url(#glow-NN);
}
.game-grid-conquest .hex-cell.owner-MV {
  fill: rgba(0, 245, 255, 0.22);
  stroke: #00f5ff;
  filter: url(#glow-MV);
}
.game-grid-conquest .hex-cell.owner-LP {
  fill: rgba(255, 171, 243, 0.22);
  stroke: #ffabf3;
  filter: url(#glow-LP);
}

/* Special cell types */
.game-grid-conquest .hex-cell.type-nexus {
  stroke-width: 4;
  stroke: #ffffff;
  filter: url(#glow-nexus);
  fill: rgba(255, 255, 255, 0.18);
}
.game-grid-conquest .hex-cell.type-chaos {
  stroke-width: 3.5;
  stroke: var(--error);
  fill: rgba(255, 180, 171, 0.14);
}
.game-grid-conquest .hex-cell.type-capital {
  stroke-width: 4;
}

/* Hex cell labels & icons */
.game-grid-conquest .hex-label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 16px;
  fill: #ffffff;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.game-grid-conquest .hex-icon {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 9px;
  fill: rgba(255, 255, 255, 0.55);
  text-anchor: middle;
  pointer-events: none;
  text-transform: uppercase;
}

.game-council-arena .council-orbit {
  fill: rgba(0, 255, 179, 0.035);
  stroke: rgba(0, 255, 179, 0.38);
  stroke-width: 2;
  stroke-dasharray: 10 9;
}

.game-council-arena .council-orbit.inner {
  stroke: rgba(255, 171, 243, 0.42);
  stroke-dasharray: 5 8;
}

.game-council-arena .council-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.game-council-arena .council-title {
  fill: #ffffff;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  text-anchor: middle;
  letter-spacing: 0.06em;
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.75);
}

.game-council-arena .council-event {
  fill: var(--pink);
  font-size: 14px;
  font-weight: 900;
  text-anchor: middle;
  letter-spacing: 0.08em;
}

.game-council-arena .council-prompt {
  fill: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
}

.game-council-arena .council-meter text {
  fill: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.game-council-arena .council-meter-track {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.16);
}

.game-council-arena .council-meter-fill {
  opacity: 0.72;
}

.game-council-arena .council-agent-node circle {
  fill: rgba(8, 10, 12, 0.94);
  stroke-width: 3;
}

.game-council-arena .council-agent-node.active circle {
  animation: council-node-pulse 1.4s ease-in-out infinite;
}

.game-council-arena .council-agent-avatar,
.game-council-arena .council-agent-score {
  fill: #ffffff;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.game-council-arena .council-agent-avatar {
  font-size: 16px;
}

.game-council-arena .council-agent-score {
  font-size: 12px;
  fill: var(--mint);
}

.game-council-arena .council-action-core circle {
  fill: rgba(255, 171, 243, 0.12);
  stroke: var(--pink);
  stroke-width: 3;
  filter: url(#glow-nexus);
}

.game-council-arena .council-action-core text {
  fill: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  text-anchor: middle;
}

.game-council-arena .council-action-core text:first-of-type {
  fill: var(--pink);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.game-council-arena .council-action-core text:last-of-type {
  font-size: 13px;
}

@keyframes council-node-pulse {
  0%, 100% { opacity: 0.78; stroke-width: 3; }
  50% { opacity: 1; stroke-width: 6; }
}

/* Combat or expand actions trail path animation */
.combat-fx {
  pointer-events: none;
}

.combat-arrow {
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 8, 8;
  animation: march 1s linear infinite;
}

.combat-arrow.attacker-NN { stroke: #e4ee44; }
.combat-arrow.attacker-MV { stroke: #00f5ff; }
.combat-arrow.attacker-LP { stroke: #ffabf3; }

.combat-beam {
  stroke-width: 10;
  stroke-linecap: round;
  fill: none;
  opacity: 0;
  filter: drop-shadow(0 0 18px currentColor);
  animation: combatBeam 1.15s ease-out both;
}

.combat-beam.attacker-NN,
.combat-impact.attacker-NN { color: #e4ee44; stroke: #e4ee44; }
.combat-beam.attacker-MV,
.combat-impact.attacker-MV { color: #00f5ff; stroke: #00f5ff; }
.combat-beam.attacker-LP,
.combat-impact.attacker-LP { color: #ffabf3; stroke: #ffabf3; }

.combat-impact {
  fill: rgba(255, 255, 255, 0.1);
  stroke-width: 5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 18px currentColor);
  animation: combatImpact 1.25s ease-out both;
}

.combat-impact.critical {
  stroke: #ff4040;
  fill: rgba(255, 64, 64, 0.28);
  animation: combatCritical 1.25s ease-out both;
}

.combat-impact.parry {
  stroke: #ffffff;
  fill: rgba(228, 238, 68, 0.24);
}

.combat-shockwave {
  fill: none;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: combatShockwave 1.25s ease-out both;
}

.combat-flyout,
.combat-roll-label {
  fill: #fff;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.9);
  stroke-width: 5;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.combat-flyout {
  font-size: 28px;
  animation: combatFlyout 1.45s ease-out both;
}

.combat-flyout.critical {
  fill: #ff4040;
}

.combat-roll-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  fill: var(--mint);
  animation: combatRollFade 1.45s ease-out both;
}

.game-grid-conquest .hex-board:has(.combat-fx) {
  animation: boardCombatShake 0.55s ease-out;
}

@keyframes march {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes combatBeam {
  0% { opacity: 0; stroke-dasharray: 0 800; }
  20% { opacity: 1; }
  70% { opacity: 0.85; stroke-dasharray: 800 0; }
  100% { opacity: 0; stroke-dasharray: 800 0; }
}

@keyframes combatImpact {
  0% { opacity: 0; transform: scale(0.2); }
  22% { opacity: 1; transform: scale(1.45); }
  62% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(2.2); }
}

@keyframes combatCritical {
  0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  18% { opacity: 1; transform: scale(1.8) rotate(18deg); }
  42% { opacity: 1; transform: scale(1.05) rotate(-12deg); }
  100% { opacity: 0; transform: scale(2.8) rotate(28deg); }
}

@keyframes combatShockwave {
  0% { opacity: 0; transform: scale(0.2); }
  20% { opacity: 0.95; }
  100% { opacity: 0; transform: scale(2.4); }
}

@keyframes combatFlyout {
  0% { opacity: 0; transform: translateY(16px) scale(0.8); }
  20% { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-34px) scale(1); }
}

@keyframes combatRollFade {
  0%, 18% { opacity: 0; transform: translateY(-8px); }
  35% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(18px); }
}

@keyframes boardCombatShake {
  0%, 100% { transform: translate(0, 0); }
  18% { transform: translate(5px, -3px); }
  34% { transform: translate(-4px, 3px); }
  50% { transform: translate(3px, 2px); }
  68% { transform: translate(-2px, -2px); }
}

@media (max-width: 68rem) {
  .agent-bubble-anchor .comment-bubble {
    width: 14rem !important;
  }
}

/* ==========================================
   PAWN TO QUEEN CHESS STYLES
   ========================================== */

.game-pawn-to-queen .chess-board {
  position: absolute;
  inset: clamp(0.5rem, 1.2cqw, 1rem);
  display: grid;
  grid-template-columns: minmax(3.75rem, 7cqw) minmax(0, min(70cqw, 70cqh)) minmax(3.75rem, 7cqw);
  grid-template-rows: minmax(3.5rem, 7cqh) minmax(0, min(70cqw, 70cqh)) minmax(3.5rem, 7cqh);
  grid-template-areas:
    ". player-top ."
    "captures-left board captures-right"
    ". player-bottom .";
  gap: clamp(0.45rem, 0.8cqw, 0.8rem);
  align-items: center;
  justify-content: center;
  justify-items: stretch;
  container-type: size;
}

.game-pawn-to-queen .chess-grid {
  grid-area: board;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: min(70cqw, 70cqh);
  height: min(70cqw, 70cqh);
  aspect-ratio: 1 / 1;
  background: rgba(14, 14, 14, 0.8);
  border: 4px solid var(--pink);
  box-shadow: 0 0 20px rgba(255, 171, 243, 0.4);
}

.game-pawn-to-queen .chess-player-panel {
  min-width: 0;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.86);
  box-shadow: 0 0 18px color-mix(in srgb, currentColor 42%, transparent);
  color: var(--pink);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.45rem, 0.9cqw, 0.8rem);
  padding: clamp(0.45rem, 0.9cqh, 0.8rem) clamp(0.65rem, 1.2cqw, 1rem);
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
}

.game-pawn-to-queen .chess-player-top {
  grid-area: player-top;
}

.game-pawn-to-queen .chess-player-bottom {
  grid-area: player-bottom;
}

.game-pawn-to-queen .chess-player-panel.owner-NN,
.game-pawn-to-queen .chess-captured-piece.owner-NN {
  color: #f1c40f;
}

.game-pawn-to-queen .chess-player-panel.owner-MV,
.game-pawn-to-queen .chess-captured-piece.owner-MV {
  color: #00ffff;
}

.game-pawn-to-queen .chess-player-panel.owner-LP,
.game-pawn-to-queen .chess-captured-piece.owner-LP {
  color: #ff00ff;
}

.game-pawn-to-queen .chess-role,
.game-pawn-to-queen .chess-score {
  font-size: clamp(0.62rem, 0.85cqw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0.78;
}

.game-pawn-to-queen .chess-player-panel strong {
  min-width: 0;
  color: #fff;
  font-size: clamp(0.9rem, 1.25cqw, 1.25rem);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-pawn-to-queen .chess-captures {
  min-height: min(70cqw, 70cqh);
  border: 2px solid rgba(255, 171, 243, 0.36);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.44);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: clamp(0.55rem, 1cqw, 0.9rem) 0.35rem;
}

.game-pawn-to-queen .chess-captures-left {
  grid-area: captures-left;
}

.game-pawn-to-queen .chess-captures-right {
  grid-area: captures-right;
}

.game-pawn-to-queen .chess-captures span {
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(0.56rem, 0.75cqw, 0.68rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.game-pawn-to-queen .chess-captures div {
  display: grid;
  grid-template-columns: repeat(2, minmax(1.4rem, 1fr));
  gap: 0.3rem;
  width: 100%;
}

.game-pawn-to-queen .chess-captures em {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.65rem;
  font-style: normal;
  text-align: center;
  text-transform: uppercase;
}

.game-pawn-to-queen .chess-captured-piece {
  width: 100%;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 0 8px currentColor);
  opacity: 0.86;
}

.game-pawn-to-queen .chess-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-pawn-to-queen .chess-cell.light {
  background: rgba(40, 40, 40, 0.6);
}

.game-pawn-to-queen .chess-cell.dark {
  background: rgba(20, 20, 20, 0.8);
}

.game-pawn-to-queen .chess-piece {
  width: 70%;
  height: 70%;
  color: white; /* default */
  transition: transform 0.3s ease-out;
}

/* Agent specific glow/colors */
.game-pawn-to-queen .chess-piece.owner-NN {
  color: #f1c40f;
  filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.9));
}

.game-pawn-to-queen .chess-piece.owner-MV {
  color: #00ffff;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
}

.game-pawn-to-queen .chess-piece.owner-LP {
  color: #ff00ff;
  filter: drop-shadow(0 0 10px rgba(255, 0, 255, 0.9));
}

.game-pawn-to-queen .chess-piece.owner-white {
  color: #ffabf3; /* default white fallback */
  filter: drop-shadow(0 0 8px rgba(255, 171, 243, 0.8));
}

.game-pawn-to-queen .chess-piece.owner-black {
  color: #00f5ff; /* default black fallback */
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.8));
}

.game-pawn-to-queen .chess-cell.highlight {
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.6);
}
