.puzzle-modes {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 268px);
  padding: 2px;
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: 100vmax;
  background: #f3f3f3;
}
.puzzle-modes::before {
  content: '';
  grid-area: 1 / 1;
  align-self: center;
  height: calc(100% - 8px);
  margin-inline: 4px;
  border: 1px solid var(--line);
  border-radius: 100vmax;
  background: #fff;
  transition: translate 210ms ease;
}
.puzzle-modes:has([data-drag-mode="pieces"][aria-pressed="true"])::before {
  translate: calc(100% + 8px) 0;
}
.puzzle-modes button {
  grid-row: 1;
  z-index: 1;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 100vmax;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 210ms ease;
}
.puzzle-modes [data-drag-mode="look"] { grid-column: 1; }
.puzzle-modes [data-drag-mode="pieces"] { grid-column: 2; }
.puzzle-modes button[aria-pressed="true"] {
  color: #1a1a1a;
}
.puzzle-modes button:disabled { cursor: default; opacity: .65; }
@media (prefers-reduced-motion: reduce) {
  .puzzle-modes::before, .puzzle-modes button { transition: none; }
}
.puzzle-intro { padding-bottom: 12px; }
.puzzle-intro p { line-height: 1.5; }
#puzzle-help { min-height: 3em; margin-top: 12px; }
.puzzle-face-options summary {
  width: fit-content;
  padding-block: 11px;
  min-height: 44px;
  color: var(--ink-muted);
  font-size: 12px;
  cursor: pointer;
}
.puzzle-face-options p { color: var(--ink-muted); font-size: 12px; margin: 0 0 8px; }
.hard-link-emphasis { font-weight: 400; }
.hard-link-emphasis strong, .waiting-footer-action .puzzle-solve-prompt {
  color: var(--vermelho);
  font-weight: 600;
}
.waiting-footer-action .waiting-footer-prompt { font-size: 15px; font-weight: 600; }

.puzzle-actions { flex-wrap: wrap; }

.puzzle-panel .solve-feedback, .waiting-footer-action .solve-feedback {
  margin: 0 0 8px;
  color: var(--ink-muted);
  text-align: center;
  font-size: 12px;
}

.puzzle-panel .solve-feedback:empty, .waiting-footer-action .solve-feedback:empty {
  margin: 0;
}

.puzzle-actions :is(#undo, #reset) {
  background: #f3f3f3;
  border-color: var(--line);
  color: var(--ink-muted);
}

.puzzle-actions :is(#undo, #reset):hover:enabled {
  background: #eaeaea;
}

.puzzle-actions :is(#undo, #reset):disabled {
  background: #f3f3f3;
  color: #777;
}

#solve {
  border-color: transparent;
  background: var(--verde);
  color: #fff;
}

#solve:enabled:hover {
  box-shadow: inset 0 0 0 1px #24471a;
}

#give-up {
  border-color: transparent;
  background: #dd2323;
  color: #fff;
}

#give-up:hover:enabled {
  background: #c72026;
}

#give-up:disabled {
  opacity: .65;
}
