:root {
  --ink: #211b1f;
  --muted: #736a70;
  --paper: #fffaf7;
  --surface: #ffffff;
  --blush: #ffd8e2;
  --mint: #ccefe1;
  --sky: #cfe5ff;
  --cream: #f4dfbd;
  --plum: #3a2532;
  --line: rgba(33, 27, 31, 0.12);
  --shadow: 0 22px 70px rgba(66, 42, 53, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Noto Sans KR", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 250, 247, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(16px, 4vw, 48px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand,
nav {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  background: var(--ink);
  border-radius: 6px;
  color: white;
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(28px, 6vw, 80px);
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  min-height: calc(100vh - 65px);
  padding: clamp(34px, 5vw, 72px) clamp(16px, 5vw, 72px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: #ba5f76;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.7rem, 8vw, 6.9rem);
  line-height: 0.93;
  margin-bottom: 22px;
  max-width: 930px;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.hero-text {
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
  line-height: 1.7;
  max-width: 650px;
}

.hero-actions,
.cta-row,
.share-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.share-chip,
.preview-toolbar button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  min-height: 46px;
  padding: 0 18px;
}

.button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.primary {
  background: var(--ink);
  color: white;
}

.ghost,
.secondary,
.share-chip,
.preview-toolbar button {
  background: white;
  color: var(--ink);
}

.button:disabled,
.share-chip:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.sample-strip {
  aspect-ratio: 1 / 2;
  background: #fff;
  border: 10px solid #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  justify-self: center;
  max-height: 72vh;
  padding: 10px 10px 42px;
  position: relative;
  width: min(360px, 78vw);
}

.sample-strip span {
  bottom: 13px;
  color: #b35b73;
  font-size: 0.75rem;
  font-weight: 800;
  left: 0;
  position: absolute;
  right: 0;
  text-align: center;
}

.sample-frame {
  border-radius: 6px;
  min-height: 0;
}

.sample-one {
  background: linear-gradient(135deg, #ffd9e2, #fff3bc 58%, #211b1f);
}

.sample-two {
  background: linear-gradient(135deg, #c8f0e1, #f7dfb9 55%, #614963);
}

.sample-three {
  background: linear-gradient(135deg, #d8e6ff, #ffc6d4 54%, #2f334f);
}

.sample-four {
  background: linear-gradient(135deg, #f0dbc0, #fef7e0 48%, #8c5c71);
}

.maker,
.seo-copy,
.faq {
  padding: clamp(44px, 6vw, 88px) clamp(16px, 5vw, 72px);
}

.maker {
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.maker-heading {
  margin: 0 auto 28px;
  max-width: 1120px;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 0.78fr);
  margin: 0 auto;
  max-width: 1120px;
}

.upload-panel,
.preview-panel {
  background: #fffaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(66, 42, 53, 0.07);
  padding: clamp(14px, 3vw, 24px);
}

.slot-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-slot {
  align-items: center;
  aspect-ratio: 1 / 0.72;
  background: white;
  border: 1.5px dashed rgba(186, 95, 118, 0.45);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 132px;
  overflow: hidden;
  padding: 16px;
  position: relative;
  text-align: center;
}

.upload-slot input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.upload-slot img {
  display: none;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.upload-slot.has-image img {
  display: block;
}

.upload-slot.has-image strong,
.upload-slot.has-image small,
.upload-slot.has-image .plus {
  opacity: 0;
}

.upload-slot.is-dragging {
  background: #fff1f5;
  border-color: #ba5f76;
}

.plus {
  align-items: center;
  background: var(--blush);
  border-radius: 999px;
  display: flex;
  font-size: 1.5rem;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  margin-bottom: 8px;
  width: 36px;
}

.upload-slot small,
.status,
.seo-copy p,
.faq p,
footer {
  color: var(--muted);
}

fieldset {
  border: 0;
  margin: 22px 0 0;
  padding: 0;
}

legend {
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.option-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.option-button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 72px;
  padding: 8px;
  text-align: left;
}

.option-button.active,
.layout-button.active {
  border-color: #211b1f;
  box-shadow: inset 0 0 0 1px #211b1f;
}

.swatch {
  border-radius: 6px;
  display: block;
  height: 28px;
  margin-bottom: 8px;
}

.option-button span:last-child {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
}

.layout-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.layout-button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 10px;
  text-align: left;
}

.layout-thumb {
  background: #fffaf7;
  border: 1px solid rgba(33, 27, 31, 0.1);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  height: 48px;
  padding: 5px;
}

.layout-thumb i {
  background: var(--blush);
  border-radius: 3px;
  display: block;
}

.layout-button strong {
  font-size: 0.75rem;
}

.cta-row {
  margin-top: 20px;
}

.share-panel {
  margin-top: 10px;
}

.share-chip {
  min-height: 38px;
  padding: 0 12px;
}

.status {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 14px 0 0;
}

.preview-toolbar {
  align-items: center;
  display: flex;
  font-size: 0.86rem;
  font-weight: 800;
  justify-content: space-between;
  margin-bottom: 14px;
}

.preview-toolbar button {
  min-height: 34px;
  padding: 0 12px;
}

canvas {
  aspect-ratio: 1 / 2;
  background: #fff;
  border-radius: 8px;
  display: block;
  flex: none;
  height: auto;
  image-rendering: auto;
  margin-inline: auto;
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
  width: min(100%, var(--preview-width, 36vh));
}

.preview-panel canvas {
  contain: layout paint;
  box-shadow: 0 10px 28px rgba(66, 42, 53, 0.09);
  vertical-align: middle;
}

.preview-panel {
  overflow: hidden;
  min-width: 0;
}

@supports not (width: min(100%, 10px)) {
  canvas {
    width: auto;
  }
}

.copy-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.copy-grid article {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.faq {
  background: #fff;
}

.faq details {
  border-top: 1px solid var(--line);
  margin: 0 auto;
  max-width: 880px;
  padding: 18px 0;
}

.faq h2 {
  margin-left: auto;
  margin-right: auto;
  max-width: 880px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 22px clamp(16px, 5vw, 72px);
}

footer span:first-child {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 860px) {
  .hero,
  .workspace,
  .copy-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .sample-strip {
    max-height: none;
  }

  .preview-panel {
    order: -1;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 14px;
  }

  nav {
    gap: 10px;
  }

  .slot-grid,
  .option-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frame-options {
    grid-template-columns: 1fr;
  }

  .layout-options {
    grid-template-columns: 1fr;
  }
}
