:root {
  --pink: #c2415c;
  --pink2: #d4627a;
  --pink3: #e8a0b0;
  --pink4: #f5cdd5;
  --cream: #fef6f7;
  --parch: #fdeef1;
  --border: #f0c4cc;
  --text: #2a0d13;
  --muted: #9a7080;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--cream);
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  min-height: 100vh;
}

nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--pink);
  letter-spacing: 0.02em;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--pink);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.65rem 2rem;
  background: var(--parch);
  border-bottom: 1px solid var(--border);
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  color: var(--muted);
  background: var(--white);
}

.step.active .step-n {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

.step-label {
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 500;
}

.step.active .step-label {
  color: var(--pink);
  font-weight: 600;
}

.step-line {
  width: 38px;
  height: 1px;
  background: var(--border);
  margin: 0 0.3rem;
}

.header {
  background: var(--pink);
  padding: 2rem 2rem 1.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 15% 50%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 55%
    ),
    radial-gradient(ellipse at 85% 50%, rgba(0, 0, 0, 0.08) 0%, transparent 55%);
}

.header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 0,
    transparent 8px
  );
}

.header-inner {
  position: relative;
  z-index: 1;
}

.header-tag {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.4rem;
}

.header h1 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  color: #fff;
}

.header p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

.main {
  max-width: 1060px;
  margin: 2rem auto;
  padding: 0 2rem 6rem;
  display: flex;
  gap: 2rem;
}

.form-col {
  flex: 1;
  min-width: 0;
}

.preview-col {
  width: 295px;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  align-self: flex-start;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.card-head {
  padding: 0.82rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--parch);
}

.card-num {
  width: 26px;
  height: 26px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.card-title {
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pink);
}

.card-desc {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1px;
}

.card-body {
  padding: 1.25rem;
}

.tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(194, 65, 92, 0.06);
  border: 1px solid rgba(194, 65, 92, 0.18);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.68rem;
  color: var(--pink2);
  font-weight: 500;
}

label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

input[type="text"] {
  width: 100%;
  padding: 0.58rem 0.88rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--cream);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

input[type="text"]:focus {
  border-color: var(--pink2);
  box-shadow: 0 0 0 3px rgba(194, 65, 92, 0.1);
  background: #fff;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 0;
}

.cover-drop {
  width: 100%;
  aspect-ratio: 3/4;
  max-height: 260px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.cover-drop:hover {
  border-color: var(--pink2);
  background: rgba(194, 65, 92, 0.03);
}

.cover-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cover-drop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  color: var(--pink3);
}

.drop-text {
  font-size: 0.76rem;
  color: var(--muted);
}

.drop-hint {
  font-size: 0.63rem;
  color: var(--border);
  margin-top: 1px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.photo-slot {
  aspect-ratio: 3/4;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.photo-slot:hover {
  border-color: var(--pink2);
}

.photo-slot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.slot-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  color: var(--pink3);
}

.slot-num {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 600;
}

.slot-rm {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.6rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.photo-slot:hover .slot-rm.visible {
  display: flex;
}

.preview-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.prev-head {
  padding: 0.72rem 1.1rem;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prev-title {
  font-family: "Playfair Display", serif;
  color: #fff;
  font-size: 0.88rem;
  font-style: italic;
}

.prev-live {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.58rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.prev-body {
  padding: 1rem;
}

.mini-book {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink2) 100%);
  border-radius: 8px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.mini-book::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 0,
    transparent 8px
  );
}

.mini-frame {
  width: 54%;
  aspect-ratio: 3/4;
  margin: 0 auto 0.65rem;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
}

.mini-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.mini-frame svg {
  opacity: 0.3;
}

.mini-names {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1rem;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.mini-sub {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.6rem;
  position: relative;
  z-index: 1;
  margin-top: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--parch);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-top: 0.72rem;
}

.count-lbl {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.count-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pink);
}

.count-max {
  font-size: 0.7rem;
  color: var(--muted);
}

.btn-create {
  width: 100%;
  padding: 0.88rem;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-style: italic;
  cursor: pointer;
  margin-top: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    background 0.2s,
    transform 0.15s;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn-create:hover {
  background: #a8344d;
  transform: translateY(-1px);
}

.prev-note {
  font-size: 0.66rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .main {
    flex-direction: column;
  }
  .preview-col {
    width: 100%;
    position: static;
  }
  .row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 0 1rem;
    height: 48px;
  }

  .logo {
    font-size: 1rem;
  }

  .steps {
    padding: 0.6rem 1rem;
  }

  .step-label {
    font-size: 0.65rem;
  }

  .step-line {
    width: 24px;
  }

  .header {
    padding: 1.5rem 1rem 1.2rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .header p {
    font-size: 0.72rem;
  }

  .header-tag {
    font-size: 0.6rem;
  }

  .main {
    margin: 1.2rem auto;
    padding: 0 1rem 4rem;
    gap: 1.2rem;
  }

  .card-head {
    padding: 0.7rem 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .card-title {
    font-size: 0.88rem;
  }

  .tags {
    gap: 0.4rem;
  }

  .photo-grid {
    gap: 0.4rem;
  }

  .btn-create {
    padding: 0.8rem;
    font-size: 0.92rem;
  }

  .count-row {
    padding: 0.5rem 0.8rem;
  }

  .prev-note {
    font-size: 0.63rem;
  }
}

@media (max-width: 360px) {
  .step-label {
    display: none;
  }

  .step-line {
    width: 16px;
  }

  .header h1 {
    font-size: 1.3rem;
  }

  .logo {
    font-size: 0.95rem;
  }

  .photo-grid {
    gap: 0.3rem;
  }
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2f7fbd;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(47, 127, 189, 0.28);
  z-index: 9999;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #d9534f;
  box-shadow: 0 8px 24px rgba(217, 83, 79, 0.28);
}

.toast.success {
  background: #2f7fbd;
}