:root {
  --paper: #f7f3ec;
  --ink: #171714;
  --muted: #6d6a62;
  --line: #d9d4ca;
  --card: #fffdf8;
  --accent: #f05b42;
  --accent-dark: #d94831;
  --lavender: #b9b0ea;
  --green: #1f7b58;
  --shadow: 0 24px 80px rgba(35, 29, 21, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
[hidden] { display: none !important; }
button, label, select { -webkit-tap-highlight-color: transparent; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

.site-header {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--ink); color: white; border-radius: 2px;
  font-family: Georgia, serif; font-size: 26px; font-style: italic;
}
.brand-wordmark { display: grid; line-height: 1.05; }
.brand-wordmark strong { font-size: 14px; letter-spacing: -.02em; }
.brand-wordmark span { margin-top: 4px; font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }

.header-status {
  display: flex; align-items: center; gap: 10px; color: var(--muted);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px rgba(43,182,115,.12); }
.status-divider { width: 1px; height: 14px; background: var(--line); }

main { overflow: hidden; }
.hero {
  width: min(1320px, calc(100% - 64px));
  min-height: 650px;
  margin: 0 auto;
  padding: 82px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr);
  gap: 80px;
  align-items: center;
}
.eyebrow, .step-kicker {
  margin: 0 0 22px; color: var(--accent); font-size: 11px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 6vw, 96px); line-height: .93; letter-spacing: -.07em;
  font-weight: 500;
}
.hero h1 em { color: var(--accent); font-weight: 500; }
.hero-description { max-width: 610px; margin: 36px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; word-break: keep-all; }
.hero-meta { display: flex; gap: 40px; margin-top: 46px; }
.hero-meta div { display: grid; gap: 5px; }
.hero-meta strong { font-family: Georgia, serif; font-size: 25px; }
.hero-meta span { color: var(--muted); font-size: 11px; letter-spacing: .08em; }

