.chess-appearance-open {
  position: relative;
}

.chess-appearance-open::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.22;
  pointer-events: none;
}

.chess-appearance-sheet {
  max-height: min(76dvh, 620px);
}

.chess-appearance-sheet .chess-v2-sheet-scroll {
  display: grid;
  gap: 18px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.chess-appearance-section {
  display: grid;
  gap: 9px;
}

.chess-appearance-section > label {
  color: var(--muted, #67645f);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chess-appearance-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chess-appearance-option {
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(38, 37, 34, 0.15);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.82);
  color: #262522;
  text-align: left;
  touch-action: manipulation;
}

.chess-appearance-option > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chess-appearance-option strong,
.chess-appearance-option small {
  overflow-wrap: anywhere;
}

.chess-appearance-option strong {
  font-size: 15px;
  line-height: 1.15;
}

.chess-appearance-option small {
  color: #706c65;
  font-size: 11px;
  line-height: 1.25;
}

.chess-appearance-check {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(38, 37, 34, 0.07);
  color: transparent;
  font-size: 14px;
  font-weight: 900;
}

.chess-appearance-option[aria-pressed="true"] {
  border-color: rgba(58, 112, 191, 0.55);
  box-shadow: 0 0 0 2px rgba(58, 112, 191, 0.12);
}

.chess-appearance-option[aria-pressed="true"] .chess-appearance-check {
  background: #3569a8;
  color: #fff;
}

.chess-appearance-status {
  min-height: 34px;
  margin: 0;
  color: #69655f;
  font-size: 12px;
  line-height: 1.35;
}

.chess-appearance-reset {
  justify-self: start;
  border: 0;
  background: transparent;
  color: #3569a8;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 2px 0;
}

.chess-appearance-reset:disabled {
  color: #aaa59e;
}

.chess-appearance-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
}

.chess-appearance-actions .chess-v2-action {
  min-height: 48px;
}

@media (max-width: 390px) {
  .chess-v2-game-header .chess-v2-header-actions {
    gap: 4px;
  }

  .chess-appearance-options {
    grid-template-columns: 1fr;
  }

  .chess-appearance-option {
    min-height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chess-appearance-option {
    transition: none;
  }
}
