/*
 * KOTT Compact Transparent Crest match HUD v4.
 * This file is the sole visual owner of the live/replay encounter marquee.
 */

.game-room-fullscreen .direct-match-hud {
  --match-ink: #060706;
  --match-panel: #0a0b0a;
  --match-panel-high: #191812;
  --match-green: #03160e;
  --match-green-high: #0b472c;
  --match-gold: #d4a63a;
  --match-gold-light: #f4d77e;
  --match-gold-deep: #765019;
  --match-text: #f4f0e8;
  --match-muted: #c7c0b4;
  --match-center-width: clamp(156px, 12.8vw, 190px);
  position: absolute;
  top: max(6px, env(safe-area-inset-top));
  left: 50%;
  z-index: 10;
  width: min(1340px, 90vw, calc(100% - 32px));
  height: 104px;
  color: var(--match-text);
  font-family: "KottCondensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  pointer-events: none;
  transform: translateX(-50%);
  -webkit-font-smoothing: antialiased;
}

.game-room-fullscreen .direct-match-hud *,
.game-room-fullscreen .direct-match-hud *::before,
.game-room-fullscreen .direct-match-hud *::after {
  box-sizing: border-box;
}

.game-room-fullscreen .direct-rule-declaration {
  position: absolute;
  z-index: 27;
  top: 108px;
  left: 50%;
  display: flex;
  gap: 10px;
  align-items: end;
  min-width: 330px;
  padding: 10px 13px;
  color: #f4f0e8;
  background: linear-gradient(180deg, rgba(27, 25, 18, 0.97), rgba(7, 10, 8, 0.97));
  border: 1px solid rgba(212, 166, 58, 0.76);
  border-radius: 7px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 231, 157, 0.11);
  transform: translateX(-50%);
  pointer-events: auto;
}

.game-room-fullscreen .direct-rule-declaration.has-pocket-call {
  width: min(620px, calc(100% - 32px));
}

.game-room-fullscreen canvas.is-called-pocket-hover {
  cursor: pointer !important;
}

.game-room-fullscreen .direct-rule-declaration[hidden] {
  display: none;
}

.game-room-fullscreen .direct-rule-declaration strong {
  align-self: center;
  color: #f0ca6b;
  font: 700 13px/1.1 "KottCondensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-rule-declaration label {
  display: grid;
  gap: 3px;
  min-width: 96px;
  color: #a99f88;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-rule-declaration select {
  height: 32px;
  padding: 0 28px 0 9px;
  color: #f7efd9;
  background: #10140f;
  border: 1px solid rgba(212, 166, 58, 0.55);
  border-radius: 4px;
}

.game-room-fullscreen .direct-pocket-prompt {
  display: grid;
  flex: 1 1 290px;
  gap: 3px;
  min-width: 250px;
  color: #f4f0e8;
  font: 600 12px/1.25 "KottCondensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.025em;
}

.game-room-fullscreen .direct-pocket-instruction.is-touch {
  display: none;
}

.game-room-fullscreen .direct-pocket-prompt small {
  color: #c7c0b4;
  font: 700 10px/1.2 "KottCondensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-pocket-prompt.is-selected small {
  color: #7de186;
}

.game-room-fullscreen .direct-rule-declaration.is-required {
  animation: kott-pocket-call-required 520ms ease-out;
}

.game-room-fullscreen .direct-rule-declaration.is-foul-choice {
  width: min(620px, calc(100% - 32px));
  align-items: center;
}

.game-room-fullscreen canvas.is-foul-penalty-selection {
  cursor: pointer !important;
}

.game-room-fullscreen .direct-foul-choice-note {
  flex: 1 1 auto;
  max-width: 260px;
  margin: 0;
  color: #d9d2c4;
  font: 600 12px/1.25 "KottCondensed", "Arial Narrow", sans-serif;
}

.game-room-fullscreen .direct-foul-choice-note.is-pointer {
  color: #f4f0e8;
}

.game-room-fullscreen .direct-foul-choice-note.is-selected {
  color: #7de186;
}

