.order-page {
  padding: 28px 0 48px;
}

.order-intro {
  margin-bottom: 22px;
}

.order-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.order-intro p {
  margin: 0;
  max-width: 40rem;
  color: var(--cream-dim);
}

.order-grid {
  display: grid;
  gap: 18px;
}

.order-page .card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}

.order-page .card h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--cream);
}

.previews {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pv {
  position: relative;
  text-align: center;
}

.pv canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #e8dccb;
  touch-action: none;
}

.pv .lbl {
  margin-top: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.hint,
.desc,
.opt,
.each,
.seller {
  color: var(--cream-dim);
  font-size: 0.92rem;
}

.hint { margin-top: 10px; }
.desc { margin-top: 6px; }

.order-page label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 14px 0 4px;
}

.order-page select,
.order-page input,
.order-page textarea {
  width: 100%;
  font: inherit;
  color: var(--cream);
  background: #1a1916;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}

.order-page textarea {
  resize: vertical;
  min-height: 58px;
}

.order-page select:focus,
.order-page input:focus,
.order-page textarea:focus {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.order-page .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#fontSel {
  font-size: 1.05rem;
  line-height: 1.3;
}

.price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}

.price .tot {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.8rem;
  color: var(--cream);
}

.order-page .note {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #090909;
}

button.submit {
  margin-top: 16px;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
  font: 700 0.95rem system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

button.submit:hover { background: #fff8ec; }
button.submit:disabled { opacity: 0.6; cursor: wait; }
button.submit:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.msg {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  display: none;
}

.msg.ok {
  display: block;
  background: #1c2a1e;
  border: 1px solid #8fbf96;
  color: var(--cream);
}

.msg.err {
  display: block;
  background: #2a1c1c;
  border: 1px solid #e0a0a0;
  color: var(--cream);
}

.photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.photo-item { width: 92px; text-align: center; cursor: pointer; }
.photo-item img,
.photo-item .ph {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #e8dccb;
  display: block;
}
.photo-item .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--ink);
  padding: 6px;
}
.photo-item .nm {
  font-size: 0.75rem;
  color: var(--cream-dim);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-item.sel img,
.photo-item.sel .ph { box-shadow: 0 0 0 2px var(--cream); }

.photo-tools {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.photo-tools input[type="range"] { padding: 0; accent-color: var(--cream); }
.lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  cursor: pointer;
}
.lock input { width: auto; margin: 0; }

.modes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.modes button {
  flex: 1 1 40%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}
.modes button.on { box-shadow: inset 0 0 0 2px var(--cream); }

canvas.drag { cursor: grab; }
canvas.dragging { cursor: grabbing; }
.hidden { display: none !important; }

@media (max-width: 520px) {
  .order-page .row { grid-template-columns: 1fr; }
}

@media (min-width: 860px) {
  .order-grid { grid-template-columns: 1.05fr 1fr; align-items: start; }
}

/* ----- design editor ----- */
.pv canvas { touch-action: none; -webkit-user-select: none; user-select: none; outline: none; }
.pv canvas:focus-visible { box-shadow: 0 0 0 2px var(--cream); }
.pv-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pv-tools button, .layer-panel .modes button {
  flex: 1 1 40%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line);
  background: transparent; color: var(--cream); border-radius: 4px; cursor: pointer; font: inherit;
}
.pv-tools button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--cream); }
.layer-panel { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.layer-list { display: flex; flex-wrap: wrap; gap: 6px; }
.layer-list .chip {
  min-height: 38px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #1a1916; color: var(--cream); font: inherit; font-size: 0.86rem; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.layer-list .chip.on { box-shadow: inset 0 0 0 2px var(--cream); background: #262420; }
.layer-edit { margin-top: 8px; }
.layer-edit input[type="range"] { padding: 0; accent-color: var(--cream); width: 100%; }
.layer-edit .val { font-weight: 400; color: var(--cream-dim); margin-left: 4px; }
.layer-panel .modes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.layer-panel .modes button { flex: 1 1 28%; }
.layer-panel .modes button.on { box-shadow: inset 0 0 0 2px var(--cream); }
.warn { margin: 10px 0 0; padding: 8px 10px; border-radius: 4px; background: rgba(196,18,48,0.18); color: #ffd9d9; font-size: 0.9rem; }

.sample-note {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--cream-dim);
  background: rgba(243, 234, 216, 0.06);
  color: var(--cream-dim);
  font-size: 0.86rem;
  line-height: 1.45;
}
.upload-row { display: flex; align-items: center; gap: 8px; }
.upload-row input[type=file] { flex: 1 1 auto; min-width: 0; }
.photo-x {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; min-width: 44px; min-height: 44px; padding: 0 14px;
  border-radius: 22px;
  border: 1px solid #ff9d9d;
  background: #5a1a22;
  color: #fff;
  font: inherit; font-size: 0.92rem; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer;
}
.photo-x span { font-size: 1.05rem; }
.photo-x:hover, .photo-x:focus-visible { background: #7a2430; }
.order-page .photo-x[hidden], .photo-x[hidden] { display: none !important; }
.lock { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 0.9rem; cursor: pointer; }
.order-page .lock input[type="checkbox"] { width: 20px; height: 20px; padding: 0; margin: 0; accent-color: var(--cream); }
.chip-group { display: inline-flex; align-items: stretch; }
.chip-group .chip { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.chip-x {
  border: 1px solid var(--line); border-left: 0;
  border-radius: 0 999px 999px 0;
  background: #1a1916; color: #ffb3b3; min-height: 38px;
  padding: 0 10px; font-size: 0.85rem; cursor: pointer;
}
.photo-item .ph { font-size: 0.7rem; text-align: center; line-height: 1.2; }
