/* Motion has one job: connect a committed decision to its physical result. */
.gm-desk {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin: 18px 0 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.gm-event {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  padding: 8px;
  border-radius: 6px;
}
.gm-event-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: var(--green);
  background: var(--club-light-blue);
  border-radius: 50%;
}
.gm-event svg,
.gm-controls svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gm-event > div {
  min-width: 0;
}
.gm-event strong {
  font-size: 14px;
  display: block;
}
.gm-event [data-gm-note] {
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  max-width: 65ch;
}
.gm-event[data-kind="win"] .gm-event-symbol {
  color: var(--orange);
  background: var(--lime);
}
.gm-event[data-kind="error"] .gm-event-symbol {
  color: var(--danger);
}
.gm-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.gm-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  font: inherit;
  font-size: 12px;
  padding: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.gm-controls button[aria-pressed="true"] {
  color: var(--secondary-text);
  border-color: var(--club-blue);
}
.gm-controls button:hover {
  background: var(--club-light-blue);
}
.gm-controls button:focus-visible {
  outline: 3px solid var(--club-blue);
  outline-offset: 3px;
}
.gm-controls svg {
  width: 18px;
  height: 18px;
}
.gm-covered {
  visibility: hidden !important;
}
.gm-flight {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  transform-origin: center;
  contain: layout style;
  filter: drop-shadow(0 5px 7px #14213b30);
}
.gm-flight > * {
  pointer-events: none !important;
  box-sizing: border-box;
}
.gm-flight .race-sprite {
  display: block;
}
.gm-card-back {
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 3px solid white;
  background: var(--club-panel);
  color: var(--club-pale);
  box-shadow: 0 3px 8px #14213b30;
}
.gm-card-back svg {
  width: 42%;
  height: 42%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.gm-ribbons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 6px;
}
.gm-ribbons i {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 5px;
  height: 10px;
  background: var(--ribbon);
  border-radius: 1px;
}
.arena [data-gm-pending] {
  position: relative;
  overflow: hidden;
}
.arena [data-gm-pending]:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: var(--club-orange);
  transform-origin: right;
  animation: gm-submit 800ms cubic-bezier(0.16, 1, 0.3, 1) 3;
}
.arena .cell.new-piece .piece {
  animation: none;
}
html[data-gm-motion-preference="off"] .arena [data-gm-pending]:after {
  animation: none;
}
.arena
  :is(
    .pm-object,
    .ft-object,
    .pg-hand-card,
    .st-map-button,
    .chess-square,
    .checker-square
  ) {
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}
.arena :is(.pm-object, .ft-object, .pg-hand-card).selected {
  box-shadow: 0 3px 9px #14213b18;
}
.gm-flight .chess-piece {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes gm-submit {
  from {
    transform: scaleX(0.08);
  }
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 650px) {
  .gm-desk {
    display: grid;
    gap: 10px;
    margin: 16px 0 22px;
    padding: 8px 0 14px;
  }
  .gm-controls {
    justify-content: flex-start;
  }
  .gm-controls button {
    flex: 1;
  }
  .gm-event {
    padding: 4px 0;
  }
  .gm-event strong {
    font-size: 14px;
  }
  .gm-event [data-gm-note] {
    font-size: 12px;
  }
  .gm-event-symbol {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .arena [data-gm-pending]:after {
    animation: none;
    transform: scaleX(1);
  }
  .arena
    :is(
      .pm-object,
      .ft-object,
      .pg-hand-card,
      .st-map-button,
      .chess-square,
      .checker-square
    ) {
    transition: none;
  }
  .gm-flight,
  .gm-ribbons {
    display: none;
  }
}

@media (max-width: 650px) {
  .gm-desk {
    justify-content: normal;
  }
  .gm-controls {
    width: 100%;
  }
  .gm-controls button {
    white-space: nowrap;
  }
}
