:root {
  --ink: #132628;
  --muted: #647476;
  --line: #d9e1df;
  --paper: #ffffff;
  --wash: #f3f6f4;
  --green: #0d6b57;
  --green-dark: #084b3f;
  --mint: #d9eee7;
  --lime: #cbe979;
  --amber: #a76c13;
  --shadow: 0 18px 50px rgba(24, 52, 47, .09);
  --radius: 20px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.topbar { height: 78px; padding: 0 clamp(22px, 4vw, 68px); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--green); color: white; border-radius: 13px; font-weight: 850; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.service-state { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; background: white; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ba9a7; box-shadow: 0 0 0 4px #edf0ef; }
.service-state.connected .state-dot { background: #16a36f; box-shadow: 0 0 0 4px #dbf4ea; }
main { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 70px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 50px; align-items: end; margin: 10px 0 38px; }
.eyebrow, .step-label { font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--green); }
h1 { margin: 12px 0 12px; font-size: clamp(38px, 5vw, 67px); line-height: 1.02; letter-spacing: -.055em; font-weight: 760; }
h1 em { color: var(--green); font-style: normal; }
.hero p { max-width: 650px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.flow-map { display: flex; align-items: center; gap: 14px; padding: 20px; background: #e8efeb; border: 1px solid #d5dfda; border-radius: var(--radius); }
.flow-map div { min-width: 105px; }
.flow-map span, .flow-map strong, .flow-map small { display: block; }
.flow-map span { color: var(--green); font-size: 10px; font-weight: 800; }
.flow-map strong { margin: 6px 0 2px; font-size: 14px; }
.flow-map small { color: var(--muted); font-size: 10px; }
.flow-map i { color: #91a29d; font-style: normal; }
.connection-card { display: grid; grid-template-columns: 1fr minmax(260px, 390px); gap: 24px; align-items: end; background: var(--ink); color: white; border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); }
.connection-card h2 { margin: 5px 0 4px; font-size: 22px; }
.connection-card p { margin: 0; color: #a9b8b7; font-size: 12px; }
.connection-card .step-label { color: var(--lime); }
.demo-access { padding: 12px 14px; border: 1px solid #385052; border-radius: 12px; background: #203537; }
.demo-access strong, .demo-access small { display: block; }
.demo-access strong { color: var(--lime); font-size: 12px; }
.demo-access small { margin-top: 4px; color: #b8c7c5; font-size: 10px; line-height: 1.45; }
.api-key-panel { margin: 10px 0 0; padding: 0 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.api-key-panel summary { padding: 13px 0; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 750; }
.api-key-panel > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding: 0 0 15px; }
.api-key-panel .api-field input { background: white; color: var(--ink); border-color: var(--line); }
.field { display: grid; gap: 7px; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.connection-card .field > span { color: #b8c7c5; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 11px; padding: 12px 13px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(13,107,87,.11); }
textarea { resize: vertical; line-height: 1.55; }
.api-field input { background: #203537; color: white; border-color: #385052; }
.button { border: 1px solid var(--line); border-radius: 11px; padding: 12px 17px; background: white; cursor: pointer; font-weight: 760; font-size: 13px; transition: transform .15s, background .15s, border .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { border-color: var(--lime); background: var(--lime); color: #1f341f; }
.button.ghost { background: transparent; }
.button.compact { padding: 9px 12px; }
.button:disabled { opacity: .42; cursor: not-allowed; }
.privacy-note { display: flex; gap: 16px; align-items: center; padding: 13px 18px; margin: 14px 0 42px; color: #536563; font-size: 11px; border-left: 3px solid var(--green); }
.privacy-note strong { flex: 0 0 auto; color: var(--green-dark); }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin: 6px 0 0; font-size: 27px; letter-spacing: -.035em; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.mode-card { position: relative; min-height: 218px; padding: 22px; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); cursor: pointer; overflow: hidden; transition: border .2s, transform .2s, box-shadow .2s; }
.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mode-card.active { border: 2px solid var(--green); padding: 21px; box-shadow: 0 16px 40px rgba(13,107,87,.12); }
.mode-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--mint); color: var(--green-dark); border-radius: 14px; font-weight: 900; font-size: 14px; }
.mode-number { position: absolute; top: 24px; right: 24px; color: #b7c2bf; font-size: 11px; font-weight: 800; }
.mode-card strong, .mode-card small { display: block; }
.mode-card > strong { margin-top: 18px; font-size: 20px; letter-spacing: -.025em; }
.mode-card > small { margin-top: 3px; color: var(--green); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.mode-card p { margin: 13px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.capability { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.capability.ready { background: #edf1ef; color: #5c6d68; }
.capability.partial { background: #fff0d4; color: var(--amber); }
.capability.live { background: var(--mint); color: var(--green-dark); }
.studio-grid { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(360px, 1fr) minmax(410px, 1fr); gap: 16px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.03em; }
.panel-badge { padding: 7px 10px; border-radius: 8px; background: var(--mint); color: var(--green-dark); font-size: 10px; font-weight: 800; }
.panel-badge.neutral { background: #eef1f0; color: var(--muted); }
.workspace { display: none; padding: 24px 26px 28px; }
.workspace.active { display: block; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; background: var(--wash); border-radius: 12px; margin-bottom: 16px; }
.segmented button, .upload-tabs button, .output-tabs button { border: 0; background: transparent; cursor: pointer; }
.segmented button { padding: 10px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 750; }
.segmented button.active { background: white; color: var(--green-dark); box-shadow: 0 3px 10px rgba(26,51,47,.08); }
.locale-control { display: grid; grid-template-columns: 1fr 1.1fr; gap: 7px 12px; align-items: center; margin: 0 0 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; }
.locale-control > span { color: var(--ink); font-size: 11px; font-weight: 760; }
.locale-control select { padding: 9px 10px; }
.locale-control small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.4; }
.upload-zone { min-height: 122px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; border: 1.5px dashed #a9bbb5; border-radius: 15px; background: #f8faf9; cursor: pointer; }
.upload-zone.dragging { border-color: var(--green); background: var(--mint); }
.upload-zone.compact { min-height: 82px; margin-bottom: 15px; }
.upload-zone input { display: none; }
.upload-zone strong { font-size: 13px; }
.upload-zone small { color: var(--muted); font-size: 10px; }
.upload-symbol { color: var(--green); font-size: 22px; font-weight: 900; }
.or { display: flex; align-items: center; gap: 12px; color: #93a19e; font-size: 10px; margin: 14px 0; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.inline-meta { min-height: 42px; display: flex; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--wash); color: var(--muted); font-size: 11px; }
.terminology-strip { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfb; }
.terminology-strip strong, .terminology-strip small { display: block; }
.terminology-strip strong { font-size: 10px; }
.terminology-strip small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.terminology-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #a2afac; box-shadow: 0 0 0 4px #edf0ef; }
.terminology-strip.connected .terminology-dot { background: #16a36f; box-shadow: 0 0 0 4px #dbf4ea; }
.terminology-strip.error .terminology-dot { background: #c77d15; box-shadow: 0 0 0 4px #fff0d4; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.source-cards { display: grid; gap: 9px; }
.source-card { padding: 14px 15px; text-align: left; border: 1px solid var(--line); background: white; border-radius: 12px; cursor: pointer; }
.source-card.active { border-color: var(--green); background: #f1f8f5; }
.source-card strong, .source-card small { display: block; }
.source-card strong { font-size: 13px; }
.source-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.fixed-options { display: none; margin-top: 18px; }
.fixed-options.active { display: block; }
.context-copy { color: var(--muted); font-size: 11px; line-height: 1.55; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1.2fr .8fr; }
.form-grid.three { grid-template-columns: .6fr 1fr 1fr; }
.upload-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.upload-tabs button { padding: 9px 13px; color: var(--muted); font-size: 12px; font-weight: 750; border-bottom: 2px solid transparent; }
.upload-tabs button.active { color: var(--green); border-bottom-color: var(--green); }
.upload-pane { display: none; }
.upload-pane.active { display: block; }
.image-preview { min-height: 190px; display: grid; place-items: center; background: var(--wash); border-radius: 14px; overflow: hidden; color: var(--muted); font-size: 11px; }
.image-preview img { max-width: 100%; max-height: 360px; object-fit: contain; }
.status-warning { color: var(--amber); font-size: 10px; line-height: 1.5; }
.purpose-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 17px; }
.purpose-choice button { padding: 16px; text-align: left; border: 1px solid var(--line); background: white; border-radius: 13px; cursor: pointer; }
.purpose-choice button.active { border-color: var(--green); background: #eff8f4; }
.purpose-choice strong, .purpose-choice small { display: block; }
.purpose-choice strong { font-size: 14px; }
.purpose-choice small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.consent-row { display: flex; gap: 9px; align-items: flex-start; margin: 13px 0; color: var(--muted); font-size: 11px; }
.consent-row input { width: auto; }
.provider-privacy { margin: 9px 0 0; padding: 9px 11px; color: var(--green-dark); background: #eff8f4; border-radius: 9px; font-size: 10px; line-height: 1.5; }
.conversation { margin: 0; border: 0; border-radius: 0; overflow: hidden; }
.conversation-head { display: flex; justify-content: space-between; padding: 12px 14px; background: var(--wash); font-size: 11px; }
.chat-log { min-height: 260px; max-height: 430px; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; padding: 11px 13px; border-radius: 14px; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; background: #edf5f1; border-bottom-left-radius: 4px; }
.bubble.notice { align-self: flex-start; max-width: 94%; color: #76520f; background: #fff5df; border: 1px solid #efd59d; border-bottom-left-radius: 4px; font-size: 10px; }
.bubble.user { align-self: flex-end; background: var(--ink); color: white; border-bottom-right-radius: 4px; }
.composer { display: flex; gap: 8px; padding: 11px; border-top: 1px solid var(--line); }
.composer input { flex: 1; }
.runner { display: none; }
.runner.active { display: block; }
.response-form { min-height: 500px; max-height: 720px; overflow-y: auto; padding: 18px 20px; background: #fafcfb; }
.runner-actions { display: flex; justify-content: flex-end; padding: 13px 16px; border-top: 1px solid var(--line); }
.runner-placeholder { min-height: 500px; }
.empty-state.compact { min-height: 420px; }
.artifact-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 18px 20px; }
.artifact-summary div { min-width: 0; padding: 12px; border-radius: 12px; background: var(--wash); }
.artifact-summary span, .artifact-summary strong, .artifact-summary small { display: block; }
.artifact-summary span { color: var(--green); font-size: 9px; font-weight: 900; }
.artifact-summary strong { margin: 5px 0 2px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artifact-summary small { color: var(--muted); font-size: 9px; }
.output-tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.output-tabs button { flex: 0 0 auto; padding: 10px 9px; color: var(--muted); font-size: 10px; font-weight: 760; border-bottom: 2px solid transparent; }
.output-tabs button.active { color: var(--green); border-bottom-color: var(--green); }
.output-view { display: none; min-height: 480px; max-height: 660px; overflow: auto; }
.output-view.active { display: block; }
pre { margin: 0; padding: 20px; min-height: 480px; color: #d7ece5; background: #142627; font: 11px/1.65 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.form-preview { min-height: 480px; padding: 22px; background: #fafcfb; }
.empty-state { min-height: 420px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.empty-state span { font-size: 36px; color: #b7c5c1; }
.empty-state strong { color: var(--ink); font-size: 14px; }
.empty-state small { font-size: 10px; }
.preview-title { margin-bottom: 18px; }
.preview-title h3 { margin: 5px 0; font-size: 21px; }
.preview-title p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.preview-group { margin: 16px 0 7px; color: var(--green); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.preview-question { padding: 14px 0; border-bottom: 1px solid var(--line); }
.preview-question label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 720; line-height: 1.45; }
.preview-question input, .preview-question select, .preview-question textarea { background: white; }
.quantity-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(84px, auto); align-items: stretch; gap: 8px; }
.quantity-control input, .quantity-control select { min-width: 0; }
.quantity-fixed-unit { display: grid; min-width: 84px; place-items: center; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #f2f7f5; font-size: 11px; font-weight: 780; }
.quantity-hint { display: block; margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.quantity-hint.error { color: var(--amber); font-weight: 720; }
.privacy-prompt { margin: -1px 0 9px; padding: 8px 10px; color: #76520f; background: #fff5df; border-left: 3px solid #d99c2b; border-radius: 7px; font-size: 10px; line-height: 1.5; }
.preview-options { display: grid; gap: 7px; }
.preview-option { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 10px; }
.preview-option.selected { color: var(--ink); border-color: var(--green); background: #eaf5ef; font-weight: 760; }
.repeat-options { display: grid; gap: 7px; }
.repeat-option { display: flex !important; align-items: flex-start; gap: 8px; margin: 0 !important; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 10px !important; font-weight: 600 !important; cursor: pointer; }
.repeat-option input { width: auto; margin: 1px 0 0; padding: 0; }
.conditional-context { display: block; margin: -3px 0 8px; color: var(--green); font-size: 9px; font-weight: 760; }
.valueset-state { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.valueset-state.error { color: var(--amber); }
.download-bar { display: flex; align-items: center; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); }
.download-bar > div { margin-right: auto; }
.download-bar strong, .download-bar small { display: block; }
.download-bar strong { font-size: 11px; }
.download-bar small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.integration-output { margin: 14px 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.integration-output summary { padding: 13px 14px; cursor: pointer; background: #fafcfb; }
.integration-output summary strong, .integration-output summary small { display: block; }
.integration-output summary strong { font-size: 11px; }
.integration-output summary small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.integration-output pre { min-height: 0; max-height: 260px; padding: 15px; }
footer { display: flex; justify-content: center; gap: 25px; padding: 26px; color: #778683; font-size: 10px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 380px; padding: 13px 16px; color: white; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; transform: translateY(120px); opacity: 0; transition: .25s; z-index: 50; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 1280px) { .studio-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .output-panel { grid-column: 1 / -1; } }
@media (max-width: 900px) { .studio-grid { grid-template-columns: 1fr; } .output-panel { grid-column: auto; position: static; } .hero { grid-template-columns: 1fr; } .flow-map { width: fit-content; } }
@media (max-width: 760px) { main { width: min(100% - 24px, 1440px); padding-top: 28px; } .topbar { padding: 0 14px; } .brand small { display: none; } .hero { gap: 20px; } .flow-map { width: 100%; overflow-x: auto; } .connection-card { grid-template-columns: 1fr; align-items: stretch; } .api-key-panel > div { grid-template-columns: 1fr; } .mode-grid { grid-template-columns: 1fr; } .studio-grid { display: block; } .output-panel { margin-top: 16px; } .form-grid.two, .form-grid.three, .purpose-choice { grid-template-columns: 1fr; } .artifact-summary { grid-template-columns: 1fr; } .download-bar { flex-wrap: wrap; } footer { flex-direction: column; align-items: center; gap: 5px; } }
