:root {
  --ink: #171923;
  --muted: #6b7280;
  --line: #e6e7eb;
  --paper: #fff;
  --bg: #f6f4f0;
  --accent: #6e56cf;
  --accent2: #ebe7ff;
  --danger: #c2413b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
}
.top {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100% - 720px) / 2));
  position: sticky;
  top: 0;
  z-index: 3;
}
.brand {
  font-weight: 900;
  letter-spacing: 0.08em;
}
.step {
  font-size: 14px;
  color: var(--muted);
}
.shell {
  width: min(720px, 100%);
  margin: auto;
  padding: 22px 16px 70px;
}
.hero {
  padding: 18px 5px 14px;
}
.hero h1 {
  font-size: 30px;
  margin: 4px 0 10px;
  letter-spacing: -0.04em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.hero .eyebrow {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin: 14px 0;
  box-shadow: 0 8px 24px #2221;
}
.card h2 {
  font-size: 18px;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card h2 span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--accent2);
  color: var(--accent);
  font-size: 14px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: #353845;
  margin-top: 14px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9dbe2;
  border-radius: 11px;
  background: #fff;
  padding: 13px 14px;
  margin-top: 7px;
  font: inherit;
  font-size: 15px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent2);
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.product {
  padding: 16px 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}
.product b,
.product small {
  display: block;
}
.product b {
  font-size: 16px;
}
.product small {
  color: var(--muted);
  margin-top: 5px;
}
.product.active {
  border: 2px solid var(--accent);
  background: var(--accent2);
  color: var(--accent);
}
button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.primary,
.secondary {
  border: 0;
  border-radius: 12px;
  padding: 14px 17px;
}
.primary {
  background: var(--accent);
  color: white;
}
.secondary {
  background: #eef0f4;
  color: #30333d;
}
.full {
  width: 100%;
  margin-top: 18px;
}
.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.slot {
  position: relative;
  aspect-ratio: 1;
  background: #f0f1f4;
  border: 1px dashed #bcc0ca;
  border-radius: 14px;
  overflow: hidden;
}
.slot.card {
  aspect-ratio: 80/53;
  margin: 0;
  padding: 0;
  border-radius: 12px;
}
.slot.circle {
  border-radius: 50%;
}
.slot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slot span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 8px;
}
.slot.ready span {
  background: #0008;
  color: white;
  inset: auto 6px 6px;
  border-radius: 8px;
  padding: 5px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.55;
  font-weight: 500;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}
.message {
  text-align: center;
  font-size: 14px;
  min-height: 21px;
  color: var(--danger);
}
dialog {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(620px, calc(100% - 20px));
  box-shadow: 0 25px 80px #0008;
}
dialog::backdrop {
  background: #111a;
}
.editor-head {
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.editor-head b,
.editor-head small {
  display: block;
}
.editor-head small {
  color: var(--muted);
  margin-top: 3px;
}
.icon {
  font-size: 28px;
  background: none;
  border: 0;
}
.canvas-wrap {
  width: min(88vw, 540px);
  margin: auto;
  position: relative;
  background: #111;
  overflow: hidden;
}
.canvas-wrap.round-crop,
.canvas-wrap.round-crop .cut-guide,
.canvas-wrap.round-crop .safe-guide {
  border-radius: 50%;
}
.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.cut-guide,
.safe-guide {
  position: absolute;
  pointer-events: none;
}
.cut-guide {
  border: 4px solid #ff2e7a;
  border-radius: 8px;
  box-shadow:
    0 0 0 999px #0005,
    0 0 7px #000,
    0 0 8px #ff2e7a;
}
.safe-guide {
  border: 2px dashed #ffe16b;
  border-radius: 7px;
}
.cut-guide span,
.safe-guide span {
  position: absolute;
  left: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.cut-guide span {
  top: 6px;
  background: #ff2e7a;
  color: white;
}
.safe-guide span {
  bottom: 6px;
  background: #ffe16b;
  color: #29220a;
}
.guide-help {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 12px;
}
.guide-help span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.guide-help i {
  width: 20px;
  height: 0;
  display: inline-block;
}
.guide-help .solid {
  border-top: 4px solid #ff2e7a;
}
.guide-help .dashed {
  border-top: 2px dashed #b58d00;
}
.zoom {
  padding: 2px 20px;
}
.zoom input {
  padding: 0;
}
.zoom small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}
.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 22px;
}
@media (max-width: 520px) {
  .two {
    grid-template-columns: 1fr;
  }
  .slots {
    grid-template-columns: repeat(2, 1fr);
  }
  .card {
    padding: 18px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .product-options {
    grid-template-columns: 1fr;
  }
  .cut-guide span,
  .safe-guide span {
    font-size: 10px;
  }
}

/* Keep product previews proportional to their real millimetre sizes. */
.slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.slot {
  flex: 0 0 160px;
  width: 160px;
  height: 160px;
  aspect-ratio: auto;
}
.slot.card {
  flex-basis: 256px;
  width: 256px;
  height: 169.6px;
  aspect-ratio: auto;
}
.slot.circle {
  flex-basis: 185.6px;
  width: 185.6px;
  height: 185.6px;
}
@media (max-width: 520px) {
  .slot {
    flex-basis: 125px;
    width: 125px;
    height: 125px;
  }
  .slot.card {
    flex-basis: 200px;
    width: 200px;
    height: 132.5px;
  }
  .slot.circle {
    flex-basis: 145px;
    width: 145px;
    height: 145px;
  }
}
