.dm-board {
  --berry: #813956;
  --sage: #326450;
  margin-inline: auto;
  max-width: 980px;
  padding: clamp(14px, 3vw, 32px);
  border: 1px solid #ded2bc;
  border-radius: 22px;
  color: #48372f;
  background-color: #fffbef;
  background-image: linear-gradient(90deg, #dfbc9e20 50%, transparent 50%),
    linear-gradient(#dfbc9e20 50%, transparent 50%);
  background-size: 22px 22px;
}
.dm-header, .dm-progress, .dm-footer, .dm-pictures {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-header {
  gap: 12px;
  font-size: .92rem;
  font-weight: 800;
  color: var(--berry);
}
.dm-progress { gap: 5px; }
.dm-progress span {
  height: 9px;
  width: 15px;
  border-radius: 12px;
  border: 1px solid #b89c8c;
  background: #fffaf4;
}
.dm-progress .current { background: var(--berry); border-color: var(--berry); }
.dm-progress .done { background: var(--sage); border-color: var(--sage); }
.kg-screen.dm-board h2 {
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 3.8vw, 2.45rem);
  line-height: 1.2;
  color: #563044;
  margin: 10px 0 22px;
}
.dm-sheet {
  display: grid;
  grid-template-columns: minmax(135px, 1fr) minmax(0, 3fr);
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
}
.dm-clue {
  --dm-diameter: 98px;
  --dm-radius: 22px;
  display: grid;
  place-items: center;
  min-height: calc(var(--dm-diameter) + 2 * var(--dm-radius) + 16px);
}
.dm-lens {
  position: relative;
  width: var(--dm-diameter);
  aspect-ratio: 1;
  --dm-travel: var(--dm-radius);
}
.dm-lens::before {
  content: '';
  position: absolute;
  right: -9%;
  bottom: 0;
  width: 38%;
  height: 12%;
  border-radius: 12px;
  background: var(--berry);
  transform: rotate(47deg);
}
.dm-glass {
  position: relative;
  display: grid;
  place-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid var(--berry);
  background: white;
  box-shadow: 0 2px 0 #51273b;
}
.dm-glass img {
  display: block;
  width: calc(var(--dm-diameter) + 2 * var(--dm-radius));
  max-width: none;
  --dm-travel: calc(0px - var(--dm-radius));
}
/* Opposite translations keep the clue still underneath the moving glass. */
@keyframes dm-scan {
  from { transform: rotate(0turn) translateX(var(--dm-travel)) rotate(0turn); }
  to { transform: rotate(1turn) translateX(var(--dm-travel)) rotate(-1turn); }
}
@media (prefers-reduced-motion: no-preference) {
  .dm-lens, .dm-glass img { animation: dm-scan 7s linear infinite; }
  .dm-scan-complete :is(.dm-lens, .dm-glass img) { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .dm-glass img { width: calc(var(--dm-diameter) - 8px); }
}
.dm-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.2vw, 14px);
}
.dm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: clamp(6px, 1.3vw, 14px) 5px;
  border: 2px solid #d7c2ae;
  border-radius: 16px;
  box-shadow: 0 3px 0 #d7c2ae;
  background: white;
  color: #523d35;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
}
.dm-card img { display: block; width: min(100%, 158px); height: auto; }
.dm-name { font-size: clamp(.85rem, 1.8vw, 1.05rem); line-height: 1.25; }
@media (hover: hover) {
  .dm-card:hover:enabled { border-color: var(--berry); box-shadow: 0 3px 0 var(--berry); }
}
.dm-card:disabled { cursor: default; }
.dm-card.dm-match { border-color: var(--sage); box-shadow: 0 3px 0 var(--sage); color: var(--sage); }
.dm-match .dm-name::before { content: '✓ '; }
.dm-retry { opacity: .55; }
.dm-footer {
  flex-wrap: wrap;
  gap: 6px 18px;
  min-height: 48px;
  margin-top: 20px;
}
.dm-message, .dm-summary p { margin: 0; font-weight: 650; }
.dm-next, .dm-listen {
  min-height: 44px;
  padding: 9px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.dm-listen {
  background: #fffaf4;
  color: var(--berry);
  box-shadow: inset 0 0 0 1px #c99eac;
}
.dm-listen:disabled { opacity: .55; cursor: default; }
.dm-board button:focus-visible { outline: 3px solid #325998; outline-offset: 3px; }
.dm-summary { padding-block: 32px; }
.dm-pictures img { width: min(16%, 110px); border-radius: 20%; }
.dm-pictures { gap: 5px; }
.dm-summary .dm-next { margin-top: 18px; }
@media (max-width: 650px) {
  .dm-board { padding: 14px 8px; }
  .dm-sheet { grid-template-columns: 1fr; gap: 8px; }
  .dm-clue { --dm-diameter: 74px; --dm-radius: 18px; }
  .kg-screen.dm-board h2 { margin: 7px 0 12px; }
  .dm-card { border-radius: 12px; }
  .dm-footer { margin-top: 12px; }
}
