.puzzle-header { justify-content: space-between; gap: 12px; }
.puzzle-header a { font-size: 12px; color: var(--ink-muted); text-underline-offset: 4px; }
.puzzle-intro { text-align: center; padding: clamp(40px, 7vh, 68px) 0 30px; }
.puzzle-intro h1 {
  margin: 0;
  font-size: clamp(26px, 3.35vw, 42px);
  line-height: 1.16;
  letter-spacing: -.035em;
  font-weight: 600;
}
.puzzle-intro p { margin: 12px auto 0; max-width: 38ch; color: var(--ink-muted); font-size: 13px; }
.puzzle-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(246px, .60fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
}
.puzzle-view { position: relative; min-width: 0; min-height: 350px; background: #f1f1f1; }
#puzzle-canvas { position: absolute; inset: 0 0 auto; height: calc(100% - 54px); touch-action: none; cursor: grab; }
#puzzle-canvas:active { cursor: grabbing; }
#puzzle-canvas:focus-visible { outline-offset: -4px; }
.puzzle-message {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 5px 12px;
  border-radius: 100vmax;
  background: #fff;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}
.puzzle-message:empty { display: none; }
.help-nudge {
  position: absolute;
  inset: 12px 12px auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 8px;
  width: fit-content;
  margin: auto;
  padding: 4px 12px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink-muted);
  font-size: 12px;
  text-align: center;
}
.help-nudge button {
  min-height: 34px;
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: inherit;
}
#solve { max-width: 100%; }
#solve:enabled { cursor: pointer; }
#solve:disabled { cursor: default; opacity: .65; }
.camera-buttons { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; }
.camera-buttons button, .face-controls button, .puzzle-actions button {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 100vmax;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.camera-buttons button { background: #fff; font-size: 17px; margin-inline: 2px; }
.camera-buttons button:hover, .face-controls button:hover, .puzzle-actions button:hover:enabled { background: #f1f1f1; }
.puzzle-panel { padding: 17px 19px; border-left: 1px solid var(--line); }
.puzzle-count { margin: 0 0 8px; color: var(--ink-muted); font-size: 12px; }
#move-count { color: #1a1a1a; font-weight: 600; font-variant-numeric: tabular-nums; }
.face-row { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.face-label { margin-right: auto; color: var(--ink-muted); font-size: 12px; }
.face-controls button { font-size: 21px; }
.puzzle-actions { display: flex; justify-content: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.puzzle-actions button { padding: 8px 13px; border: 1px solid var(--line); font-size: 12px; }
.puzzle-actions button:disabled { color: #777; cursor: default; }
.puzzle-actions #reset { background: var(--plum); border-color: var(--plum); color: #fff; }
.puzzle-actions #reset:hover:enabled { background: #734485; }
.puzzle-actions #reset:disabled { background: #eee; border-color: var(--line); color: #777; }
@media (max-width: 730px) {
  .puzzle-board { grid-template-columns: minmax(0, 1fr); }
  .puzzle-intro { padding-bottom: 25px; }
  .puzzle-view { min-height: clamp(240px, 68vw, 370px); }
  .puzzle-panel { border-left: 0; border-top: 1px solid var(--line); padding: 13px 12px; }
  .face-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  .face-row { gap: 0; }
}
@media (max-width: 365px) {
  .face-row { display: grid; grid-template-columns: 1fr 1fr; }
  .face-label { grid-column: 1 / -1; margin: 5px 0 0; text-align: center; }
}