.style-card {
  position: relative; padding: 24px; min-height: 460px; overflow: hidden;
  background: #201e1c; color: white; border-radius: 4px; box-shadow: var(--shadow);
}
.style-card::after {
  content: ""; position: absolute; inset: auto -20% -35% 20%; height: 70%;
  background: radial-gradient(circle, rgba(240,91,66,.28), transparent 62%);
}
.style-card-top { position: relative; z-index: 2; display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .17em; }
.style-check { color: #79d5a3; }
.style-orbit { position: relative; height: 300px; margin-top: 25px; display: grid; place-items: center; }
.orbit-ring { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.orbit-one { width: 230px; height: 230px; animation: spin 18s linear infinite; }
.orbit-two { width: 160px; height: 160px; border-style: dashed; animation: spin 12s linear infinite reverse; }
.orbit-one::before, .orbit-two::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); top: -4px; left: 50%; }
.orbit-two::after { background: var(--lavender); top: auto; bottom: -4px; }
.orbit-core {
  width: 106px; height: 106px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: var(--paper); color: var(--ink); font-family: Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.15;
  box-shadow: 0 0 0 12px rgba(255,255,255,.05);
}
.orbit-tag { position: absolute; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; font-size: 10px; background: #2a2826; }
.tag-one { top: 24px; right: 28px; }.tag-two { left: 18px; top: 142px; }.tag-three { right: 18px; bottom: 30px; }
.style-note { position: relative; z-index: 2; border-top: 1px solid rgba(255,255,255,.13); padding-top: 18px; }
.style-note p { margin: 0 0 6px; font-weight: 700; }
.style-note span { color: rgba(255,255,255,.55); font-size: 12px; }

@keyframes spin { to { transform: rotate(360deg); } }

.workspace { background: #efebe3; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 84px max(32px, calc((100vw - 1320px) / 2)) 100px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 34px; }
.workspace-heading .step-kicker { margin-bottom: 12px; }
.workspace-heading h2, .method-intro h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 5vw, 68px); line-height: 1; letter-spacing: -.055em; font-weight: 500; }
.workspace-heading > p { max-width: 430px; margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); align-items: start; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.composer { padding: 38px; border-right: 1px solid var(--line); }
.field-block { margin-bottom: 26px; }
.field-block > label, fieldset legend, .field-label-row label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 750; letter-spacing: .02em; }
.field-label-row { display: flex; justify-content: space-between; align-items: center; }
.field-label-row > span { color: #8b877e; font-size: 11px; }
.field-label-row b { font-weight: 600; }
.dropzone {
  min-height: 190px; padding: 24px; display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px dashed #c7c1b6; background: #faf8f3; cursor: pointer; transition: .2s ease;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--accent); background: #fff8f5; }
.dropzone.is-processing { pointer-events: none; border-style: solid; border-color: #b8b2a8; opacity: .72; }
.upload-icon { width: 46px; height: 46px; margin-bottom: 14px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; }
.upload-icon svg { width: 20px; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dropzone strong { font-size: 14px; }
.dropzone small { margin-top: 7px; color: #938f86; font-size: 11px; font-weight: 450; }
.image-progress { margin-top: 11px; padding: 12px 14px; border: 1px solid var(--line); background: #f8f5ef; }
.image-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #6f6b63; font-size: 11px; }
.image-progress-row strong { color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.image-progress-track { height: 5px; margin-top: 9px; overflow: hidden; background: #ddd7cc; }
.image-progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .24s ease; }
.image-progress.is-complete .image-progress-track span { background: #67785f; }
.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.preview-item { position: relative; aspect-ratio: 1; overflow: hidden; background: #eee; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item button { position: absolute; top: 5px; right: 5px; width: 23px; height: 23px; border: 0; border-radius: 50%; background: rgba(20,20,18,.78); color: white; cursor: pointer; }
.preview-item small { position: absolute; left: 6px; bottom: 5px; color: white; font-size: 9px; text-shadow: 0 1px 5px #000; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 0; outline: 0; background: white; color: var(--ink);
  padding: 14px 15px; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,20,.06); }
textarea { resize: vertical; min-height: 132px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: #aaa59b; }
.notes-example { margin: 9px 0 0; padding: 11px 13px; border-left: 2px solid #c8b7a9; background: #f8f5ef; color: #7c776e; font-size: 10px; line-height: 1.65; }
.notes-example strong { display: inline-block; margin-right: 7px; color: var(--ink); font-size: 9px; letter-spacing: .08em; }
.select-wrap { position: relative; }
select { appearance: none; cursor: pointer; padding-right: 36px; }
.select-wrap::after { content: "⌄"; position: absolute; right: 14px; top: 11px; pointer-events: none; }
.option-row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; margin: 2px 0 28px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.segmented.length-options { grid-template-columns: repeat(2, 1fr); }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 43px; padding: 6px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; }
.segmented.length-options span { align-content: center; gap: 2px; min-height: 50px; }
.segmented.length-options b { font-size: 11px; }
.segmented.length-options small { font-size: 8px; font-weight: 500; opacity: .72; }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--ink); color: white; }
.generate-button {
  position: relative; width: 100%; height: 58px; padding: 0 10px 0 20px; border: 0; background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: space-between; font-weight: 800; cursor: pointer; overflow: hidden; transition: background .2s, transform .15s;
}
.generate-button:hover { background: var(--accent-dark); }
.generate-button:active { transform: translateY(1px); }
.generate-button:disabled { cursor: wait; background: #8b877e; }
.button-arrow { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); font-size: 18px; }
.button-loader { display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.generate-button.is-loading .button-arrow { display: none; }
.generate-button.is-loading .button-loader { display: block; margin-right: 10px; }
.generation-progress { margin-top: 11px; padding: 13px 14px; border: 1px solid var(--line); background: #f8f5ef; }
.generation-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #6f6b63; font-size: 11px; }
.generation-progress-row strong { color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.generation-progress-track { height: 6px; margin-top: 10px; overflow: hidden; background: #ddd7cc; }
.generation-progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .45s ease; }
.generation-progress.is-complete .generation-progress-track span { background: #67785f; }
.generation-progress.is-error .generation-progress-track span { background: #a64d42; }
.generation-progress.is-error .generation-progress-row span { color: #91453c; }
.privacy-note { margin: 12px 0 0; color: #8b877e; font-size: 10px; line-height: 1.5; text-align: center; }
.privacy-note span { color: var(--accent); }

.result-panel { min-height: 820px; padding: 38px; background: #fff; }
.result-toolbar { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.result-toolbar .step-kicker { margin-bottom: 8px; }
.result-toolbar h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 500; letter-spacing: -.035em; }
.result-actions { display: flex; gap: 8px; }
.result-actions button { padding: 9px 13px; border: 1px solid var(--line); background: white; font-size: 11px; cursor: pointer; }
.result-actions .primary-action { background: var(--ink); color: white; border-color: var(--ink); }
.result-empty { min-height: 650px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.result-empty strong { margin-top: 22px; color: var(--ink); font-size: 15px; }
.result-empty p { font-size: 12px; line-height: 1.65; }
.empty-paper { width: 112px; height: 142px; padding: 26px 19px; border: 1px solid #d9d5cc; box-shadow: 8px 8px 0 #f1eee7; transform: rotate(-2deg); background: white; }
.empty-paper span { display: block; height: 2px; margin-bottom: 14px; background: #e4e0d8; }
.empty-paper span:nth-child(1) { width: 55%; background: var(--accent); }
.generated-article { padding: 34px 4px 20px; }
.generated-article h1 { margin: 0 0 20px; font-family: Georgia, serif; font-size: 34px; line-height: 1.25; letter-spacing: -.035em; }
.generated-article .disclosure { display: inline-block; margin-bottom: 22px; padding: 7px 10px; background: #fff0ec; color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.generated-article p { margin: 0 0 15px; color: #3c3a35; font-size: 14px; line-height: 1.86; white-space: pre-wrap; }
.generated-article .info-block { margin: 24px 0 30px; padding: 18px 20px; background: #f7f4ee; border-left: 3px solid var(--accent); }
.generated-article .info-block p { margin: 6px 0; font-size: 13px; }
.generated-article h3 { margin: 34px 0 14px; font-size: 17px; }
.generated-article .summary { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.generated-article .summary li { margin: 9px 0; color: #3c3a35; font-size: 13px; line-height: 1.6; }
.generated-article .hashtags { margin-top: 28px; color: var(--accent-dark); font-size: 12px; line-height: 1.9; }
.caption-details { margin-top: 30px; border-top: 1px dashed var(--line); padding-top: 18px; }
.caption-details summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.caption-details ol { color: var(--muted); font-size: 11px; line-height: 1.7; }

.method-section { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 110px 0; display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; }
.method-intro .step-kicker { margin-bottom: 18px; }
.method-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.method-list li { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.method-list > li > span { color: var(--accent); font-family: Georgia, serif; font-size: 15px; }
.method-list strong { font-size: 15px; }
.method-list p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

footer { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 26px 0 34px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px); padding: 12px 18px; background: var(--ink); color: white; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 50px; }
  .style-card { min-height: 400px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .composer { border-right: 0; border-bottom: 1px solid var(--line); }
  .result-panel { min-height: 650px; }
  .result-empty { min-height: 430px; }
  .method-section { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 640px) {
  .site-header, .hero, .method-section, footer { width: min(100% - 34px, 1320px); }
  .site-header { padding: 18px 0; }
  .header-status span:not(.status-dot) { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .hero { min-height: auto; padding: 60px 0 72px; }
  .hero h1 { font-size: clamp(54px, 17vw, 76px); }
  .hero-description { font-size: 15px; }
  .hero-meta { gap: 27px; }
  .workspace { padding: 68px 17px 76px; }
  .workspace-heading { display: block; }
  .workspace-heading > p { margin-top: 18px; }
  .composer, .result-panel { padding: 25px 20px; }
  .form-grid, .option-row { grid-template-columns: 1fr; gap: 2px; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .result-panel { min-height: 560px; }
  .result-empty { min-height: 390px; }
  .result-toolbar { gap: 14px; }
  .result-toolbar h2 { font-size: 24px; }
  .generated-article h1 { font-size: 27px; }
  .method-section { padding: 80px 0; }
  footer { gap: 14px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
