* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #19171f;
  background: #f7f6fa;
  font-synthesis: none;
  --ink: #19171f;
  --muted: #6f6978;
  --canvas: #f7f6fa;
  --paper: #fff;
  --line: #e8e4ee;
  --violet: #6c45e8;
  --violet-hover: #5835c9;
  --violet-soft: #f0ebff;
  --lime: #ddf77a;
  --error: #b42318;
  --shadow: 0 22px 70px rgba(35, 25, 58, 0.08);
}
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 82% 8%, rgba(108, 69, 232, 0.08), transparent 26%), var(--canvas); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(108, 69, 232, 0.24); outline-offset: 2px; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header { height: 76px; border-bottom: 1px solid rgba(223, 218, 230, 0.8); background: rgba(247, 246, 250, 0.82); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 11px; align-items: center; font-weight: 790; letter-spacing: -0.04em; font-size: 18px; }
.brand-mark { width: 29px; height: 29px; display: grid; align-content: center; gap: 3px; padding: 7px 6px; border-radius: 9px; background: var(--ink); transform: rotate(-3deg); }
.brand-mark i { display: block; height: 2px; border-radius: 9px; background: white; }
.brand-mark i:nth-child(1) { width: 10px; }
.brand-mark i:nth-child(2) { width: 17px; }
.brand-mark i:nth-child(3) { width: 13px; }
.header-meta { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 12px; font-weight: 650; }
.header-meta a:hover { color: var(--ink); }
.mock-badge { padding: 7px 10px; border: 1px solid #d9d2e5; border-radius: 8px; color: #5b5364; font-size: 10px; letter-spacing: 0.08em; background: rgba(255, 255, 255, 0.7); }

.hero { min-height: 410px; padding: 82px 0 58px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 64px; }
.hero-copy { max-width: 760px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: 0.13em; }
.eyebrow > span { width: 17px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { margin: 22px 0 22px; font-size: clamp(44px, 6.1vw, 72px); line-height: 1.06; letter-spacing: -0.07em; font-weight: 780; }
.hero h1 em { color: var(--violet); font-style: normal; }
.hero-copy > p { max-width: 620px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.75; word-break: keep-all; }
.hero-proof { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.6); overflow: hidden; }
.hero-proof div { min-width: 112px; padding: 20px 17px; display: grid; gap: 8px; border-right: 1px solid var(--line); }
.hero-proof div:last-child { border-right: 0; }
.hero-proof strong { font-size: 22px; letter-spacing: -0.04em; }
.hero-proof span { color: var(--muted); font-size: 11px; line-height: 1.45; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.panel { min-height: 742px; padding: 34px; }
.input-panel { border-right: 1px solid var(--line); }
.result-panel { background: linear-gradient(145deg, #fbfaff 0%, #f7f4ff 100%); }
.panel-heading { min-height: 50px; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.panel-heading > div { display: flex; gap: 13px; align-items: flex-start; }
.step-number { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--violet); font-size: 10px; font-weight: 800; }
.panel-heading p { margin: 0 0 3px; color: #968ea0; font-size: 9px; font-weight: 800; letter-spacing: 0.12em; }
.panel-heading h2 { margin: 0; font-size: 22px; letter-spacing: -0.045em; }
.privacy-note, .result-state { padding-top: 5px; color: #8e8797; font-size: 10px; font-weight: 700; }
.result-state { color: var(--violet); letter-spacing: 0.08em; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 23px; padding: 4px; border-radius: 13px; background: #f1eff4; }
.mode-switch button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.mode-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 2px 10px rgba(32, 24, 46, 0.07); }
.source-field label, .tone-field legend { display: block; margin-bottom: 9px; color: #39343f; font-size: 12px; font-weight: 760; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row span { color: #9b95a2; font-size: 10px; }
textarea, .url-control { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color 150ms ease, box-shadow 150ms ease; }
textarea { min-height: 184px; padding: 16px 17px; resize: vertical; color: var(--ink); font-size: 14px; line-height: 1.7; }
textarea::placeholder, input::placeholder { color: #aaa4b0; }
textarea:focus, .url-control:focus-within { outline: 0; border-color: #b9a7f3; box-shadow: 0 0 0 4px rgba(108, 69, 232, 0.08); }
.url-control { min-height: 52px; padding: 0 14px; display: flex; align-items: center; gap: 10px; }
.url-control span { color: var(--violet); font-weight: 800; }
.url-control input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.field-help { margin: 9px 2px 0; color: #8d8694; font-size: 10px; line-height: 1.55; }
.curated-example { margin-top: 13px; }
.curated-example > span { color: #8d8694; font-size: 9px; font-weight: 760; letter-spacing: 0.04em; }
.curated-example button { width: 100%; margin-top: 7px; padding: 12px 13px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; border: 1px solid #d9cef4; border-radius: 12px; background: linear-gradient(135deg, #fff 0%, #f7f3ff 100%); color: var(--ink); cursor: pointer; text-align: left; }
.curated-example button:hover { border-color: var(--violet); box-shadow: 0 8px 20px rgba(108,69,232,0.08); }
.curated-example i { grid-row: 1 / 3; padding: 5px 6px; border-radius: 6px; background: var(--lime); color: #383433; font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: 0.08em; }
.curated-example strong { font-size: 11px; line-height: 1.35; }
.curated-example small { margin-top: 2px; color: #8d8694; font-size: 8px; line-height: 1.35; }
.samples { min-height: 42px; padding-top: 11px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.samples > span { color: #97909e; font-size: 10px; margin-right: 2px; }
.samples button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #5c5664; font-size: 10px; cursor: pointer; }
.samples button:hover { border-color: #bcaaf4; color: var(--violet); background: var(--violet-soft); }
.tone-field { margin: 24px 0 0; padding: 0; border: 0; }
.tone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tone-grid button { min-height: 92px; padding: 11px; display: grid; justify-items: start; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; text-align: left; }
.tone-grid button:hover { border-color: #c9baf5; }
.tone-grid button[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.tone-icon { color: var(--violet); font-size: 17px; line-height: 1; }
.tone-grid strong { font-size: 12px; }
.tone-grid small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.form-error { min-height: 18px; margin: 12px 2px 5px; color: var(--error); font-size: 11px; }
.generate-button { width: 100%; min-height: 54px; padding: 0 18px 0 22px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 14px; background: var(--violet); color: white; font-size: 14px; font-weight: 760; cursor: pointer; box-shadow: 0 12px 24px rgba(108, 69, 232, 0.22); transition: background 150ms ease, transform 150ms ease; }
.generate-button:hover { background: var(--violet-hover); transform: translateY(-1px); }
.generate-button:disabled { cursor: wait; opacity: 0.72; transform: none; }
.button-arrow { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,0.15); font-size: 18px; }

.empty-result { min-height: 610px; display: grid; align-content: center; justify-items: center; text-align: center; }
.story-stack { position: relative; width: 154px; height: 160px; margin-bottom: 25px; }
.story-stack > span, .story-stack article { position: absolute; width: 116px; height: 142px; left: 19px; border: 1px solid #ded5f4; border-radius: 17px; background: white; }
.story-stack > span:first-child { transform: rotate(-8deg) translate(-9px, 3px); opacity: 0.48; }
.story-stack > span:nth-child(2) { transform: rotate(7deg) translate(10px, 2px); opacity: 0.72; }
.story-stack article { z-index: 2; padding: 18px 15px; text-align: left; box-shadow: 0 17px 35px rgba(67, 44, 126, 0.1); }
.story-stack b { color: var(--violet); font-size: 8px; letter-spacing: 0.1em; }
.story-stack i { display: block; height: 4px; margin-top: 12px; border-radius: 9px; background: #e9e4f1; }
.story-stack i:nth-of-type(2) { width: 68%; }
.story-stack i:nth-of-type(3) { width: 82%; }
.story-stack strong { position: absolute; right: 14px; bottom: 12px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 11px; background: var(--lime); font-size: 17px; }
.empty-result h3 { margin: 0; font-size: 21px; line-height: 1.4; letter-spacing: -0.045em; }
.empty-result > p { max-width: 330px; margin: 11px 0 23px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.empty-result ol { margin: 0; padding: 0; display: flex; gap: 7px; list-style: none; }
.empty-result li { padding: 7px 9px; display: flex; align-items: center; gap: 5px; border: 1px solid #e6dff2; border-radius: 9px; color: #756c80; background: rgba(255,255,255,0.72); font-size: 9px; }
.empty-result li span { color: var(--violet); font-weight: 800; }

.loading-result { min-height: 610px; display: grid; align-content: center; justify-items: center; }
.scanner { width: 170px; height: 170px; padding: 20px; display: grid; place-items: center; border-radius: 34px; background: white; box-shadow: 0 18px 50px rgba(71, 45, 135, 0.1); overflow: hidden; position: relative; }
.scanner::before { content: "STORY\A DNA"; white-space: pre; width: 108px; height: 128px; padding: 20px; color: var(--violet); border: 1px solid #ded5f4; border-radius: 17px; font-size: 13px; font-weight: 800; line-height: 1.25; background: linear-gradient(#fff, #faf8ff); }
.scanner span { position: absolute; left: 20px; right: 20px; height: 2px; background: var(--violet); box-shadow: 0 0 14px rgba(108,69,232,0.8); animation: scan 1.25s ease-in-out infinite alternate; }
.loading-result > p { margin: 25px 0 18px; font-size: 16px; font-weight: 730; }
.loading-result ul { margin: 0; padding: 0; display: flex; gap: 8px; list-style: none; }
.loading-result li { color: #a19aa8; font-size: 9px; }
.loading-result li::before { content: "○"; margin-right: 4px; }
.loading-result li.active { color: var(--violet); }
.loading-result li.active::before { content: "●"; }
@keyframes scan { from { transform: translateY(-53px); } to { transform: translateY(53px); } }

.ready-result { padding-top: 1px; }
.result-actions-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.generated-badge { display: inline-flex; align-items: center; gap: 7px; color: #625b6b; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; }
.generated-badge i { width: 8px; height: 8px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 0 3px rgba(221,247,122,0.32); }
.result-actions-top button, .regenerate-button { border: 0; background: transparent; color: var(--violet); font-size: 10px; font-weight: 750; cursor: pointer; }
.ready-result > h3 { margin: 0 0 22px; font-size: 25px; line-height: 1.35; letter-spacing: -0.05em; }
.dna-section { padding: 17px; border: 1px solid #e4dcf3; border-radius: 16px; background: rgba(255,255,255,0.68); }
.section-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-label span { color: var(--violet); font-size: 9px; font-weight: 850; letter-spacing: 0.11em; }
.section-label small { color: #9d96a4; font-size: 8px; }
.dna-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dna-grid div { min-height: 56px; padding: 10px 11px; border-radius: 10px; background: white; }
.dna-grid div:last-child { grid-column: 1 / -1; background: var(--ink); }
.dna-grid dt { margin-bottom: 4px; color: #9b94a2; font-size: 8px; font-weight: 750; }
.dna-grid dd { margin: 0; color: #3e3944; font-size: 10px; font-weight: 670; line-height: 1.45; }
.dna-grid div:last-child dt { color: #a9a2b0; }
.dna-grid div:last-child dd { color: white; }
.trailer-sheet { margin-top: 12px; padding: 22px 22px 20px; border: 1px solid #e2daef; border-radius: 16px; background: white; box-shadow: 0 12px 30px rgba(54, 39, 88, 0.06); }
.sheet-meta { display: flex; justify-content: space-between; margin-bottom: 17px; color: #9d96a4; font-size: 8px; font-weight: 760; letter-spacing: 0.07em; }
.sheet-meta span:last-child { color: var(--violet); }
.trailer-sheet p { margin: 0; color: #312d36; font-family: ui-serif, "Noto Serif KR", Georgia, serif; font-size: 14px; line-height: 1.82; word-break: keep-all; }
.paragraph-divider { display: flex; align-items: center; gap: 8px; margin: 15px 0; }
.paragraph-divider span { height: 1px; flex: 1; background: #eeeaf2; }
.paragraph-divider i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--violet); }
.result-disclosure { margin: 10px 3px 0; color: #918a98; font-size: 8px; line-height: 1.5; }
.regenerate-button { width: 100%; margin-top: 11px; padding: 11px; border: 1px solid #ddd4ee; border-radius: 11px; background: rgba(255,255,255,0.62); }
.regenerate-button:hover { background: white; border-color: #c8b7f4; }

.how-it-works { padding: 108px 0 115px; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 100px; }
.how-it-works h2 { margin: 18px 0 0; font-size: clamp(34px, 4vw, 51px); line-height: 1.15; letter-spacing: -0.06em; }
.how-it-works ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid #dcd7e2; }
.how-it-works li { padding: 24px 0; display: grid; grid-template-columns: 48px 1fr; gap: 18px; border-bottom: 1px solid #dcd7e2; }
.how-it-works li > span { color: var(--violet); font-size: 10px; font-weight: 800; }
.how-it-works strong { font-size: 16px; }
.how-it-works p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
footer { padding: 29px 0 38px; border-top: 1px solid #dfdbe4; }
footer .shell { display: flex; align-items: center; justify-content: space-between; color: #8c8593; font-size: 10px; }
footer span { font-weight: 800; letter-spacing: 0.09em; }
footer p { margin: 0; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 35px; padding-top: 66px; }
  .hero-proof { width: fit-content; }
  .workspace { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel { min-height: auto; }
  .result-panel { min-height: 720px; }
  .how-it-works { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1180px); }
  .site-header { height: 64px; }
  .header-meta { gap: 0; }
  .header-meta a { display: none; }
  .mock-badge { font-size: 8px; }
  .hero { min-height: 0; padding: 52px 0 37px; }
  .hero h1 { margin-top: 16px; font-size: 43px; }
  .hero-copy > p { font-size: 14px; }
  .hero-proof { width: 100%; }
  .hero-proof div { min-width: 0; padding: 15px 11px; }
  .hero-proof strong { font-size: 18px; }
  .workspace { width: 100%; border-left: 0; border-right: 0; border-radius: 0; }
  .panel { padding: 25px 19px; }
  .panel-heading { margin-bottom: 22px; }
  .panel-heading h2 { font-size: 20px; }
  .privacy-note { display: none; }
  textarea { min-height: 206px; }
  .samples { align-items: flex-start; }
  .samples > span { flex-basis: 100%; }
  .tone-grid { grid-template-columns: 1fr; }
  .tone-grid button { min-height: 66px; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 2px; }
  .tone-icon { grid-row: 1 / 3; align-self: center; }
  .empty-result, .loading-result { min-height: 560px; }
  .empty-result ol { flex-wrap: wrap; justify-content: center; }
  .dna-grid { grid-template-columns: 1fr; }
  .dna-grid div:last-child { grid-column: auto; }
  .ready-result > h3 { font-size: 22px; }
  .trailer-sheet { padding: 19px 17px; }
  .trailer-sheet p { font-size: 15px; }
  .how-it-works { padding: 80px 0; }
  footer .shell { align-items: flex-start; flex-direction: column; gap: 8px; }
}

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