:root {
  --ink: #171812;
  --muted: #686b61;
  --paper: #f5f3eb;
  --white: #fffefa;
  --line: #dcd9ce;
  --gold: #c9a84c;
  --gold-deep: #8d7228;
  --gold-soft: #f3e9c7;
  --olive: #394036;
  --coral: #e16f51;
  --font-ko: "Noto Sans KR", sans-serif;
  --font-en: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-ko); word-break: keep-all; }
button, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { max-width: 1180px; margin: 0 auto; min-height: 86px; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-family: var(--font-en); font-size: 20px; letter-spacing: .06em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.back-link { font-size: 14px; font-weight: 700; border-bottom: 1px solid currentColor; }

main { max-width: 1180px; margin: 0 auto; padding: 10px 24px 80px; }
.hero { min-height: 440px; padding: 74px 0 66px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 80px; align-items: end; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow, .step-label { margin: 0 0 15px; color: var(--gold-deep); font-family: var(--font-en); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(40px, 6vw, 72px); line-height: 1.08; letter-spacing: -.055em; }
.hero h1 span { color: var(--gold-deep); }
.hero-description { max-width: 690px; margin: 26px 0 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.hero-description strong { color: var(--ink); }
.hero-notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-notes span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.55); color: var(--muted); font-size: 12px; font-weight: 700; }
.classroom-rule { display: flex; align-items: center; gap: 22px; padding: 24px; background: var(--olive); color: #fff; border-radius: 22px 22px 2px 22px; box-shadow: 16px 16px 0 var(--gold-soft); }
.rule-number { font-family: var(--font-en); color: var(--gold); font-size: 78px; font-weight: 800; line-height: .85; }
.classroom-rule strong { font-size: 14px; }
.classroom-rule p { margin: 7px 0 0; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.6; }

.start-section { padding: 66px 0 34px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 24px; }
.section-heading h2, .progress-head h2, .brief-head h2, .result-copy h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.start-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.start-card { width: 100%; min-height: 144px; padding: 24px; display: flex; align-items: center; gap: 18px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: .18s ease; }
.start-card:hover, .start-card:focus-visible { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 14px 30px rgba(49,45,30,.09); outline: none; }
.start-icon { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 17px; background: var(--gold-soft); color: var(--gold-deep); font-family: var(--font-en); font-size: 28px; font-weight: 800; }
.start-icon.alt { background: #e5e8df; color: var(--olive); }
.start-copy { display: grid; gap: 7px; }
.start-copy strong { font-size: 18px; }
.start-copy small { color: var(--muted); line-height: 1.55; }
.start-arrow { margin-left: auto; font-size: 22px; }

.workspace { padding: 54px 0 20px; }
.progress-panel { margin-bottom: 22px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.5); }
.progress-head, .brief-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.progress-head .step-label, .brief-head .step-label { margin-bottom: 8px; }
#progress-value { color: var(--gold-deep); font-family: var(--font-en); font-weight: 800; }
.progress-track { height: 4px; margin: 20px 0 17px; background: #ddd9cc; border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; width: 16.667%; height: 100%; background: var(--gold); transition: width .3s ease; }
.progress-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; color: #99998f; font-size: 12px; font-weight: 700; }
.progress-steps li { display: flex; gap: 6px; align-items: center; }
.progress-steps li.is-current, .progress-steps li.is-complete { color: var(--ink); }
.progress-steps li.is-complete span { color: var(--gold-deep); }
.progress-steps span { font-family: var(--font-en); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 20px; align-items: start; }
.chat-card, .brief-card { border: 1px solid var(--line); background: var(--white); border-radius: 20px; overflow: hidden; }
.chat-head { min-height: 72px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.coach-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: var(--gold); font-family: var(--font-en); font-weight: 800; }
.chat-head > div:nth-child(2) { display: grid; gap: 3px; }
.chat-head strong { font-size: 14px; }
.chat-head small { color: var(--muted); font-size: 11px; }
.chat-head small i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #53a26c; }
.text-button { margin-left: auto; padding: 7px; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.messages { min-height: 300px; max-height: 480px; padding: 26px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; background: #fbfaf5; }
.message { max-width: 82%; padding: 13px 15px; border-radius: 3px 15px 15px 15px; background: #eeece3; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.message.is-user { align-self: flex-end; border-radius: 15px 3px 15px 15px; background: var(--olive); color: #fff; }
.message small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.message.is-user small { color: rgba(255,255,255,.58); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .2s; }.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { opacity: .2; transform: translateY(-2px); } }
.quick-replies { padding: 0 20px 12px; display: flex; flex-wrap: wrap; gap: 7px; background: #fbfaf5; }
.quick-replies button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; }
.composer { padding: 16px 18px; border-top: 1px solid var(--line); }
.source-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.source-button { min-height: 34px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; background: #fbfaf5; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.source-button span { color: var(--gold-deep); font-family: var(--font-en); font-size: 16px; line-height: 1; }
.source-button:hover, .source-button:focus-visible { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); outline: none; }
.composer textarea { width: 100%; min-height: 78px; padding: 0; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); line-height: 1.6; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.composer-foot > span { color: #a4a298; font-family: var(--font-en); font-size: 11px; }
.send-button, .primary-button, .secondary-button { border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; }
.send-button { padding: 10px 14px; background: var(--ink); color: #fff; font-size: 13px; }
.send-button:disabled { opacity: .55; cursor: wait; }
.brief-card { padding: 24px; }
.brief-head { margin-bottom: 22px; }
.brief-head h2 { font-size: 23px; }
.saved-state { padding: 5px 8px; border-radius: 999px; background: #edf3e7; color: #537048; font-size: 10px; font-weight: 800; }
.brief-card dl { margin: 0; display: grid; gap: 16px; }
.brief-card dl div { padding-bottom: 15px; border-bottom: 1px solid #ece9de; }
.brief-card dt { margin-bottom: 6px; color: var(--gold-deep); font-size: 11px; font-weight: 800; }
.brief-card dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.scope-note { margin-top: 20px; padding: 15px; border-radius: 12px; background: var(--gold-soft); }
.scope-note strong { font-size: 12px; }
.scope-note p { margin: 5px 0 0; color: #6d623f; font-size: 11px; line-height: 1.55; }

.result-section { margin-top: 60px; padding: 42px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 42px; border-radius: 24px; background: var(--olive); color: #fff; }
.result-copy > p:not(.step-label) { color: rgba(255,255,255,.65); line-height: 1.7; }
.handoff-steps { padding: 0; margin: 26px 0; display: grid; gap: 12px; list-style: none; }
.handoff-steps li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.8); font-size: 13px; }
.handoff-steps span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); color: var(--gold); font-family: var(--font-en); font-weight: 800; }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.primary-button, .secondary-button { padding: 13px 16px; }
.primary-button { background: var(--gold); color: #18170f; }
.secondary-button { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff; }
.document-preview { min-width: 0; border-radius: 14px; overflow: hidden; background: #171812; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.preview-head { height: 42px; padding: 0 14px; display: flex; align-items: center; gap: 6px; background: #292b27; }
.preview-head > span { width: 8px; height: 8px; border-radius: 50%; background: #666961; }
.preview-head > span:first-child { background: var(--coral); }
.preview-head strong { margin-left: 8px; color: #aaa; font-family: var(--font-en); font-size: 10px; }
.document-preview pre { height: 420px; margin: 0; padding: 22px; overflow: auto; color: #d8d9d4; font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.privacy-note { margin-top: 26px; padding: 18px 20px; display: flex; align-items: center; gap: 24px; border: 1px dashed #c4bfae; border-radius: 14px; color: var(--muted); font-size: 12px; }
.privacy-note strong { flex: 0 0 auto; color: var(--ink); }
.privacy-note p { margin: 0; line-height: 1.6; }

.detail-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 24px; background: var(--white); color: var(--ink); box-shadow: 0 30px 90px rgba(23,24,18,.3); }
.detail-dialog::backdrop { background: rgba(23,24,18,.62); backdrop-filter: blur(3px); }
.detail-dialog[open] { animation: dialog-in .2s ease-out; }
.detail-dialog-inner { position: relative; padding: 36px; }
.dialog-close { position: absolute; top: 17px; right: 17px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #efede5; color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { background: var(--gold-soft); color: var(--ink); outline: 2px solid var(--gold); outline-offset: 2px; }
.detail-kicker { margin: 0 48px 22px 0; color: var(--gold-deep); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.detail-symbol { width: 52px; height: 52px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 16px; background: var(--gold-soft); color: var(--gold-deep); font-family: var(--font-en); font-size: 29px; font-weight: 800; }
.detail-dialog h2 { margin: 0; font-size: clamp(25px, 4vw, 32px); line-height: 1.3; letter-spacing: -.035em; }
.detail-description { margin: 13px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.detail-benefits { margin: 24px 0; padding: 0; display: grid; gap: 11px; list-style: none; }
.detail-benefits li { position: relative; padding-left: 24px; color: #45483f; font-size: 14px; line-height: 1.6; }
.detail-benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold-deep); font-weight: 900; }
.detail-outcome { margin-bottom: 20px; padding: 16px 17px; border-radius: 14px; background: #f1efe6; }
.detail-outcome strong { font-size: 13px; }
.detail-outcome p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-primary, .detail-secondary { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 800; cursor: pointer; }
.detail-primary { gap: 8px; background: var(--ink); color: #fff; }
.detail-primary:hover, .detail-primary:focus-visible { background: var(--olive); outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.detail-secondary { margin-top: 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.detail-secondary:hover, .detail-secondary:focus-visible { border-color: var(--gold); color: var(--ink); outline: none; }
.detail-footnote { margin: 14px 8px 0; color: #8a8b82; font-size: 10px; line-height: 1.6; text-align: center; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

footer { max-width: 1180px; min-height: 80px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 38px; padding: 50px 0; }
  .classroom-rule { max-width: 380px; }
  .start-options, .work-grid, .result-section { grid-template-columns: 1fr; }
  .progress-steps { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .result-section { padding: 28px; }
}
@media (max-width: 520px) {
  .site-header { min-height: 72px; padding-inline: 16px; }
  .brand small { display: none; }
  .back-link { font-size: 12px; }
  main { padding: 0 16px 56px; }
  .hero { min-height: auto; padding-top: 42px; }
  .hero h1 { font-size: 39px; }
  .hero-description { font-size: 15px; }
  .start-section { padding-top: 48px; }
  .start-card { min-height: 126px; padding: 19px; }
  .start-icon { width: 48px; height: 48px; }
  .message { max-width: 91%; }
  .detail-dialog-inner { padding: 30px 21px 24px; }
  .detail-kicker { margin-bottom: 18px; }
  .privacy-note { align-items: flex-start; flex-direction: column; gap: 7px; }
  footer { padding-inline: 16px; }
}

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