.game-room-fullscreen .direct-foul-choice-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.game-room-fullscreen .direct-foul-choice-actions button {
  min-height: 40px;
  padding: 0 13px;
  color: #f7efd9;
  font: 800 11px/1 "KottCondensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.035em;
  background: linear-gradient(180deg, rgba(58, 51, 31, 0.98), rgba(17, 20, 15, 0.98));
  border: 1px solid rgba(212, 166, 58, 0.62);
  border-radius: 5px;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-foul-choice-actions button:first-child {
  color: #171207;
  background: linear-gradient(180deg, #f1ce75, #b98525);
  border-color: #f4d77e;
}

.game-room-fullscreen .direct-foul-choice-actions button:disabled {
  opacity: 0.55;
}

@keyframes kott-pocket-call-required {
  0%, 100% {
    border-color: rgba(212, 166, 58, 0.76);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 231, 157, 0.11);
  }
  35% {
    border-color: #f2c766;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58), 0 0 22px rgba(242, 199, 102, 0.38);
  }
}

@media (pointer: coarse) {
  .game-room-fullscreen .direct-pocket-instruction.is-pointer {
    display: none;
  }

  .game-room-fullscreen .direct-pocket-instruction.is-touch {
    display: inline;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .game-room-fullscreen .direct-rule-declaration {
    top: 116px;
    max-width: calc(100% - 20px);
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 11px;
  }

  .game-room-fullscreen .direct-rule-declaration.has-pocket-call {
    width: min(600px, calc(100% - 20px));
  }

  .game-room-fullscreen .direct-pocket-prompt {
    flex-basis: 240px;
    min-width: 210px;
    font-size: 11px;
  }
}

.game-room-fullscreen .direct-match-hud-row {
  position: relative;
  display: grid;
  height: 104px;
  grid-template-columns: minmax(0, 1fr) var(--match-center-width) minmax(0, 1fr);
  align-items: start;
  filter: drop-shadow(0 15px 24px rgba(0, 0, 0, 0.58));
}

.game-room-fullscreen .direct-player-card {
  position: relative;
  display: grid;
  height: 84px;
  margin: 8px 0 0;
  grid-template-columns: 76px minmax(96px, 118px) minmax(214px, 1fr) 8px;
  grid-template-areas: "avatar identity objective chevron";
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  overflow: visible;
  color: var(--match-text);
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
  transition-property: filter, background-color, color;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.game-room-fullscreen .direct-player-card[data-side="right"] {
  grid-template-columns: 8px minmax(214px, 1fr) minmax(96px, 118px) 76px;
  grid-template-areas: "chevron objective identity avatar";
  text-align: right;
  background: transparent;
}

/* Keep the right wing as a strict named-area mirror of the left wing. */
.game-room-fullscreen .direct-player-card[data-side="right"] .direct-avatar-frame {
  grid-area: avatar;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-player-copy {
  grid-area: identity;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-profile-chevron {
  grid-area: chevron;
}

.game-room-fullscreen .direct-player-card::before,
.game-room-fullscreen .direct-player-card::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.game-room-fullscreen .direct-player-card::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(244, 215, 126, 0.1), transparent 26%),
    radial-gradient(ellipse at 46% -50%, rgba(244, 215, 126, 0.1), transparent 56%),
    linear-gradient(180deg, rgba(28, 27, 21, 0.82), rgba(6, 8, 7, 0.76));
  border-top: 1px solid rgba(244, 215, 126, 0.72);
  border-bottom: 2px solid rgba(118, 80, 25, 0.82);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.game-room-fullscreen .direct-player-card[data-side="right"]::before {
  background:
    linear-gradient(270deg, rgba(244, 215, 126, 0.1), transparent 26%),
    radial-gradient(ellipse at 54% -50%, rgba(244, 215, 126, 0.1), transparent 56%),
    linear-gradient(180deg, rgba(28, 27, 21, 0.82), rgba(6, 8, 7, 0.76));
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}

.game-room-fullscreen .direct-player-card::after {
  inset: 0;
  border-left: 1px solid rgba(212, 166, 58, 0.72);
}

.game-room-fullscreen .direct-player-card > * {
  position: relative;
  z-index: 2;
}

.game-room-fullscreen .direct-player-card[data-side="right"]::after {
  border-right: 1px solid rgba(212, 166, 58, 0.72);
  border-left: 0;
}

.game-room-fullscreen .direct-player-card:hover,
.game-room-fullscreen .direct-player-card:focus-visible,
.game-room-fullscreen .direct-player-card[aria-expanded="true"] {
  outline: none;
  filter: brightness(1.08);
}

.game-room-fullscreen .direct-player-card:focus-visible {
  box-shadow: inset 0 0 0 2px var(--match-gold-light);
}

.game-room-fullscreen .direct-player-card:active {
  filter: brightness(1.1);
  transform: scale(0.99);
}

.game-room-fullscreen .direct-player-card.is-turn {
  background: transparent;
}

.game-room-fullscreen .direct-player-card[data-side="right"].is-turn {
  background: transparent;
}

.game-room-fullscreen .direct-player-card.is-turn::before {
  background:
    linear-gradient(90deg, rgba(244, 204, 104, 0.2), transparent 38%),
    radial-gradient(ellipse at 46% -45%, rgba(255, 228, 151, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(43, 39, 26, 0.88), rgba(7, 9, 7, 0.84));
  border-bottom-color: var(--match-gold);
}

.game-room-fullscreen .direct-player-card[data-side="right"].is-turn::before {
  background:
    linear-gradient(270deg, rgba(244, 204, 104, 0.2), transparent 38%),
    radial-gradient(ellipse at 54% -45%, rgba(255, 228, 151, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(43, 39, 26, 0.88), rgba(7, 9, 7, 0.84));
}

.game-room-fullscreen .direct-wing-bevel {
  position: absolute;
  top: 10px;
  right: 2px;
  bottom: 10px;
  width: 16px;
  border-right: 2px solid var(--match-gold);
  transform: skewY(45deg);
  opacity: 0.78;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-wing-bevel {
  right: auto;
  left: 2px;
  border-right: 0;
  border-left: 2px solid var(--match-gold);
  transform: skewY(-45deg);
}

.game-room-fullscreen .direct-avatar-frame {
  position: relative;
  z-index: 6;
  display: grid;
  width: 76px;
  height: 76px;
  grid-area: avatar;
  place-items: center;
  overflow: visible;
  color: var(--match-gold-light);
  background: linear-gradient(145deg, #27362e, #060a08 70%);
  border: 2px solid var(--match-gold);
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 3px #080a08,
    inset 0 0 0 4px rgba(244, 215, 126, 0.36),
    inset 0 14px 24px rgba(244, 215, 126, 0.08),
    0 7px 16px rgba(0, 0, 0, 0.5);
}

.game-room-fullscreen .direct-avatar-frame::before,
.game-room-fullscreen .direct-avatar-frame::after {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 16px;
  content: "";
  pointer-events: none;
}

.game-room-fullscreen .direct-avatar-frame::before {
  top: 4px;
  left: 4px;
  border-top: 2px solid var(--match-gold-light);
  border-left: 2px solid var(--match-gold-light);
}

.game-room-fullscreen .direct-avatar-frame::after {
  right: 4px;
  bottom: 4px;
  border-right: 2px solid var(--match-gold-deep);
  border-bottom: 2px solid var(--match-gold-deep);
}

.game-room-fullscreen .direct-avatar-frame > img,
.game-room-fullscreen .direct-avatar-silhouette {
  position: absolute;
  inset: 5px;
  display: grid;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  place-items: center;
  overflow: hidden;
  object-fit: cover;
  object-position: 50% 50%;
  background:
    radial-gradient(circle at 50% 18%, rgba(244, 215, 126, 0.2), transparent 44%),
    linear-gradient(145deg, #26342d, #080d0a 72%);
  border-radius: 4px;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-avatar-frame > img,
.game-room-fullscreen .direct-player-card[data-side="right"] .direct-avatar-silhouette {
  object-position: 50% 50%;
  border-radius: 50%;
}

.game-room-fullscreen .direct-avatar-silhouette svg {
  width: 70%;
  fill: #050807;
  stroke: rgba(244, 215, 126, 0.3);
  stroke-width: 1;
}

.game-room-fullscreen .direct-rank-mark {
  position: absolute;
  right: -7px;
  bottom: -7px;
  z-index: 7;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--match-gold-light);
  background: linear-gradient(145deg, #19462f, #04120b 72%);
  border: 1px solid #e5b94f;
  border-radius: 5px;
  box-shadow: inset 0 1px rgba(255, 243, 191, 0.14), 0 6px 13px rgba(0, 0, 0, 0.52);
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-rank-mark {
  right: auto;
  left: -7px;
}

.game-room-fullscreen .direct-rank-mark svg,
.game-room-fullscreen .direct-player-popover > span svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-room-fullscreen .direct-player-copy {
  display: grid;
  min-width: 0;
  height: 58px;
  grid-area: identity;
  grid-template-rows: 22px 32px;
  gap: 4px;
  align-content: center;
}

.game-room-fullscreen .direct-player-subline {
  display: grid;
  min-width: 0;
  height: 32px;
  grid-template-rows: 10px 16px;
  gap: 4px;
  align-content: start;
}

.game-room-fullscreen .direct-player-heading,
.game-room-fullscreen .direct-player-heading strong {
  display: block;
  min-width: 0;
}

.game-room-fullscreen .direct-player-heading strong {
  overflow: hidden;
  color: #f7df9a;
  font-family: "KottDisplay", Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.36vw, 21px);
  font-weight: 760;
  letter-spacing: 0.015em;
  line-height: 1.04;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
  text-transform: uppercase;
  white-space: nowrap;
}

.game-room-fullscreen .direct-match-hud .direct-player-meta {
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px 6px;
  align-items: center;
  color: var(--match-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-player-meta {
  flex-direction: row-reverse;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-player-subline {
  justify-items: end;
}

.game-room-fullscreen .direct-match-hud .direct-player-meta i,
.game-room-fullscreen .direct-match-hud .direct-player-meta b,
.game-room-fullscreen .direct-match-hud .direct-player-meta u {
  overflow: hidden;
  font-style: normal;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-room-fullscreen .direct-match-hud .direct-player-meta i {
  flex: 0 1 auto;
  color: #e7d8b0;
  font-size: 10px;
}

.game-room-fullscreen .direct-match-hud .direct-player-meta b {
  color: #e8be59;
}

.game-room-fullscreen .direct-match-hud .direct-player-meta u {
  position: relative;
  padding-left: 13px;
  color: #ded8ca;
  text-transform: none;
}

.game-room-fullscreen .direct-player-meta u::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  content: "";
  background: currentColor;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px #11130f;
  transform: translateY(-50%);
  opacity: 0.9;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-player-meta u {
  padding-right: 13px;
  padding-left: 0;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-player-meta u::before {
  right: 0;
  left: auto;
}

.game-room-fullscreen .direct-ball-progress {
  display: grid;
  min-width: 0;
  height: 72px;
  grid-area: objective;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas: "medallion progress";
  gap: 7px;
  align-items: center;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-ball-progress {
  grid-template-columns: minmax(0, 1fr) 42px;
  grid-template-areas: "progress medallion";
}

.game-room-fullscreen .direct-group-emblem {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  grid-area: medallion;
  place-items: center;
  color: #f0d47d;
  background:
    radial-gradient(circle at 36% 27%, rgba(255, 255, 255, 0.48), transparent 18%),
    radial-gradient(circle, #252924 0 52%, #060806 72%);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(244, 215, 126, 0.5),
    inset -8px -9px 14px rgba(0, 0, 0, 0.52),
    0 7px 12px rgba(0, 0, 0, 0.4);
}

.game-room-fullscreen .direct-ball-progress[data-group="solids"] .direct-group-emblem {
  background:
    radial-gradient(circle at 36% 27%, rgba(255, 255, 255, 0.62), transparent 18%),
    radial-gradient(circle, #d5a72d 0 57%, #765413 82%);
}

.game-room-fullscreen .direct-ball-progress[data-group="stripes"] .direct-group-emblem {
  background:
    radial-gradient(circle at 36% 27%, rgba(255, 255, 255, 0.72), transparent 15%),
    linear-gradient(180deg, #eee7d6 0 25%, #9d3430 25% 75%, #eee7d6 75% 100%);
}

.game-room-fullscreen .direct-open-medallion {
  width: 24px;
  height: 24px;
  background: linear-gradient(90deg, #d5a72d 0 48%, #eee7d6 48% 62%, #9d3430 62% 100%);
  border: 2px solid #efe8d8;
  border-radius: 50%;
  box-shadow: inset -4px -5px 7px rgba(0, 0, 0, 0.34);
}

.game-room-fullscreen .direct-group-emblem > .direct-progress-ball {
  width: 42px;
  height: 42px;
}

.game-room-fullscreen .direct-group-emblem > .direct-progress-ball b {
  min-width: 20px;
  height: 20px;
  font-size: 10px;
}

.game-room-fullscreen .direct-progress-copy {
  display: grid;
  min-width: 0;
  grid-area: progress;
  grid-template-rows: 12px 22px;
  gap: 4px;
  align-content: center;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-progress-copy {
  justify-items: end;
}

.game-room-fullscreen .direct-progress-copy small {
  overflow: hidden;
  color: #ccb778;
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-room-fullscreen .direct-pyramid-progress {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "progress";
  gap: 0;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-pyramid-progress {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "progress";
}

.game-room-fullscreen .direct-pyramid-copy {
  width: 100%;
  grid-template-rows: 12px 26px;
  gap: 4px;
}

.game-room-fullscreen .direct-pyramid-copy small {
  display: flex;
  width: 213px;
  align-items: center;
  justify-content: space-between;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-pyramid-copy small {
  flex-direction: row-reverse;
}

.game-room-fullscreen .direct-pyramid-copy small b {
  color: #f4d77e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.game-room-fullscreen .direct-pyramid-rack {
  display: grid;
  width: 213px;
  height: 26px;
  grid-template-columns: repeat(8, 24px);
  gap: 3px;
  align-items: center;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-pyramid-rack {
  justify-content: end;
}

.game-room-fullscreen .direct-pyramid-slot {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 54%, rgba(4, 8, 6, 0.98) 0 52%, rgba(19, 26, 20, 0.94) 55% 66%, rgba(115, 78, 24, 0.72) 69% 73%, transparent 76%);
  border-radius: 50%;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.92),
    0 1px rgba(244, 215, 126, 0.15);
}

.game-room-fullscreen .direct-pyramid-slot.is-filled {
  background:
    radial-gradient(circle at 50% 54%, rgba(7, 13, 9, 0.94) 0 54%, rgba(123, 85, 27, 0.78) 65% 71%, transparent 75%);
}

.game-room-fullscreen .direct-pyramid-ball {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: hidden;
  color: #5f4430;
  font-style: normal;
  background:
    radial-gradient(circle at 34% 27%, rgba(255, 255, 255, 0.98) 0 10%, rgba(255, 250, 228, 0.72) 11% 21%, transparent 22%),
    radial-gradient(circle at 42% 36%, #fff9df 0 36%, #e8d9b7 67%, #9c835c 100%);
  border: 1px solid rgba(255, 247, 218, 0.7);
  border-radius: 50%;
  box-shadow:
    inset -4px -5px 7px rgba(70, 48, 25, 0.36),
    0 3px 7px rgba(0, 0, 0, 0.5);
  scale: 1;
  transition: opacity 180ms ease-out, scale 180ms ease-out;
}

.game-room-fullscreen .direct-pyramid-ball.is-cue {
  color: #f8ead2;
  background:
    radial-gradient(circle at 34% 27%, rgba(255, 244, 229, 0.88) 0 10%, transparent 22%),
    radial-gradient(circle at 42% 36%, #a34632 0 36%, #6e201c 68%, #2a0a08 100%);
  border-color: rgba(244, 215, 126, 0.58);
}

.game-room-fullscreen .direct-pyramid-ball.is-fallback {
  color: rgba(95, 68, 48, 0.72);
}

.game-room-fullscreen .direct-pyramid-ball b {
  display: grid;
  min-width: 11px;
  height: 11px;
  padding: 0 1px;
  place-items: center;
  font-family: "KottCondensed", "Arial Narrow", sans-serif;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

.game-room-fullscreen .direct-pyramid-progress.is-complete .direct-pyramid-rack {
  filter: drop-shadow(0 0 5px rgba(244, 215, 126, 0.28));
}

.game-room-fullscreen .direct-ball-row {
  display: grid;
  width: 172px;
  grid-template-columns: repeat(7, 22px);
  gap: 3px;
  align-items: center;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-ball-row {
  justify-content: end;
}

.game-room-fullscreen .direct-ball-slot {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: visible;
  transition-property: opacity, scale;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.game-room-fullscreen .direct-ball-slot.is-empty {
  visibility: hidden;
}

.game-room-fullscreen .direct-progress-ball {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: hidden;
  color: #111;
  font-style: normal;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.68), transparent 24%),
    var(--direct-ball-color);
  border: 1px solid rgba(255, 247, 218, 0.55);
  border-radius: 50%;
  box-shadow: inset -4px -5px 8px rgba(0, 0, 0, 0.34), 0 3px 7px rgba(0, 0, 0, 0.48);
}

.game-room-fullscreen .direct-progress-ball.is-striped {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72), transparent 19%),
    linear-gradient(180deg, #eee8d9 0 25%, var(--direct-ball-color) 25% 75%, #eee8d9 75% 100%);
}

.game-room-fullscreen .direct-progress-ball b {
  display: grid;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  place-items: center;
  color: #111;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  background: #f4f0e8;
  border-radius: 50%;
}

.game-room-fullscreen .direct-match-hud .direct-profile-chevron {
  display: grid;
  grid-area: chevron;
  place-items: center;
  color: rgba(241, 202, 102, 0.78);
  font-size: 20px;
  line-height: 1;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-profile-chevron {
  transform: rotate(180deg);
}

.game-room-fullscreen .direct-match-hud .direct-turn-flag {
  width: max-content;
  min-width: 0;
  max-width: 100%;
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: #f4d77e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: none;
  border: 0;
  clip-path: none;
  box-shadow: none;
  overflow: hidden;
  white-space: nowrap;
}

.game-room-fullscreen .direct-player-card[data-side="right"] .direct-turn-flag {
  justify-self: end;
}

.game-room-fullscreen .direct-match-hud .direct-turn-flag i {
  width: 6px;
  height: 6px;
  background: #f4d77e;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(244, 215, 126, 0.7);
}

.game-room-fullscreen .direct-player-card.is-turn .direct-avatar-frame {
  box-shadow:
    inset 0 0 0 3px #080a08,
    inset 0 0 0 4px rgba(244, 215, 126, 0.42),
    0 0 20px rgba(242, 199, 102, 0.3),
    0 7px 16px rgba(0, 0, 0, 0.5);
}

.game-room-fullscreen .direct-rules-card {
  position: relative;
  z-index: 9;
  display: grid;
  width: var(--match-center-width);
  height: 94px;
  margin-top: 2px;
  margin-left: 0;
  grid-template-rows: 24px 39px 17px;
  align-items: center;
  justify-items: center;
  padding: 10px 14px 4px;
  overflow: visible;
  color: var(--match-text);
  text-align: center;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 13px 18px rgba(0, 0, 0, 0.52));
}

.game-room-fullscreen .direct-rules-card::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: linear-gradient(145deg, var(--match-gold-light), var(--match-gold) 28%, var(--match-gold-deep) 76%, #3a260c);
  clip-path: polygon(17% 0, 83% 0, 100% 20%, 93% 76%, 50% 100%, 7% 76%, 0 20%);
}

.game-room-fullscreen .direct-rules-card::after {
  position: absolute;
  inset: 3px;
  z-index: -1;
  content: "";
  background:
    radial-gradient(ellipse at 50% -12%, rgba(255, 225, 143, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(10, 59, 38, 0.92), rgba(5, 43, 26, 0.9) 52%, rgba(2, 18, 12, 0.92));
  clip-path: polygon(17% 0, 83% 0, 100% 20%, 93% 76%, 50% 100%, 7% 76%, 0 20%);
  box-shadow: inset 0 1px rgba(255, 241, 184, 0.18), inset 0 -18px 28px rgba(0, 0, 0, 0.32);
}

.game-room-fullscreen .direct-encounter-crown {
  position: absolute;
  top: -5px;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 40px;
  height: 22px;
  place-items: center;
  color: var(--match-gold-light);
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.55));
}

.game-room-fullscreen .direct-encounter-crown svg {
  width: 38px;
  fill: rgba(212, 166, 58, 0.12);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-room-fullscreen .direct-bank {
  display: flex;
  grid-row: 1;
  align-self: end;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 5px;
}

.game-room-fullscreen .direct-bank small {
  color: #d8c27f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-bank strong {
  color: #ffe59a;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.game-room-fullscreen .direct-bank strong i {
  margin-right: 4px;
  color: var(--match-gold);
  font-size: 9px;
}

.game-room-fullscreen .direct-match-score {
  display: grid;
  grid-row: 2;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #fff0bb;
  font-family: "KottDisplay", Georgia, serif;
  font-variant-numeric: tabular-nums;
}

.game-room-fullscreen .direct-match-score b {
  color: inherit;
  font-size: 34px;
  font-weight: 620;
  line-height: 1;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.58);
}

.game-room-fullscreen .direct-match-score i {
  padding: 0 7px;
  color: var(--match-gold);
  font-size: 17px;
  font-style: normal;
}

.game-room-fullscreen .direct-match-status {
  display: flex;
  grid-row: 3;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(116px, calc(100% - 20px));
  min-height: 17px;
  padding: 0 7px;
  background: linear-gradient(180deg, rgba(13, 43, 28, 0.98), rgba(2, 14, 9, 0.98));
  border-top: 1px solid rgba(244, 215, 126, 0.68);
  border-bottom: 1px solid rgba(118, 80, 25, 0.72);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.38);
}

.game-room-fullscreen .direct-match-status time,
.game-room-fullscreen .direct-match-status strong {
  color: #f2d98e;
  font-size: 9px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-match-status time.is-urgent {
  color: #ff8d70;
  text-shadow: 0 0 9px rgba(255, 89, 56, 0.72);
  animation: kott-turn-clock-urgent 0.8s ease-in-out infinite alternate;
}

@keyframes kott-turn-clock-urgent {
  from { opacity: 0.68; }
  to { opacity: 1; }
}

.game-room-fullscreen .direct-match-status strong {
  max-width: 96px;
  overflow: hidden;
  color: #f8edca;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-room-fullscreen .direct-match-notice {
  display: none;
}

.game-room-fullscreen .direct-discipline-label {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  display: block;
  width: max-content;
  max-width: 210px;
  padding: 3px 8px;
  color: #e9d490;
  font-size: 9px;
  font-weight: 700;
  background: rgba(3, 22, 14, 0.9);
  border: 1px solid rgba(212, 166, 58, 0.48);
  border-radius: 999px;
  transform: translateX(-50%);
}

.game-room-fullscreen .direct-discipline-label.is-tournament {
  display: grid;
  width: max-content;
  max-width: min(360px, 46vw);
  gap: 1px;
  padding: 4px 12px 5px;
  border-radius: 7px;
  text-align: center;
}

.game-room-fullscreen .direct-discipline-label.is-tournament small,
.game-room-fullscreen .direct-discipline-label.is-tournament b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-room-fullscreen .direct-discipline-label.is-tournament small {
  color: #a99b74;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-discipline-label.is-tournament b {
  color: #f0d78e;
  font-size: 9px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-rules-card.has-foul .direct-match-notice {
  position: absolute;
  top: calc(100% + 26px);
  left: 50%;
  display: block;
  width: max-content;
  max-width: 310px;
  padding: 6px 10px;
  color: #ffd7cd;
  font-size: 10px;
  background: rgba(41, 8, 5, 0.95);
  border: 1px solid rgba(201, 69, 54, 0.7);
  border-radius: 6px;
  transform: translateX(-50%);
}

.game-room-fullscreen .direct-group-choice {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 12;
  display: flex;
  gap: 6px;
  margin: 0;
  pointer-events: auto;
  transform: translateX(-50%);
}

.game-room-fullscreen .direct-group-choice button {
  min-height: 32px;
  padding: 0 12px;
  color: #111;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  background: linear-gradient(180deg, #f7d77f, #b88622);
  border: 1px solid #ffe59a;
  border-radius: 6px;
}

.game-room-fullscreen .direct-player-popover {
  position: absolute;
  top: 102px;
  z-index: 20;
  display: grid;
  width: 292px;
  gap: 8px;
  padding: 15px;
  color: var(--match-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(242, 199, 102, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(22, 24, 21, 0.99), rgba(5, 8, 6, 0.99));
  border: 1px solid rgba(229, 185, 79, 0.72);
  border-radius: 9px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.58);
  pointer-events: auto;
}

.game-room-fullscreen .direct-player-popover[data-side="left"] { left: 0; }
.game-room-fullscreen .direct-player-popover[data-side="right"] { right: 0; }

.game-room-fullscreen .direct-profile-close {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 32px;
  height: 32px;
  color: #d8caa8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.game-room-fullscreen .direct-player-popover > small {
  color: #a99f91;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-player-popover > strong {
  padding-right: 34px;
  color: #fff0bd;
  font-size: 19px;
}

.game-room-fullscreen .direct-player-popover > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #e2bb5b;
  font-size: 11px;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-player-popover dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 0;
}

.game-room-fullscreen .direct-player-popover dl div {
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
}

.game-room-fullscreen .direct-player-popover dt {
  color: #a39b8f;
  font-size: 9px;
  text-transform: uppercase;
}

.game-room-fullscreen .direct-player-popover dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--match-text);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Match messages live inside the encounter HUD. Store ownership determines
   the two equipped sets; this surface only sends them and never opens commerce. */
.game-room-fullscreen .direct-communication-trigger,
.game-room-fullscreen .direct-opponent-mute,
.game-room-fullscreen .direct-communication-panel,
.game-room-fullscreen .direct-communication-callout {
  pointer-events: auto;
}

.game-room-fullscreen .direct-communication-trigger,
.game-room-fullscreen .direct-opponent-mute {
  position: absolute;
  z-index: 16;
  display: inline-flex;
  min-width: 48px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: #ead28f;
  background: linear-gradient(180deg, rgba(25, 37, 29, 0.96), rgba(5, 14, 9, 0.98));
  border: 1px solid rgba(218, 177, 79, 0.54);
  border-radius: 4px;
  box-shadow: inset 0 1px rgba(255, 236, 171, 0.08), 0 8px 16px rgba(0, 0, 0, 0.42);
}

.game-room-fullscreen .direct-communication-trigger {
  top: 65px;
  left: clamp(148px, 13vw, 190px);
  width: 40px;
  min-width: 40px;
  min-height: 32px;
  padding: 0;
}

.game-room-fullscreen .direct-communication-trigger-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 17px;
  border: 1px solid currentColor;
}

.game-room-fullscreen .direct-communication-trigger-icon::after {
  position: absolute;
  right: 2px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  content: "";
  border-right: 1px solid currentColor;
  transform: skewY(-40deg);
}

.game-room-fullscreen .direct-communication-trigger-icon i,
.game-room-fullscreen .direct-communication-trigger-icon b {
  position: absolute;
  top: 7px;
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
}
.game-room-fullscreen .direct-communication-trigger-icon i { left: 5px; }
.game-room-fullscreen .direct-communication-trigger-icon b { right: 5px; }

.game-room-fullscreen .direct-opponent-mute {
  top: 67px;
  right: 12px;
  width: 48px;
  padding: 0;
}

.game-room-fullscreen .direct-opponent-mute > span {
  position: relative;
  width: 23px;
  height: 20px;
}
.game-room-fullscreen .direct-opponent-mute > span::before {
  position: absolute;
  top: 6px;
  left: 1px;
  width: 7px;
  height: 8px;
  content: "";
  border: 1px solid currentColor;
}
.game-room-fullscreen .direct-opponent-mute > span::after {
  position: absolute;
  top: 3px;
  left: 7px;
  width: 9px;
  height: 14px;
  content: "";
  border: 1px solid currentColor;
  border-left: 0;
  border-radius: 0 70% 70% 0;
}
.game-room-fullscreen .direct-opponent-mute > span i,
.game-room-fullscreen .direct-opponent-mute > span b {
  position: absolute;
  top: 2px;
  right: 1px;
  width: 1px;
  height: 17px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0;
}
.game-room-fullscreen .direct-opponent-mute > span b { transform: rotate(-45deg); }
.game-room-fullscreen .direct-opponent-mute.is-muted { color: #a99f8c; border-color: rgba(169, 159, 140, 0.42); }
.game-room-fullscreen .direct-opponent-mute.is-muted > span i,
.game-room-fullscreen .direct-opponent-mute.is-muted > span b { opacity: 1; }

.game-room-fullscreen .direct-communication-trigger:hover,
.game-room-fullscreen .direct-opponent-mute:hover,
.game-room-fullscreen .direct-communication-trigger:focus-visible,
.game-room-fullscreen .direct-opponent-mute:focus-visible {
  color: #f5dd98;
  border-color: #e2bb5b;
  outline: none;
  filter: brightness(1.08);
}

.game-room-fullscreen .direct-communication-panel {
  position: absolute;
  z-index: 24;
  top: 138px;
  left: 0;
  display: grid;
  width: min(430px, 44vw);
  max-height: min(430px, calc(100vh - 170px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: #eee6d5;
  background:
    linear-gradient(145deg, rgba(15, 47, 32, 0.98), rgba(3, 13, 8, 0.99) 67%),
    #07130d;
  border: 1px solid rgba(218, 177, 79, 0.58);
  border-radius: 5px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255, 235, 166, 0.08);
}

.game-room-fullscreen .direct-communication-panel > header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 13px;
  border-bottom: 1px solid rgba(218, 177, 79, 0.2);
}
.game-room-fullscreen .direct-communication-panel > header strong {
  color: #edcf79;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.game-room-fullscreen .direct-communication-panel > header button {
  width: 38px;
  height: 38px;
  color: #c7bdab;
  background: transparent;
  border: 0;
  font-size: 24px;
}

.game-room-fullscreen .direct-communication-panel > nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  background: rgba(0, 7, 4, 0.56);
  border-bottom: 1px solid rgba(218, 177, 79, 0.14);
}
.game-room-fullscreen .direct-communication-panel > nav button {
  min-height: 42px;
  padding: 0 9px;
  color: #a9a08e;
  background: transparent;
  border: 1px solid transparent;
  font: 800 10px/1 "KottCondensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.game-room-fullscreen .direct-communication-panel > nav button[aria-selected="true"] {
  color: #f3dda0;
  background: linear-gradient(180deg, rgba(44, 88, 63, 0.68), rgba(12, 38, 25, 0.84));
  border-color: rgba(218, 177, 79, 0.42);
  box-shadow: inset 0 -2px #d4a63a;
}

.game-room-fullscreen .direct-communication-items {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.game-room-fullscreen .direct-communication-item {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  color: #d8cfbd;
  text-align: left;
  background: rgba(2, 12, 7, 0.72);
  border: 1px solid rgba(212, 166, 58, 0.25);
  border-radius: 3px;
  font: 700 11px/1.18 "KottCondensed", "Arial Narrow", sans-serif;
}
.game-room-fullscreen .direct-communication-item:hover,
.game-room-fullscreen .direct-communication-item:focus-visible {
  color: #f5e7c6;
  background: rgba(22, 65, 44, 0.84);
  border-color: rgba(226, 187, 91, 0.62);
  outline: none;
}
.game-room-fullscreen .direct-communication-item:disabled { opacity: 0.56; }
.game-room-fullscreen .direct-message-line {
  position: relative;
  display: block;
  width: 27px;
  height: 20px;
  border: 1px solid #d2b15b;
}
.game-room-fullscreen .direct-message-line::after {
  position: absolute;
  right: 2px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  content: "";
  border-right: 1px solid #d2b15b;
  transform: skewY(-40deg);
}
.game-room-fullscreen .direct-message-line i,
.game-room-fullscreen .direct-message-line b {
  position: absolute;
  right: 5px;
  left: 5px;
  height: 1px;
  background: #d2b15b;
}
.game-room-fullscreen .direct-message-line i { top: 6px; }
.game-room-fullscreen .direct-message-line b { top: 11px; width: 11px; }

.game-room-fullscreen .direct-live-emoji {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  font: 28px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.46));
}

.game-room-fullscreen .direct-communication-status {
  min-height: 18px;
  margin: 0;
  padding: 0 10px 6px;
  color: #b8ab91;
  font-size: 9px;
}
.game-room-fullscreen .direct-communication-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px 10px;
  color: #aaa08d;
  text-align: center;
}

.game-room-fullscreen .direct-communication-callout {
  position: absolute;
  z-index: 18;
  top: 112px;
  display: flex;
  max-width: min(360px, 37vw);
  min-height: 42px;
  gap: 9px;
  align-items: center;
  padding: 9px 13px;
  color: #f0e5cf;
  background: linear-gradient(145deg, rgba(21, 59, 41, 0.98), rgba(5, 17, 11, 0.98));
  border: 1px solid rgba(218, 177, 79, 0.58);
  border-radius: 4px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.44);
  font: 750 13px/1.15 "KottCondensed", "Arial Narrow", sans-serif;
  animation: kott-signal-callout-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.game-room-fullscreen .direct-communication-callout[data-side="left"] { left: 0; }
.game-room-fullscreen .direct-communication-callout[data-side="right"] { right: 0; }
.game-room-fullscreen .direct-communication-callout.is-emote {
  top: 86px;
  min-width: 62px;
  min-height: 62px;
  gap: 0;
  padding: 0;
  color: #f4dfaa;
  background: transparent;
  border: 0;
  box-shadow: none;
  animation: kott-emoji-pop-out 520ms cubic-bezier(0.16, 0.9, 0.24, 1.2) both;
}
.game-room-fullscreen .direct-communication-callout.is-emote .direct-live-emoji {
  width: 58px;
  height: 58px;
  font-size: 52px;
  filter: drop-shadow(0 9px 9px rgba(0, 0, 0, 0.52));
  transform-origin: 50% 82%;
  animation: kott-emoji-alive 1.05s ease-in-out 520ms 2 both;
}
.game-room-fullscreen .direct-communication-callout[data-tone="royal"]:not(.is-emote) {
  background: linear-gradient(145deg, rgba(67, 50, 17, 0.98), rgba(14, 13, 7, 0.98));
  border-color: rgba(239, 206, 119, 0.78);
}

.game-room-fullscreen .direct-live-emoji[data-motion*="tilt"],
.game-room-fullscreen .direct-live-emoji[data-motion*="lean"],
.game-room-fullscreen .direct-live-emoji[data-motion*="sway"] {
  animation-name: kott-emoji-tilt !important;
}
.game-room-fullscreen .direct-live-emoji[data-motion*="pop"],
.game-room-fullscreen .direct-live-emoji[data-motion*="burst"],
.game-room-fullscreen .direct-live-emoji[data-motion*="pulse"] {
  animation-name: kott-emoji-pulse !important;
}

@keyframes kott-signal-callout-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes kott-emoji-pop-out {
  0% { opacity: 0; transform: translateY(38px) scale(0.18) rotate(-9deg); }
  58% { opacity: 1; transform: translateY(-12px) scale(1.16) rotate(4deg); }
  78% { transform: translateY(3px) scale(0.94) rotate(-2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes kott-emoji-alive {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  32% { transform: translateY(-8px) rotate(-6deg) scale(1.08); }
  62% { transform: translateY(1px) rotate(5deg) scale(0.98); }
}

@keyframes kott-emoji-tilt {
  0%, 100% { transform: rotate(0) scale(1); }
  32% { transform: rotate(-13deg) scale(1.06); }
  68% { transform: rotate(9deg) scale(1.02); }
}

@keyframes kott-emoji-pulse {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.16); }
  58% { transform: scale(0.94); }
  78% { transform: scale(1.08); }
}

@media (max-width: 1260px) and (min-height: 521px) {
  .game-room-fullscreen .direct-match-hud {
    --match-center-width: 156px;
    width: min(1100px, 90vw, calc(100% - 24px));
    height: 104px;
  }

  .game-room-fullscreen .direct-match-hud-row {
    height: 104px;
    grid-template-columns: minmax(0, 1fr) var(--match-center-width) minmax(0, 1fr);
  }

  .game-room-fullscreen .direct-player-card {
    height: 84px;
    margin-top: 8px;
    grid-template-columns: 76px minmax(118px, 1fr) 221px;
    grid-template-areas: "avatar identity objective";
    gap: 6px;
    padding: 4px 7px;
  }

  .game-room-fullscreen .direct-player-card[data-side="right"] {
    grid-template-columns: 221px minmax(118px, 1fr) 76px;
    grid-template-areas: "objective identity avatar";
  }

  .game-room-fullscreen .direct-avatar-frame {
    width: 76px;
    height: 76px;
  }

  .game-room-fullscreen .direct-player-heading strong { font-size: 18px; }
  .game-room-fullscreen .direct-player-meta i { display: none; }
  .game-room-fullscreen .direct-profile-chevron { display: none; }

  .game-room-fullscreen .direct-ball-progress {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 6px;
  }

  .game-room-fullscreen .direct-player-card[data-side="right"] .direct-ball-progress {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .game-room-fullscreen .direct-group-emblem,
  .game-room-fullscreen .direct-group-emblem > .direct-progress-ball {
    width: 40px;
    height: 40px;
  }

  .game-room-fullscreen .direct-pyramid-progress,
  .game-room-fullscreen .direct-player-card[data-side="right"] .direct-pyramid-progress {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-room-fullscreen .direct-player-popover { top: 100px; }
}

@media (max-width: 980px) and (orientation: landscape),
  (max-height: 520px) and (orientation: landscape) {
  .game-room-fullscreen .direct-match-hud {
    --match-center-width: 92px;
    top: max(2px, env(safe-area-inset-top));
    width: calc(100% - max(4px, env(safe-area-inset-left)) - max(4px, env(safe-area-inset-right)));
    height: 72px;
  }

  .game-room-fullscreen .direct-match-hud-row {
    height: 72px;
    grid-template-columns: minmax(0, 1fr) var(--match-center-width) minmax(0, 1fr);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
  }

  .game-room-fullscreen .direct-player-card {
    height: 56px;
    margin-top: 5px;
    grid-template-columns: 48px minmax(82px, 92px) minmax(126px, 1fr);
    grid-template-areas: "avatar identity objective";
    gap: 4px;
    padding: 3px;
  }

  .game-room-fullscreen .direct-player-card[data-side="right"] {
    grid-template-columns: minmax(126px, 1fr) minmax(82px, 92px) 48px;
    grid-template-areas: "objective identity avatar";
  }

  .game-room-fullscreen .direct-player-card::before {
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  }

  .game-room-fullscreen .direct-player-card[data-side="right"]::before {
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  }

  .game-room-fullscreen .direct-avatar-frame {
    width: 48px;
    height: 48px;
    border-width: 1px;
    border-radius: 5px;
    box-shadow: inset 0 0 0 2px #080a08, inset 0 0 0 3px rgba(244, 215, 126, 0.32), 0 5px 10px rgba(0, 0, 0, 0.5);
  }

  .game-room-fullscreen .direct-avatar-frame > img,
  .game-room-fullscreen .direct-avatar-silhouette {
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 2px;
  }

  .game-room-fullscreen .direct-avatar-frame::before,
  .game-room-fullscreen .direct-avatar-frame::after {
    width: 8px;
    height: 8px;
  }

  .game-room-fullscreen .direct-rank-mark {
    right: -4px;
    bottom: -4px;
    width: 20px;
    height: 20px;
    border-radius: 3px;
  }

  .game-room-fullscreen .direct-player-card[data-side="right"] .direct-rank-mark { left: -4px; }
  .game-room-fullscreen .direct-rank-mark svg { width: 13px; }

  .game-room-fullscreen .direct-player-copy {
    height: 42px;
    grid-template-rows: 14px 26px;
    gap: 2px;
  }

  .game-room-fullscreen .direct-player-subline {
    height: 26px;
    grid-template-rows: 8px 14px;
    gap: 2px;
  }
  .game-room-fullscreen .direct-player-heading strong { font-size: 12px; }

  .game-room-fullscreen .direct-player-meta {
    flex-wrap: nowrap;
    gap: 4px;
    font-size: 8px;
  }

  .game-room-fullscreen .direct-player-meta i { display: none; }
  .game-room-fullscreen .direct-player-meta b { font-size: 8px; }
  .game-room-fullscreen .direct-player-meta u { width: 8px; padding: 0; font-size: 0; }
  .game-room-fullscreen .direct-player-meta u::before { width: 8px; height: 8px; }

  .game-room-fullscreen .direct-ball-progress {
    height: 50px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 4px;
  }

  .game-room-fullscreen .direct-player-card[data-side="right"] .direct-ball-progress {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .game-room-fullscreen .direct-group-emblem,
  .game-room-fullscreen .direct-group-emblem > .direct-progress-ball {
    width: 28px;
    height: 28px;
  }

  .game-room-fullscreen .direct-open-medallion { width: 17px; height: 17px; border-width: 1px; }
  .game-room-fullscreen .direct-group-emblem > .direct-progress-ball b { min-width: 14px; height: 14px; font-size: 7px; }

  .game-room-fullscreen .direct-progress-copy {
    grid-template-rows: 9px 15px;
    gap: 2px;
  }
  .game-room-fullscreen .direct-progress-copy small { font-size: 8px; letter-spacing: 0.03em; }

  .game-room-fullscreen .direct-pyramid-progress,
  .game-room-fullscreen .direct-player-card[data-side="right"] .direct-pyramid-progress {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "progress";
    gap: 0;
  }

  .game-room-fullscreen .direct-pyramid-copy {
    grid-template-rows: 8px 15px;
    gap: 2px;
  }

  .game-room-fullscreen .direct-pyramid-copy small {
    width: 119px;
    font-size: 7px;
  }

  .game-room-fullscreen .direct-pyramid-copy small b { font-size: 8px; }

  .game-room-fullscreen .direct-pyramid-rack {
    width: 119px;
    height: 15px;
    grid-template-columns: repeat(8, 14px);
    gap: 1px;
  }

  .game-room-fullscreen .direct-pyramid-slot,
  .game-room-fullscreen .direct-pyramid-ball {
    width: 14px;
    height: 14px;
  }

  .game-room-fullscreen .direct-pyramid-ball b {
    min-width: 7px;
    height: 7px;
    font-size: 5px;
  }

  .game-room-fullscreen .direct-ball-row {
    width: 111px;
    grid-template-columns: repeat(7, 15px);
    gap: 1px;
  }

  .game-room-fullscreen .direct-ball-slot,
  .game-room-fullscreen .direct-progress-ball {
    width: 15px;
    height: 15px;
  }

  .game-room-fullscreen .direct-ball-slot.is-empty { width: 11px; height: 3px; }

  .game-room-fullscreen .direct-progress-ball b {
    min-width: 8px;
    height: 8px;
    padding: 0 1px;
    font-size: 6px;
  }

  .game-room-fullscreen .direct-profile-chevron,
  .game-room-fullscreen .direct-wing-bevel { display: none; }

  .game-room-fullscreen .direct-turn-flag {
    min-height: 9px;
    gap: 3px;
    font-size: 8px;
  }

  .game-room-fullscreen .direct-turn-flag i { width: 5px; height: 5px; }

  .game-room-fullscreen .direct-rules-card {
    width: var(--match-center-width);
    height: 66px;
    margin-top: 1px;
    margin-left: 0;
    grid-template-rows: 17px 27px 12px;
    padding: 7px 5px 3px;
  }

  .game-room-fullscreen .direct-encounter-crown { top: -2px; width: 28px; height: 16px; }
  .game-room-fullscreen .direct-encounter-crown svg { width: 27px; stroke-width: 2.4; }
  .game-room-fullscreen .direct-bank { gap: 2px; padding-top: 4px; }
  .game-room-fullscreen .direct-bank small { font-size: 8px; letter-spacing: 0.02em; }
  .game-room-fullscreen .direct-bank strong { font-size: 9px; }
  .game-room-fullscreen .direct-bank strong i { display: none; }
  .game-room-fullscreen .direct-match-score b { font-size: 25px; }
  .game-room-fullscreen .direct-match-score i { padding: 0 3px; font-size: 12px; }
  .game-room-fullscreen .direct-match-status { width: 68px; min-height: 12px; gap: 2px; padding: 0 4px; }
  .game-room-fullscreen .direct-match-status time,
  .game-room-fullscreen .direct-match-status strong { font-size: 8px; }
  .game-room-fullscreen .direct-match-status strong { display: none; }
  .game-room-fullscreen .direct-discipline-label { top: calc(100% + 1px); padding: 2px 6px; font-size: 7px; }
  .game-room-fullscreen .direct-discipline-label.is-tournament {
    display: flex;
    max-width: min(310px, 52vw);
    gap: 3px;
    align-items: center;
    padding: 2px 7px 3px;
  }
  .game-room-fullscreen .direct-discipline-label.is-tournament small {
    display: block;
    max-width: 220px;
    font-size: 6px;
  }
  .game-room-fullscreen .direct-discipline-label.is-tournament small::after { content: " ·"; }
  .game-room-fullscreen .direct-discipline-label.is-tournament b { font-size: 7px; }
  .game-room-fullscreen .direct-player-popover { top: 70px; width: min(280px, calc(100vw - 24px)); }
  .game-room-fullscreen .direct-group-choice { top: calc(100% + 2px); }

  .game-room-fullscreen .direct-rule-declaration {
    top: auto;
    bottom: calc(78px + env(safe-area-inset-bottom));
    display: grid;
    width: min(390px, calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right))));
    max-width: calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right)));
    min-width: 0;
    min-height: 40px;
    grid-template-columns: auto minmax(78px, 94px) minmax(126px, 160px);
    gap: 5px;
    align-items: center;
    padding: 4px 6px;
  }

  .game-room-fullscreen .direct-rule-declaration.has-pocket-call {
    width: min(390px, calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right))));
  }

  .game-room-fullscreen .direct-rule-declaration strong {
    font-size: 9px;
    white-space: nowrap;
  }

  .game-room-fullscreen .direct-rule-declaration label {
    display: block;
    min-width: 0;
  }

  .game-room-fullscreen .direct-rule-declaration label > span {
    display: none;
  }

  .game-room-fullscreen .direct-rule-declaration select {
    width: 100%;
    height: 30px;
    padding-right: 20px;
    font-size: 9px;
  }

  .game-room-fullscreen .direct-pocket-prompt {
    min-width: 0;
    font-size: 9px;
    line-height: 1.15;
  }

  .game-room-fullscreen .direct-pocket-prompt small {
    font-size: 8px;
  }

  .game-room-fullscreen .direct-communication-trigger {
    top: 54px;
    left: max(4px, env(safe-area-inset-left));
    width: 48px;
    min-height: 44px;
    padding: 0;
  }
  .game-room-fullscreen .direct-opponent-mute {
    top: 54px;
    right: max(4px, env(safe-area-inset-right));
    min-height: 44px;
  }
  .game-room-fullscreen .direct-communication-panel {
    position: absolute;
    top: 70px;
    bottom: auto;
    left: max(8px, env(safe-area-inset-left));
    width: min(430px, calc(100vw - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))));
    max-height: calc(100vh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .game-room-fullscreen .direct-communication-panel > header { min-height: 36px; }
  .game-room-fullscreen .direct-communication-panel > nav button { min-height: 38px; }
  .game-room-fullscreen .direct-communication-items { gap: 4px; padding: 6px; }
  .game-room-fullscreen .direct-communication-item { min-height: 44px; padding: 5px 7px; font-size: 10px; }
  .game-room-fullscreen .direct-communication-callout {
    top: 70px;
    max-width: min(300px, 42vw);
    min-height: 38px;
    padding: 7px 10px;
    font-size: 11px;
  }
  .game-room-fullscreen .direct-communication-callout.is-emote {
    top: 58px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
  }
  .game-room-fullscreen .direct-communication-callout.is-emote .direct-live-emoji {
    width: 46px;
    height: 46px;
    font-size: 42px;
  }
}

@media (orientation: portrait) and (max-width: 700px) {
  .game-room-fullscreen .direct-match-hud {
    display: none;
  }
}

@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  .game-room-fullscreen .direct-rule-declaration.is-foul-choice {
    width: min(430px, calc(100% - 20px));
    grid-template-columns: auto minmax(76px, 110px) minmax(166px, 1fr);
  }

  .game-room-fullscreen .direct-foul-choice-note {
    max-width: none;
    font-size: 9px;
  }

  .game-room-fullscreen .direct-foul-choice-actions {
    gap: 4px;
  }

  .game-room-fullscreen .direct-foul-choice-actions button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-room-fullscreen .direct-player-card,
  .game-room-fullscreen .direct-ball-slot,
  .game-room-fullscreen .direct-pyramid-ball {
    transition-duration: 1ms;
  }
  .game-room-fullscreen .direct-communication-callout,
  .game-room-fullscreen .direct-communication-callout.is-emote .direct-live-emoji {
    animation: none;
  }
}

/* Mandatory table-choice focus. Penalty-ball removal and ball placement are
   table interactions, not shot setup. Suppress unrelated overlays so no legal
   ball or placement point can sit behind HUD chrome on desktop or mobile.

   Free Pyramid cue selection is deliberately excluded: it is already live
   shot setup, so the match HUD and every shot control must stay visible while
   the player chooses a cue ball and aims. */
.game-room-fullscreen .kott-visualizer-host:is(
  .is-foul-penalty-selection,
  .is-ball-in-hand
) :is(
  .direct-match-hud,
  .kott-shot-hud,
  .visualizer-game-settings
) {
  display: none !important;
}

.game-room-fullscreen:has(.kott-visualizer-host:is(
  .is-foul-penalty-selection,
  .is-ball-in-hand,
  .is-pyramid-cue-selection
)) :is(
  .game-save-replay-button,
  .game-shot-alert
) {
  display: none !important;
}

.game-room-fullscreen .kott-visualizer-host.is-foul-penalty-selection
  .direct-rule-declaration.is-foul-choice.is-penalty-selection {
  top: max(8px, env(safe-area-inset-top));
  right: auto;
  bottom: auto;
  left: 50%;
  display: grid;
  width: min(620px, calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right))));
  max-width: none;
  min-height: 40px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.game-room-fullscreen .kott-visualizer-host:is(.is-ball-in-hand, .is-pyramid-cue-selection)
  .ball-in-hand-hint {
  top: max(8px, env(safe-area-inset-top));
  right: auto;
  bottom: auto;
  left: 50%;
  width: max-content;
  max-width: min(640px, calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right))));
  transform: translateX(-50%);
}
