:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --card: #243044;
  --text: #f0f4f8;
  --muted: #9aa8b8;
  --accent: #f5a623;
  --accent-dim: #c4841a;
  --ok: #3dd68c;
  --danger: #ff6b6b;
  --border: #334155;
  --radius: 14px;
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100dvh;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 480px; margin: 0 auto; padding: 1rem 1rem 5rem; }
.admin-wrap { max-width: 900px; }
header.appbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15,20,25,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1rem;
}
header.appbar .inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.logo { font-weight: 800; letter-spacing: .04em; color: var(--text); text-decoration: none; font-size: 1.15rem; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .85rem; }
.nav-links a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
h1 { font-size: 1.45rem; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 1.25rem 0 .5rem; }
.lead { color: var(--muted); margin: 0 0 1.25rem; }
.disclaimer {
  background: #2a2418;
  border: 1px solid #5c4a1e;
  color: #f0d78c;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .85rem;
  margin: 1rem 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.steps { display: flex; gap: .35rem; margin-bottom: 1.25rem; }
.steps .dot {
  flex: 1; height: 6px; border-radius: 99px;
  background: var(--border);
}
.steps .dot.on { background: var(--accent); }
label { display: block; font-size: .9rem; margin: .75rem 0 .35rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=number], textarea, select {
  width: 100%;
  min-height: var(--tap);
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
}
textarea { min-height: 120px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); min-width: var(--tap);
  padding: .75rem 1.25rem;
  border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 650;
  cursor: pointer; text-decoration: none;
  background: var(--accent); color: #111;
}
.btn:active { transform: scale(.98); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ok { background: var(--ok); color: #0b1a12; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.btn-row .btn { flex: 1; }
.errors {
  background: #3a1a1a; border: 1px solid var(--danger);
  color: #ffc9c9; padding: .75rem 1rem; border-radius: 12px; margin-bottom: 1rem;
  font-size: .9rem;
}
.errors ul { margin: 0; padding-left: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  min-height: var(--tap);
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: .95rem;
  cursor: pointer;
  user-select: none;
  display: inline-flex; align-items: center;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip.on, .chip:has(input:checked) {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 650;
}
.plan {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1e2a1e;
  border: 1px solid var(--border);
  margin: 1rem 0;
}
.plan-mock {
  width: 100%; height: 100%;
  background:
    linear-gradient(135deg, #2d4a2d 25%, #1e3320 25%, #1e3320 50%, #2d4a2d 50%, #2d4a2d 75%, #1e3320 75%);
  background-size: 24px 24px;
  opacity: .55;
}
.plan #map { width: 100%; height: 100%; min-height: 260px; }
.plan-house {
  position: absolute; inset: 28% 28%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: var(--muted); pointer-events: none;
}
.side-hit {
  position: absolute;
  background: rgba(245,166,35,.15);
  border: 2px dashed transparent;
  cursor: pointer;
}
.side-hit.on { background: rgba(245,166,35,.55); border-color: var(--accent); }
.side-hit[data-side=Front] { left: 28%; right: 28%; top: 12%; height: 14%; }
.side-hit[data-side=Rear] { left: 28%; right: 28%; bottom: 12%; height: 14%; }
.side-hit[data-side=Left] { top: 28%; bottom: 28%; left: 12%; width: 14%; }
.side-hit[data-side=Right] { top: 28%; bottom: 28%; right: 12%; width: 14%; }
.side-label {
  position: absolute; font-size: .7rem; font-weight: 700; color: var(--accent);
  pointer-events: none;
}
.side-label.front { top: 4%; left: 50%; transform: translateX(-50%); }
.side-label.rear { bottom: 4%; left: 50%; transform: translateX(-50%); }
.side-label.left { left: 2%; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; }
.side-label.right { right: 2%; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; }
.summary dt { color: var(--muted); font-size: .8rem; margin-top: .5rem; }
.summary dd { margin: 0; font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .4rem; border-bottom: 1px solid var(--border); }
.badge {
  display: inline-block; padding: .2rem .55rem; border-radius: 999px;
  font-size: .75rem; background: var(--card); border: 1px solid var(--border);
}
.badge.ok { background: #143528; color: var(--ok); border-color: #1e5c3e; }
.badge.warn { background: #3a2e10; color: var(--accent); border-color: #5c4a1e; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stat { background: var(--card); border-radius: 12px; padding: .9rem; }
.stat .n { font-size: 1.5rem; font-weight: 800; }
.stat .l { font-size: .75rem; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.photo-grid img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--card); }
.footer-note { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 2rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--tap); }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: 1.75rem; }
@media (min-width: 640px) {
  .wrap { padding-top: 1.5rem; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
