:root {
  --mz-paper: #efe9dd;
  --mz-ink: #2c261c;
  --mz-line: rgba(44, 38, 28, 0.14);
  --mz-accent: #378add;
}

.mz-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 0 40px;
}

.mz-head { margin-bottom: 14px; }
.mz-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--mz-ink);
}
.mz-tagline {
  font-size: 15px;
  color: #6b6356;
  margin: 4px 0 0;
  line-height: 1.6;
}

.mz-stage { position: relative; }
.mz-canvas {
  width: 100%;
  height: 340px;
  display: block;
  border-radius: 14px;
  background: var(--mz-paper);
  cursor: crosshair;
  touch-action: none;
  box-shadow: inset 0 0 0 1px var(--mz-line);
}
.mz-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 15px;
  color: rgba(60, 52, 40, 0.55);
  padding: 0 16px;
  text-align: center;
}

.mz-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mz-btn {
  appearance: none;
  border: 1px solid var(--mz-line);
  background: #fff;
  color: var(--mz-ink);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s, transform .06s, border-color .12s;
}
.mz-btn:hover { background: #f6f3ec; border-color: rgba(44,38,28,0.25); }
.mz-btn:active { transform: scale(0.98); }
.mz-btn-primary {
  background: var(--mz-accent);
  border-color: var(--mz-accent);
  color: #fff;
}
.mz-btn-primary:hover { background: #2d77c4; border-color: #2d77c4; }
.mz-ic { font-size: 14px; }

.mz-pals { margin-left: auto; display: flex; gap: 6px; }
.mz-pal {
  appearance: none;
  border: 2px solid transparent;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--mz-line);
}
.mz-pal.active { border-color: var(--mz-accent); }

.mz-section-label {
  font-size: 12px;
  color: #6b6356;
  margin: 18px 0 6px;
}
.mz-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mz-thumb {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 4px;
  text-align: center;
  background: #fff;
  box-shadow: 0 0 0 1px var(--mz-line);
}
.mz-thumb.active { border-color: var(--mz-accent); }
.mz-thumb canvas { width: 100%; aspect-ratio: 1; display: block; }
.mz-thumb span {
  display: block;
  font-size: 11px;
  color: #6b6356;
  margin-top: 2px;
}

.mz-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  background: #f6f3ec;
  border-radius: 14px;
  padding: 16px;
}
.mz-big {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}
.mz-preview-body { flex: 1; min-width: 0; }
.mz-bigname { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: var(--mz-ink); }
.mz-preview-desc { font-size: 13px; color: #6b6356; line-height: 1.6; margin: 0 0 12px; }
.mz-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mz-result {
  margin-top: 14px;
  text-align: center;
  background: #f6f3ec;
  border-radius: 14px;
  padding: 16px;
}
.mz-resimg { max-width: 280px; width: 62%; border-radius: 10px; }
.mz-result-note { font-size: 12px; color: #6b6356; margin: 10px 0 0; }

.mz-foot {
  font-size: 12px;
  color: #9a9284;
  text-align: center;
  margin-top: 22px;
}

@media (max-width: 520px) {
  .mz-canvas { height: 300px; }
  .mz-preview { flex-direction: column; text-align: center; }
  .mz-preview-body { text-align: center; }
  .mz-pals { width: 100%; margin-left: 0; justify-content: flex-start; }
}
