.photo-game {
  padding: clamp(12px, 2.3vw, 24px);
  border: 1px solid #69576d;
  border-radius: 14px;
  background: linear-gradient(150deg, #3a3040, #232531 72%);
  color: #fcf2df;
}
.photo-game header,
.photo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.photo-game h2,
.photo-game h3,
.photo-game p {
  margin: 0;
}
.photo-game header small,
.photo-counter {
  color: #ffcf8d;
}
.photo-game h2 {
  font-size: clamp(18px, 3vw, 30px);
}
.photo-counter {
  font-size: 0.85rem;
  white-space: nowrap;
}
.photo-goal {
  padding: 6px 0 12px;
}
.photo-field {
  display: block;
  width: 100%;
  height: auto;
  background: #38283d;
  border: 3px solid #c8ac80;
  border-radius: 12px;
  touch-action: none;
  cursor: crosshair;
}
.photo-bar {
  margin-top: 10px;
}
.photo-status {
  font-weight: 700;
  color: #ffdc9d;
}
.photo-shutter {
  background: #ffd695;
  color: #302439;
  border: 2px solid #b48457;
  border-radius: 9px;
  min-height: 44px;
  padding: 8px 16px;
  font-weight: 750;
}
.photo-hint {
  font-size: 0.86rem;
  line-height: 1.4;
  color: #d1c6cc;
  padding: 8px 0;
}
.photo-shelf {
  border-top: 1px solid #635563;
  margin-top: 8px;
  padding-top: 10px;
}
.photo-prints {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 7px;
}
.photo-prints > span,
.photo-prints figure {
  margin: 0;
  background: #332c36;
  border: 1px solid #665866;
  padding: 5px;
  border-radius: 5px;
  color: #cebeca;
  font-size: 0.78rem;
}
.photo-prints > span {
  display: grid;
  place-items: center;
  min-height: 38px;
  text-align: center;
}
.photo-prints canvas {
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  display: block;
}
.photo-prints figcaption {
  text-align: center;
  color: #ffe5b5;
  padding: 4px;
}

/* Phone held sideways: the viewfinder fills the height, the task and shutter sit beside it. */
@media (orientation: landscape) and (max-height: 540px) {
  .photo-game {
    display: grid;
    grid-template-columns: auto minmax(190px, 1fr);
    column-gap: 12px;
    align-content: start;
    padding-top: 8px;
  }
  .photo-game > * { grid-column: 2; }
  .photo-game > .photo-field {
    grid-column: 1;
    grid-row: 1 / span 6;
    width: min(calc(100vw - 250px - env(safe-area-inset-left) - env(safe-area-inset-right)),
      calc((100svh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 2.331));
    height: auto;
  }
  .photo-game > header { flex-wrap: wrap; gap: 2px 8px; }
  .photo-game > header h2 { font-size: 1rem; }
  .photo-game .photo-goal { font-size: 0.82rem; margin: 4px 0; }
  .photo-game .photo-bar { flex-wrap: wrap; gap: 6px; }
  .photo-game .photo-shutter { width: 100%; }
  .photo-game .photo-hint { display: none; }
}
