* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f3f1ec;
  --panel: #ffffff;
  --ink: #2f2b26;
  --muted: #8a8378;
  --line: #e6e1d8;
  --accent: #c98a7d;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.app {
  display: flex;
  min-height: 100vh;
}

.panel {
  width: 340px;
  flex-shrink: 0;
  background: var(--panel);
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: -12px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #5a544b;
}

.field input[type="text"],
.field input[type="date"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #faf9f6;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}

.field input:focus { border-color: var(--accent); }

.upload {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  border: 1.5px dashed #cfc8bc;
  border-radius: 12px;
  background: #faf9f6;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-align: center;
  padding: 8px;
  transition: border-color .15s, background .15s;
}
.upload:hover, .upload.drag { border-color: var(--accent); background: #f7efec; }
.upload.has-img { border-style: solid; color: #4a8f6b; }

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  transition: transform .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { border-color: var(--ink); }
.swatch.active::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}

.field-row { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 400 !important;
  color: #5a544b;
  cursor: pointer;
}
.check input { accent-color: var(--accent); }

.btn {
  padding: 13px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { opacity: .9; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: auto;
}

.canvas-wrap {
  width: min(520px, 90%);
  filter: drop-shadow(0 24px 48px rgba(60, 50, 40, .18));
}
canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .panel { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
}
