:root {
  --ink: #20211e;
  --paper: #f3f0ea;
  --paper-light: #fbf9f5;
  --plum: #6f3041;
  --plum-dark: #3c2028;
  --sage: #cfd5ca;
  --muted: #62665f;
  --line: #c7c7be;
  --error: #a11f2f;
  --focus: #1556a3;
  --serif: "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: Inter, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
button, input, textarea { font: inherit; }
button, summary, label[for] { cursor: pointer; }
button, summary, a, label[for], .mood-option { touch-action: manipulation; }
button:active, .secondary-button:active, .mood-option:active>span { opacity: .72; }
a { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible, label[for="hero-photo"]:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; visibility: hidden; padding: 12px 16px; background: white; }
.skip-link:focus { visibility: visible; }
.privacy-notice { padding: 10px 18px; background: var(--plum-dark); color: white; text-align: center; font-size: 12px; }
.privacy-notice strong { margin-right: 5px; color: #f4cfb4; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(100% - 32px, 1240px); margin: auto; }
.brand { font: 700 15px var(--serif); letter-spacing: .1em; text-decoration: none; }
.brand span { color: var(--plum); }
.back-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; text-underline-offset: 5px; }
.shell { width: min(100% - 32px, 1240px); margin-inline: auto; }
.intro { display: grid; gap: 20px; padding: 46px 0 52px; border-top: 1px solid var(--line); }
.eyebrow, .step-label { margin: 0; color: var(--plum); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.intro h1 { margin: 0; font: 500 clamp(42px, 12vw, 76px)/1 var(--serif); letter-spacing: -.055em; word-break: keep-all; }
.intro div>p { max-width: 620px; margin: 21px 0 0; color: var(--muted); }
.workspace { display: grid; gap: 24px; padding-bottom: 90px; }
.form-panel, .preview-panel { min-width: 0; padding: 24px 18px; border: 1px solid var(--line); background: var(--paper-light); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 7px 0 0; font: 500 29px var(--serif); letter-spacing: -.025em; }
#preview-title:focus { outline: none; }
.text-button { min-height: 44px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 12px; font-weight: 900; }
.required-guide { margin: 18px 0 24px; color: var(--muted); font-size: 12px; }
.required-guide span, .required-mark { color: var(--error); }
.required-mark, .optional-mark { margin-left: 5px; font-size: 10px; font-weight: 900; }
.optional-mark { color: var(--muted); }
.field { margin-bottom: 23px; }
.field>label, fieldset>legend { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 900; }
fieldset.field { min-width: 0; margin-inline: 0; padding: 0; border: 0; }
input[type="text"], input[type="url"], textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #aaa9a1;
  border-radius: 0;
  background: white;
  color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #777972; opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field-help, .field-error { margin: 6px 0 0; font-size: 11px; }
.field-help { color: var(--muted); }
.field-error { min-height: 0; color: var(--error); font-weight: 800; }
.field-error:not(:empty) { min-height: 20px; }
.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.field-meta span { padding-top: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.upload-box { position: relative; min-height: 64px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px; border: 1px dashed #8f9088; background: white; }
.upload-box input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-action { min-height: 46px; display: inline-flex; align-items: center; padding: 10px 15px; background: var(--ink); color: white; font-size: 12px; font-weight: 900; }
#photo-name { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mood-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mood-option { min-width: 0; }
.mood-option input { position: absolute; opacity: 0; pointer-events: none; }
.mood-option>span { min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: 11px; border: 1px solid var(--line); background: white; }
.mood-option input:focus-visible+span { outline: 3px solid var(--focus); outline-offset: 2px; }
.mood-option input:checked+span { border: 2px solid var(--ink); padding: 10px; }
.mood-option i { width: 25px; height: 9px; display: block; margin-bottom: 8px; border-radius: 99px; background: #d78da3; box-shadow: 10px 0 #f5d5dc; }
.minimal-option i { border-radius: 0; background: #222; box-shadow: 10px 0 #bcbcb2; }
.hip-option i { border-radius: 0; background: #bcff31; box-shadow: 10px 0 #7b55ff; }
.custom-option i { border: 1px dashed #777; border-radius: 0; background: transparent; box-shadow: 10px 0 #dedbd4; }
.mood-option strong, .mood-option small { min-width: 0; }
.mood-option strong { font-size: 12px; }
.mood-option small { color: var(--muted); font-size: 9px; }
#custom-mood[disabled] { background: #e9e8e2; color: #74756e; cursor: not-allowed; }
.optional-fields { margin: 28px 0; border-block: 1px solid var(--line); }
.optional-fields summary { min-height: 60px; display: flex; flex-direction: column; justify-content: center; padding: 10px 28px 10px 0; font-size: 13px; font-weight: 900; list-style: none; position: relative; }
.optional-fields summary::-webkit-details-marker { display: none; }
.optional-fields summary::after { position: absolute; right: 5px; content: "+"; font-size: 22px; font-weight: 400; }
.optional-fields[open] summary::after { content: "−"; }
.optional-fields summary span { color: var(--muted); font-size: 10px; font-weight: 500; }
.optional-body { padding-top: 21px; border-top: 1px solid var(--line); }
.form-actions, .preview-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.primary-button, .secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 11px 17px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.primary-button { flex: 1; justify-content: space-between; background: var(--ink); color: white; }
.secondary-button { background: transparent; color: var(--ink); }
.form-status { min-height: 24px; margin: 12px 0 0; color: var(--plum); font-size: 12px; font-weight: 900; }
.preview-heading { flex-direction: column; align-items: stretch; }
.view-controls { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); background: white; }
.view-controls button { min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 900; white-space: nowrap; }
.view-controls button[aria-pressed="true"] { background: var(--ink); color: white; }
.preview-stage { display: flex; justify-content: center; min-height: 660px; margin: 22px -8px; padding: 20px 8px; overflow: auto; background: #deddd7; transition: background .2s ease; }
.preview-shell { width: 100%; max-width: 390px; align-self: flex-start; border: 1px solid #a7a7a0; background: white; box-shadow: 0 18px 38px rgba(37, 32, 30, .17); transition: max-width .3s ease; container-type: inline-size; }
.preview-stage[data-view="desktop"] .preview-shell { max-width: 980px; }
.browser-bar { height: 29px; display: flex; align-items: center; gap: 5px; padding: 0 9px; background: white; color: #797970; }
.browser-bar i { width: 5px; height: 5px; border-radius: 50%; background: #bbb9b2; }
.browser-bar span { margin-left: auto; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.preview-screen { --mock-accent: #f4a9bc; --mock-text: white; position: relative; min-height: 610px; display: flex; flex-direction: column; isolation: isolate; overflow: hidden; background: #5f313d; color: var(--mock-text); }
.preview-screen>img, .preview-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.preview-screen>img { z-index: -2; object-fit: cover; }
.preview-overlay { z-index: -1; background: linear-gradient(180deg, rgba(42,20,29,.18), rgba(42,20,29,.82)); }
.mock-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.3); }
#preview-brand { max-width: 75%; overflow: hidden; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.mock-menu { font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.mock-copy { margin-top: auto; padding: 32px 18px 29px; }
.mock-kicker { margin: 0 0 10px; color: var(--mock-accent); font-size: 8px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.mock-copy h3 { max-width: 95%; margin: 0; font: 500 clamp(43px, 15cqw, 70px)/.92 var(--serif); letter-spacing: -.06em; overflow-wrap: anywhere; }
.mock-tagline { max-width: 520px; margin: 17px 0 0; font-size: 13px; line-height: 1.6; word-break: keep-all; }
.mock-address { margin: 10px 0 0; color: #f1e9e7; font-size: 10px; }
.mock-service { max-width: 430px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 12px 0; border-block: 1px solid rgba(255,255,255,.45); font-size: 10px; }
.mock-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.mock-actions a { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid var(--mock-text); color: inherit; font-size: 10px; font-weight: 900; text-decoration: none; }
.mock-actions a:first-child { border-color: var(--mock-accent); background: var(--mock-accent); color: #251d20; }
.preview-idle { margin: 0; padding: 10px 14px; background: rgba(22,21,20,.88); color: white; font-size: 10px; text-align: center; }
.preview-screen[data-state="generated"] .preview-idle { display: none; }
.preview-screen.theme-minimal { --mock-accent: #1d1d1b; --mock-text: #181816; background: #e5e3dc; }
.theme-minimal .preview-overlay { background: linear-gradient(90deg, rgba(247,246,241,.97), rgba(247,246,241,.62) 63%, rgba(247,246,241,.08)); }
.theme-minimal .mock-header { border-bottom-color: rgba(20,20,18,.3); }
.theme-minimal .mock-copy h3 { font-family: Arial, Helvetica, sans-serif; font-weight: 800; letter-spacing: -.065em; text-transform: uppercase; }
.theme-minimal .mock-tagline, .theme-minimal .mock-address { color: #3f403c; }
.theme-minimal .mock-service { border-color: rgba(20,20,18,.4); }
.preview-screen.theme-hip { --mock-accent: #bcff31; --mock-text: #f9f6ed; background: #171717; }
.theme-hip>img { filter: grayscale(.35) contrast(1.2) saturate(.8); }
.theme-hip .preview-overlay { background: linear-gradient(135deg, rgba(15,15,15,.08), rgba(15,15,15,.9)); }
.theme-hip .mock-header { border: 2px solid var(--mock-accent); }
.theme-hip .mock-copy h3 { font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-style: italic; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.theme-hip .mock-kicker { display: inline-block; padding: 4px 7px; background: var(--mock-accent); color: #151515; transform: rotate(-2deg); }
.theme-hip .mock-service { border-color: var(--mock-accent); }
.preview-screen.theme-custom { --mock-accent: #f2c66d; --mock-text: #fffaf0; background: #39433b; }
.theme-custom .preview-overlay { background: linear-gradient(155deg, rgba(34,48,39,.15), rgba(34,48,39,.88)); }
.theme-custom .mock-copy h3 { font-family: var(--serif); font-style: italic; }
.preview-actions { justify-content: center; }
.replace-photo { cursor: pointer; }
.print-help { max-width: 540px; margin: 12px auto 0; color: var(--muted); font-size: 10px; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@container (min-width: 650px) {
  .preview-screen { min-height: 520px; }
  .mock-header { min-height: 75px; padding-inline: 34px; }
  .mock-copy { width: 58%; padding: 38px 34px 43px; }
  .mock-copy h3 { font-size: clamp(54px, 9cqw, 90px); }
  .preview-screen.theme-minimal .mock-copy { width: 62%; }
  .preview-screen.theme-hip .mock-copy { width: 68%; }
}

@media (min-width: 768px) {
  .shell, .site-header { width: min(100% - 48px, 1240px); }
  .intro { grid-template-columns: .3fr 1fr; padding: 70px 0 67px; }
  .intro h1 { font-size: clamp(58px, 8vw, 88px); }
  .form-panel, .preview-panel { padding: 28px; }
  .preview-heading { flex-direction: row; align-items: center; }
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .field-row .field { min-width: 0; }
}

@media (min-width: 1024px) {
  .workspace { grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); align-items: start; }
  .form-panel { padding: 30px; }
  .preview-panel { position: sticky; top: 16px; }
  .preview-stage { min-height: 700px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  @page { size: landscape; margin: 12mm; }
  body { background: white; }
  .privacy-notice, .site-header, .intro, .form-panel, .preview-heading, .preview-actions, .print-help, .preview-idle { display: none !important; }
  .workspace, .preview-panel, .preview-stage { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: white; }
  .preview-panel { position: static; }
  .preview-shell, .preview-stage[data-view] .preview-shell { width: 100%; max-width: 100%; box-shadow: none; }
  .preview-screen { min-height: 170mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
