:root {
  --bg: #f6f7f5; --surface: #fff; --text: #17201b; --muted: #5d6a62; --line: #dfe4df;
  --accent: #147a52; --accent-ink: #fff; --accent-soft: #e3f2ea;
  --warn: #9a6200; --warn-soft: #fbf0d9; --off: #6b7280; --off-soft: #eceef0; --danger: #b42318;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412; --surface: #171e1a; --text: #e8eee9; --muted: #9aa8a0; --line: #2a332e;
    --accent: #3ccf8e; --accent-ink: #062014; --accent-soft: #163428;
    --warn: #f2b84b; --warn-soft: #3a2d12; --off: #a3aab3; --off-soft: #262b30; --danger: #ff8a7a;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 22px; text-decoration: none; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 18px; }
.top-nav { display: flex; gap: 20px; } .top-nav a { text-decoration: none; color: var(--muted); } .top-nav a:hover { color: var(--text); }

.hero { padding: 48px 0 32px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.03em; }
.hero h1 span { color: var(--accent); }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; display: flex; flex-direction: column; }
.hero-points span { color: var(--muted); font-size: 14px; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f label { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.f-check { justify-content: center; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px !important; color: var(--text) !important; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 10px 18px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); } .btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-wide { width: 100%; padding: 13px; margin-top: 4px; }

.count { color: var(--muted); margin: 20px 0 12px; min-height: 24px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card.dim { opacity: .62; }
.ph { aspect-ratio: 4 / 3; background: var(--off-soft); position: relative; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .noph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.badge { position: absolute; left: 12px; top: 12px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.b-free { background: var(--accent); color: var(--accent-ink); }
.b-rented { background: var(--warn-soft); color: var(--warn); }
.b-repair { background: var(--off-soft); color: var(--off); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.card h3 small { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 6px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.specs li { font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.specs li.fit { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.avail { font-size: 14px; color: var(--muted); margin: 0; }
.avail b { color: var(--text); }
.card .btn { margin-top: auto; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

.how { padding: 56px 16px 24px; }
.how h2 { font-size: 28px; letter-spacing: -.02em; }
.how ol { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.how li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--muted); }
.how li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.how li b { display: block; color: var(--text); margin-bottom: 4px; }
.foot { padding: 32px 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 32px; }

dialog { border: none; border-radius: 18px; padding: 0; width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10, 15, 12, .55); }
.req { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
#req-body { display: flex; flex-direction: column; gap: 14px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { margin: 0; font-size: 22px; }
.x { background: none; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.dlg-bike { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px; }
.dlg-bike img, .dlg-bike .noimg { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--off-soft); flex: none; }
.dlg-bike div { font-size: 14px; color: var(--muted); } .dlg-bike b { display: block; color: var(--text); font-size: 16px; }
.seg { border: none; padding: 3px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .top-nav { display: none; } }
.err { color: var(--danger); font-size: 13px; min-height: 0; } .err:empty { display: none; }
.form-err { margin: 0; }
.invalid { border-color: var(--danger) !important; }
.note { margin: -4px 0 0; font-size: 14px; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding: 16px 0 8px; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 28px; margin: 0 auto 8px; }
.done h3 { margin: 0 0 6px; } .done p { color: var(--muted); margin: 0 0 16px; }
[hidden] { display: none !important; }
@media (min-width: 1000px) { .filters { grid-template-columns: 1fr 1.1fr 1fr 1fr 1.25fr auto; } }
.f-frame { position: relative; }
.lbl { display: flex; align-items: center; gap: 6px; }
.hint-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 600 12px/1 system-ui, sans-serif; padding: 0; cursor: pointer; display: grid; place-items: center; }
.hint-btn:hover, .hint-btn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hint { position: absolute; z-index: 6; top: calc(100% + 8px); left: 0; width: min(280px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 14px; }
.hint table { border-collapse: collapse; width: 100%; margin: 6px 0; }
.hint td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.hint td:first-child { font-weight: 600; width: 40%; }
.hint p { margin: 0; color: var(--muted); font-size: 13px; }
.check:has(input:disabled) { opacity: .55; cursor: default; }
