/* 개발술사 고객 화면. 로고 색(남보라 #190d37 · 금색 #f4bf49 · 크림)을 바탕으로, 휴대폰 먼저. 밝은 화면이 기본, 어두운 모드도 지원. */
:root {
    --bg: #fffaf0;
    --surface: #ffffff;
    --surface-2: #f8f2e4;
    --border: #ece3cf;
    --text: #1d1535;
    --muted: #6e6787;
    --navy: #190d37;
    --navy-2: #2b1d5e;
    --gold: #f4bf49;
    --gold-2: #e9ad2a;
    --primary: #190d37;
    --primary-ink: #ffffff;
    --primary-hover: #2b1d5e;
    --focus: #f4bf49;
    --ok: #18975f;
    --ok-soft: #e1f5ec;
    --bad: #d23f3f;
    --bad-soft: #fbe7e7;
    --shadow: 0 1px 2px rgba(25, 13, 55, .06), 0 6px 20px rgba(25, 13, 55, .06);
    --radius: 16px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #110a26;
        --surface: #1b1240;
        --surface-2: #251a50;
        --border: #342869;
        --text: #f3eefe;
        --muted: #a9a1c6;
        --primary: #f4bf49;
        --primary-ink: #190d37;
        --primary-hover: #ffd06b;
        --ok: #3ccf8e;
        --ok-soft: #173a2c;
        --bad: #ff7a7a;
        --bad-soft: #43201f;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* ── 버튼 ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 20px;
    border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
    transition: background .15s, transform .1s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-gold { background: var(--gold); color: #190d37; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* ── 머리·바닥 ── */
.top {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a:not(.btn) { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.top-nav a:not(.btn):hover, .top-nav a.current { color: var(--text); }
.top-nav .btn { margin-left: 6px; }

.foot { margin-top: 80px; border-top: 1px solid var(--border); padding: 32px 0 40px; }
.foot-in { display: grid; gap: 16px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { border-radius: 6px; }
.foot-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.foot-brand span { color: var(--muted); font-size: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: var(--text); }
.foot-biz { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; color: var(--muted); font-size: 12.5px; font-style: normal; line-height: 1.6; }
.foot-copy { margin: 0; color: var(--muted); font-size: 13px; }
.foot-privacy { color: var(--text); font-weight: 700; text-decoration: none; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal-table { overflow-x: auto; }
.legal-table table { border-collapse: collapse; min-width: 640px; font-size: 14px; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
@media (min-width: 720px) {
    .foot-in { grid-template-columns: 1fr auto; align-items: center; }
    .foot-biz, .foot-copy { grid-column: 1 / -1; }
}

/* ── 첫 화면 ── */
.hero { background: var(--navy); color: #fff; overflow: hidden; }
.hero-in { display: grid; gap: 24px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.eyebrow { margin: 0 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(34px, 8vw, 56px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { margin: 18px 0 28px; color: #d8d2ee; font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .btn-primary { background: var(--gold); color: #190d37; }
.hero .btn-primary:hover { background: #ffd06b; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero .btn-ghost:hover { border-color: #fff; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(220px, 56vw); height: auto; border-radius: 28px; }
@media (min-width: 820px) {
    .hero-in { grid-template-columns: 1.15fr .85fr; padding-top: 72px; padding-bottom: 72px; }
    .hero-art img { width: 360px; }
}

.quick { display: grid; gap: 12px; margin-top: -28px; position: relative; }
.quick-card {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px;
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    text-decoration: none; transition: transform .15s, border-color .15s;
}
.quick-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.quick-ico {
    grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 20px;
    background: var(--navy); color: var(--gold);
}
.quick-card strong { font-size: 17px; }
.quick-card span:last-child { color: var(--muted); font-size: 14px; }
@media (min-width: 720px) { .quick { grid-template-columns: repeat(3, 1fr); } }

.block { margin-top: 64px; }
.block h2, .cta-band h2 { font-size: 24px; margin-bottom: 20px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; }
.block-head a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.steps b {
    flex: none; width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; background: var(--gold); color: #190d37; font-size: 15px;
}
.steps div { display: flex; flex-direction: column; }
.steps span { color: var(--muted); font-size: 15px; }
@media (min-width: 820px) {
    .steps { grid-template-columns: repeat(4, 1fr); }
    .steps li { flex-direction: column; }
}

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 15px; }

.cta-band {
    margin-top: 64px; padding: 32px 24px; border-radius: 24px;
    background: var(--navy); color: #fff;
    display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; color: #d8d2ee; }
@media (min-width: 720px) { .cta-band { flex-direction: row; justify-content: space-between; align-items: center; padding: 40px; } }

/* ── 작업 사례 ── */
.works { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.work-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.work-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.work-thumb { aspect-ratio: 16 / 10; background: var(--navy); display: grid; place-items: center; overflow: hidden; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb img.work-thumb-empty { width: 40%; height: auto; object-fit: contain; opacity: .9; }
.work-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.work-body span { color: var(--muted); font-size: 14px; }
.tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.work-hero, .work-img { width: 100%; border-radius: var(--radius); margin: 20px 0; border: 1px solid var(--border); }

/* ── 공통 페이지·카드 ── */
.page { padding-top: 32px; }
.page-title { font-size: clamp(26px, 6vw, 32px); font-weight: 800; }
.page-lead { color: var(--muted); margin: 8px 0 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card-title { font-size: 18px; margin-bottom: 12px; }
.empty { text-align: center; padding: 40px 20px; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; }
.alert-bad { background: var(--bad-soft); color: var(--bad); }
.note { background: var(--surface-2); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin: 0 0 16px; }
.prose { white-space: pre-wrap; }

/* ── 의뢰서(단계) ── */
.progress { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: step; }
.progress li { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 10px; border-top: 4px solid var(--border); counter-increment: step; }
.progress li::before { content: counter(step) ". "; }
.progress li.on { color: var(--text); border-color: var(--gold); }
.step { border: 1px solid var(--border); margin: 0 0 16px; min-width: 0; }
.step legend { font-size: 20px; font-weight: 800; padding: 0; margin-bottom: 16px; float: left; width: 100%; }
.step legend + * { clear: both; }
.js .step:not(.active) { display: none; }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.step-nav .btn { min-width: 110px; }
.js-off .step-nav [data-next], .js-off .step-nav [data-prev] { display: none; }

.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.field-label small, p.field-label small { font-weight: 500; color: var(--muted); }
.field input:not([type=file]), .field textarea, .field select, .copy-row input {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1.5px solid var(--border); background: var(--bg);
    font-size: 16px; /* iOS 확대 방지 */
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field-error { display: block; color: var(--bad); font-size: 14px; margin-top: 4px; }
.field-error:empty { display: none; }

.choice-2 { display: grid; gap: 10px; margin-bottom: 20px; }
@media (min-width: 560px) { .choice-2 { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input, .pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: flex; flex-direction: column; padding: 16px; border-radius: 14px; border: 1.5px solid var(--border); transition: border-color .15s, background .15s; }
.choice small { color: var(--muted); font-size: 14px; }
.choice input:checked + span { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.choice input:focus-visible + span, .pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill { position: relative; cursor: pointer; }
.pill span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--border); font-size: 15px; font-weight: 600; }
.pill input:checked + span { border-color: var(--gold); background: var(--gold); color: #190d37; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }

.drop {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    position: relative; padding: 22px 16px; border: 1.5px dashed var(--border); border-radius: 12px;
    text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover { border-color: var(--gold); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-ico { font-size: 22px; line-height: 1; color: var(--gold-2); }
.drop-text { color: var(--muted); font-size: 15px; }
.drop-text b { color: var(--text); font-weight: 600; }
.dragging .drop { border-style: solid; border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
@media (hover: none) { .drop-text b { display: none; } }

.file-msg { margin: 6px 0 0; color: var(--bad); font-size: 14px; }
.file-msg:empty { display: none; }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; text-align: left; }
.file-list:empty { display: none; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--surface-2); }
.file-list img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.file-list .file-ico { width: 36px; text-align: center; flex: none; }
.file-list .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list small { color: var(--muted); flex: none; }
.file-rm {
    flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent;
    color: var(--muted); cursor: pointer; font-size: 14px;
}
.file-rm:hover { background: var(--bad-soft); color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── 의뢰 화면(/r) ── */
.welcome { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.welcome h2 { font-size: 20px; margin-bottom: 8px; }
.welcome p { margin: 0 0 12px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 10px; }
.copy-row input { flex: 1; min-width: 0; font-size: 14px; }
.req-head { margin-bottom: 16px; }
.req-head .muted { margin: 6px 0 0; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 13px; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.done::before, .timeline li.now::before { background: var(--gold); }
.timeline .dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border); margin-bottom: 6px; }
.timeline li.done .dot { background: var(--gold); border-color: var(--gold); }
.timeline li.now .dot { background: var(--surface); border-color: var(--gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 30%, transparent); }
.timeline li.done, .timeline li.now { color: var(--text); }
.timeline li.now strong { color: var(--text); }
.timeline div { display: flex; flex-direction: column; line-height: 1.3; }
.timeline small { color: var(--muted); font-size: 12px; }
.timeline.dim { opacity: .55; }
.status-hint { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15px; }
.status-off { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 0 0 16px; }
.facts div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.files { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files a { text-decoration: none; font-weight: 600; }
.files small { color: var(--muted); }

.chat { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { margin: 0 0 16px; }
.chat li { display: flex; gap: 8px; align-items: flex-end; }
.chat li.me { justify-content: flex-end; }
.chat .avatar { border-radius: 50%; flex: none; }
.bubble-wrap { display: flex; flex-direction: column; gap: 4px; max-width: 80%; }
.chat li.me .bubble-wrap { align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; background: var(--surface-2); border-bottom-left-radius: 6px; }
.chat li.me .bubble { background: var(--primary); color: var(--primary-ink); border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.bubble-img img { max-width: 260px; max-height: 260px; border-radius: 14px; border: 1px solid var(--border); }
.bubble-file { display: inline-block; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); text-decoration: none; font-size: 14px; font-weight: 600; }
.bubble-file small { color: var(--muted); font-weight: 400; }
.chat time { font-size: 12px; color: var(--muted); }

.composer { border-top: 1px solid var(--border); padding-top: 14px; }
.composer textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--bg); resize: vertical; font-size: 16px; }
.composer textarea:focus { outline: none; border-color: var(--gold); }
.composer-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 8px; }
.attach { position: relative; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 4px; }
.attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.attach small { font-weight: 500; }
.composer .file-list { margin: 8px 0 0; }

/* 메시지 카드 전체가 놓는 곳: 파일을 끌고 오면 위에 안내를 덮는다. */
.chat-card { position: relative; }
.drop-overlay {
    position: absolute; inset: 0; z-index: 2; display: none; place-items: center;
    border: 2px dashed var(--gold); border-radius: inherit;
    background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(2px);
    font-weight: 700; font-size: 17px; pointer-events: none;
}
.chat-card.dragging .drop-overlay { display: grid; }

.next-card { display: flex; flex-direction: column; gap: 12px; }
.next-card div { display: flex; flex-direction: column; }
.next-card span { color: var(--muted); font-size: 15px; }
@media (min-width: 560px) { .next-card { flex-direction: row; justify-content: space-between; align-items: center; } }

/* ── 찾기 ── */
.form-card { padding: 24px; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--border); text-decoration: none; }
.req-list li:first-child a { border-top: 0; }
.req-list a > div { flex: 1 1 200px; display: flex; flex-direction: column; }
.req-list small { color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.badge-done { background: var(--ok-soft); color: var(--ok); }
.badge-in_progress, .badge-testing { background: color-mix(in srgb, var(--gold) 25%, transparent); }
.badge-new { background: var(--bad); color: #fff; }
