/* 도형 규칙 퍼즐 */
.pz {
  position: relative;
}
.pz-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.pz-board {
  --pz-cell-bg: #ffffff;
  --pz-cell-line: #dde2ec;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 14px 14px 18px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.pz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}
.pz-top b {
  color: var(--ink);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}
.pz-dots {
  margin-top: 10px;
  gap: 5px;
}
.pz-dots .dot {
  width: 9px;
  height: 9px;
}
.pz-dots .dot.now {
  background: var(--brand);
  transform: scale(1.25);
}
.pz-area {
  position: relative;
  min-height: 340px;
  margin-top: 12px;
}
.pz-stage {
  display: grid;
  justify-items: center;
  gap: 14px;
}
.pz-stage.pz-in {
  animation: pz-in 0.22s ease-out;
}
@keyframes pz-in {
  from {
    opacity: 0.2;
    transform: translateY(6px);
  }
}
.pz-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 318px);
  padding: 6px;
  border-radius: 16px;
  background: var(--surface-2);
}
.pz-cell {
  aspect-ratio: 1;
  border-radius: 11px;
  background: var(--pz-cell-bg);
  border: 1px solid var(--pz-cell-line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pz-cell svg,
.pz-opt svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pz-q {
  background: transparent;
  border: 2px dashed var(--muted);
  color: var(--muted);
  font-size: 2.4rem;
  font-weight: 800;
}
.pz-pick {
  width: min(100%, 318px);
}
.pz-pick-label {
  margin: 0 0 8px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}
.pz-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pz-opt {
  appearance: none;
  position: relative;
  font: inherit;
  padding: 4px;
  aspect-ratio: 1;
  border-radius: 13px;
  border: 2px solid var(--line);
  background: var(--pz-cell-bg);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.12s, transform 0.12s;
}
.pz-opt:hover {
  border-color: var(--brand);
}
.pz-opt:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.pz-opt.picked {
  border-color: var(--brand);
  transform: scale(0.95);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.pz-opt-n {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #586174;
  line-height: 1;
}
.pz-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
}
.pz-cover[hidden] {
  display: none;
}
.pz-cover-icon {
  font-size: 2.6rem;
  line-height: 1;
}
.pz-cover-title {
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pz-cover-sub {
  color: var(--muted);
  max-width: 26em;
}
.pz-cover .btn {
  min-width: 180px;
  min-height: 54px;
  font-size: 1.1rem;
  margin-top: 4px;
}
.pz-msg {
  text-align: center;
  font-weight: 600;
  margin: 12px 0 0;
  min-height: 1.5em;
}
@media (min-width: 720px) {
  .pz-stage {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 26px;
  }
  .pz-matrix {
    width: 330px;
  }
  .pz-pick {
    width: 300px;
  }
}

/* 결과: 문제별 돌아보기 */
.pz-review {
  --pz-cell-bg: #ffffff;
  --pz-cell-line: #dde2ec;
  margin-top: 22px;
  text-align: left;
}
.pz-review h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
.pz-review ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.pz-review details {
  border-radius: 12px;
  background: var(--surface-2);
}
.pz-review summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  list-style: none;
}
.pz-review summary::-webkit-details-marker {
  display: none;
}
.pz-review summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--muted);
  flex: none;
}
.pz-review details[open] summary::after {
  content: '▴';
}
.pz-rv-n {
  flex: none;
  min-width: 1.6em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pz-rv-mark {
  flex: none;
  font-weight: 800;
}
.pz-rv-mark.ok {
  color: var(--go);
}
.pz-rv-mark.bad {
  color: var(--wait);
}
.pz-rv-rule {
  color: var(--muted);
  min-width: 0;
}
.pz-rv-body {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  padding: 4px 12px 14px;
}
.pz-mini {
  width: min(100%, 210px);
  gap: 4px;
  padding: 4px;
  background: var(--surface);
}
.pz-mini .pz-cell {
  border-radius: 7px;
}
.pz-ans {
  box-shadow: inset 0 0 0 3px var(--go);
}
.pz-mine {
  box-shadow: inset 0 0 0 3px var(--wait);
}
.pz-rv-side {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.pz-rv-cap {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.pz-one {
  width: 76px;
}
@media (prefers-reduced-motion: reduce) {
  .pz-stage.pz-in {
    animation: none;
  }
  .pz-opt {
    transition: none;
  }
}
