:root {
  --bg: #fbf7f0;
  --card: #ffffff;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e7e0d3;
  --accent: #f2a13b;
  --accent-dark: #d98a1f;
  --accent-soft: #fdf0dc;
  --ok: #3b9a5c;
  --err: #c9463d;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent-dark); }
h1, h2 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(26px, 5vw, 38px); }
h2 { font-size: clamp(22px, 4vw, 28px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto; padding: 14px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.city { color: var(--muted); font-size: 15px; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
section { margin: 0 0 36px; }

.hero { text-align: center; padding-top: 8px; }
.hero-enot { display: block; margin: 0 auto 12px; }
.lead { color: var(--muted); margin: 0 auto 22px; max-width: 560px; }

.ask { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; }
textarea, input[type=text], input[type=tel], select {
  width: 100%; font: inherit; color: var(--ink);
  padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--card); outline: none; resize: vertical;
}
textarea:focus, input:focus, select:focus { border-color: var(--accent); }

.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; transition: transform .06s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #1e1e1e; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--ink); margin: 4px; }
.btn-outline:hover { background: var(--accent-soft); }
.btn-big { padding: 16px 28px; font-size: 18px; }
.btn-link { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; padding: 8px; text-decoration: underline; }

.or { color: var(--muted); margin: 22px 0 10px; font-size: 15px; }
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); cursor: pointer; font: inherit; font-weight: 600; color: var(--ink);
}
.cat:hover, .cat.active { border-color: var(--accent); background: var(--accent-soft); }
.cat .ico { font-size: 28px; line-height: 1; }

.quiz {
  background: var(--card); border: 2px solid var(--line); border-radius: 24px;
  padding: 24px 20px; box-shadow: 0 6px 24px rgba(60, 40, 0, .06);
}
.quiz .progress { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.quiz h2 { margin-bottom: 16px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  text-align: left; font: inherit; font-size: 17px; color: var(--ink);
  padding: 14px 16px; background: var(--bg); border: 2px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.opt:hover, .opt.active { border-color: var(--accent); background: var(--accent-soft); }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 10px; flex-wrap: wrap; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--bg); cursor: pointer; color: var(--ink);
}
.chip.active { border-color: var(--accent); background: var(--accent-soft); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 4px; width: 18px; height: 18px; }
.error { color: var(--err); font-size: 15px; margin-top: 8px; min-height: 1.4em; }
.summary { background: var(--bg); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.summary span:last-child { font-weight: 600; text-align: right; }
.done { text-align: center; padding: 10px 0; }
.done .big { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; top: -9999px; }

.steps { padding-left: 22px; margin: 0; }
.steps li { margin-bottom: 10px; }
.masters-cta {
  text-align: center; background: var(--accent-soft); border-radius: 24px; padding: 24px 18px;
}
.masters-cta p { color: var(--muted); margin: 0 0 14px; }

footer {
  max-width: 760px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 14px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid var(--line);
}
.legal { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.legal h2 { font-size: 20px; margin-top: 28px; }

/* Лента последних заявок */
.muted { color: var(--muted); }
.feed h2 { margin-bottom: 4px; }
.feed > .muted { margin: 0 0 14px; font-size: 15px; }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.feed-card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-size: 15px; display: flex; flex-direction: column; gap: 6px;
}
.feed-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.feed-head .muted { font-weight: 400; font-size: 13px; white-space: nowrap; }
.feed-card ul { margin: 0; padding-left: 18px; color: var(--ink); }
.feed-card li { margin: 2px 0; }
.feed-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); font-size: 14px; }
.my-requests { margin: 18px 0 0; font-size: 15px; }

/* Выбор работ */
.selected-box { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius); margin-bottom: 14px; }
.selected-box.shake { animation: shake .35s; border: 2px solid var(--err); }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.work-cats { display: flex; flex-direction: column; gap: 6px; }
.work-cat-head {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  font: inherit; font-weight: 600; color: var(--ink); text-align: left;
  padding: 12px 14px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.work-cat-head.open { border-color: var(--accent); background: var(--accent-soft); }
.work-cat-head .arrow { color: var(--muted); }
.work-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.work {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font: inherit; color: var(--ink); padding: 10px 12px;
  background: var(--bg); border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.work:hover, .work.active { border-color: var(--accent); background: var(--accent-soft); }
.work .check { flex: 0 0 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: var(--card); }
.work.active .check { background: var(--accent); border-color: var(--accent); color: #1e1e1e; }
.work-title { flex: 1; }
.unit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.qty-rows { display: flex; flex-direction: column; gap: 10px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.qty-field { display: flex; align-items: center; gap: 8px; }
.qty-field input { width: 110px; padding: 10px 12px; }
.price-lines { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.price-lines b { color: var(--ink); }
.quiz-nav .btn { margin-left: auto; }

/* Подборщики */
.conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.conf {
  display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--ink);
  padding: 14px 16px; background: var(--accent-soft); border: 2px solid var(--accent); border-radius: var(--radius); cursor: pointer;
}
.conf:hover { background: #fbe6c2; }
.conf .ico { font-size: 32px; line-height: 1; }
.conf small { color: var(--muted); font-weight: 400; }
.opt .hint, .q-hint { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.q-hint { margin: -8px 0 14px; }
.opt { position: relative; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; color: #7a4d00; background: #fbe6c2; border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.opt.unknown { border-style: dashed; color: var(--muted); }
.num-field { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.num-field input { width: 140px; padding: 12px 14px; }
.suggest { color: var(--accent-dark); font-size: 14px; }
.progress-bar { height: 6px; background: var(--line); border-radius: 3px; margin-bottom: 14px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
