:root {
    --blue: #1f6feb;
    --blue-dark: #144fb0;
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #1c2430;
    --muted: #6b7686;
    --border: #dde3ea;
    --danger: #c0392b;
    --ok: #1a8f4c;
    --radius: 12px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 17px;
    line-height: 1.45;
}
.app-header {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff;
    padding: 18px 16px;
}
.app-header-inner { max-width: 760px; margin: 0 auto; }
.app-title { font-size: 20px; font-weight: 700; }
.app-subtitle { font-size: 14px; opacity: .9; margin-top: 2px; }
.container { max-width: 760px; margin: 0 auto; padding: 16px 16px 80px; }
.loading { text-align: center; padding: 60px 0; color: var(--muted); }

.progress-wrap { margin: 16px 0 20px; }
.progress-bar { height: 8px; background: #e4e9ef; border-radius: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--blue); transition: width .25s ease; }
.progress-label { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: right; }

.section-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: 0 1px 3px rgba(20,30,50,.08);
    margin-bottom: 16px;
}
.section-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.section-hint { color: var(--muted); font-size: 14px; margin-bottom: 14px; }

.field { margin-bottom: 20px; }
.field-label { font-weight: 600; margin-bottom: 8px; font-size: 16px; }
.field-required::after { content: " *"; color: var(--danger); }
.field-error { color: var(--danger); font-size: 13.5px; margin-top: 6px; display: none; }
.field.has-error .field-error { display: block; }
.field.has-error .field-label { color: var(--danger); }

input[type=text], input[type=number], input[type=date], input[type=tel], textarea, select {
    width: 100%;
    padding: 12px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8'><path d='M0 0l7 8 7-8z' fill='%236b7686'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,235,.15); }

.option-list { display: flex; flex-direction: column; gap: 8px; }
.option-item {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid var(--border); border-radius: 10px;
    padding: 12px 14px; cursor: pointer; background: #fff;
    transition: border-color .15s, background .15s;
}
.option-item:active { background: #f0f4fa; }
.option-item.selected { border-color: var(--blue); background: #eaf2ff; }
.option-item input { width: 18px; height: 18px; flex: 0 0 auto; }
.option-item span { font-size: 15.5px; }

.scale-row { display: flex; flex-wrap: wrap; gap: 8px; }
.scale-btn {
    min-width: 44px; padding: 10px 6px; text-align: center;
    border: 1.5px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600;
}
.scale-btn.selected { background: var(--blue); border-color: var(--blue); color: #fff; }
.scale-labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.info-box { background: #fff8e1; border: 1.5px solid #f0d68a; border-radius: 10px; padding: 12px 14px; font-size: 14.5px; color: #6b5300; margin-bottom: 20px; }

.file-drop { border: 1.5px dashed var(--border); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); }
.file-drop.has-file { border-color: var(--ok); color: var(--ok); }

.nav-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.btn { border: none; border-radius: 10px; padding: 14px 20px; font-size: 16px; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--blue); color: #fff; flex: 1; }
.btn-primary:disabled { opacity: .5; }
.btn-secondary { background: #e9edf2; color: var(--text); }
.btn-block { width: 100%; }

.section-nav-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; }
.pill { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #d3dae2; }
.pill.done { background: var(--ok); }
.pill.current { background: var(--blue); width: 14px; height: 14px; }

.summary-card { text-align: center; padding: 50px 18px; }
.summary-card h2 { color: var(--ok); }

.top-meta { display:flex; justify-content:space-between; align-items:center; font-size: 13px; color: var(--muted); margin-bottom: 6px;}
.link-plain { color: var(--blue); text-decoration: none; }

@media (max-width: 480px) {
    body { font-size: 16px; }
    .section-card { padding: 16px 14px; }
}
