*, *::before, *::after { box-sizing: border-box; }

:root {
    --c-bg: #f7f7f8;
    --c-fg: #1a1a1a;
    --c-muted: #6b6f76;
    --c-primary: #2f6feb;
    --c-primary-hover: #2557c7;
    --c-border: #d8dde3;
    --c-error: #c0392b;
    --c-success: #2e7d32;
    --c-warn: #b26a00;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    font-size: 16px;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--c-bg);
    color: var(--c-fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.45;
}

.container { padding: 16px; max-width: 720px; margin: 0 auto; }
.narrow { max-width: 480px; }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.warn { color: var(--c-warn); }

h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.2rem; margin: 16px 0 8px; }
h3 { font-size: 1rem; margin: 8px 0; }

.form-header { margin-bottom: 16px; }

form { display: flex; flex-direction: column; gap: 14px; background: #fff; padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, legend { font-size: .9rem; color: var(--c-muted); }
input[type=text], input[type=tel], input[type=date], input[type=email], input[type=password] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    -webkit-appearance: none;
}
input:focus { outline: 2px solid var(--c-primary); outline-offset: 1px; }

fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.radio, .checkbox { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.consents { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px dashed var(--c-border); border-radius: 8px; background: #fafbfc; }
.checkbox span { font-size: .9rem; color: var(--c-muted); }

button {
    background: var(--c-primary);
    color: #fff;
    border: 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background .15s;
}
button:hover:not(:disabled) { background: var(--c-primary-hover); }
button:disabled { background: #b9c3d3; cursor: not-allowed; }

.error { color: var(--c-error); font-size: .9rem; margin: 0; }

.address-field { position: relative; }
.suggest-list {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
    background: #fff; border: 1px solid var(--c-border); border-radius: 8px;
    margin-top: 4px; padding: 4px 0; list-style: none; max-height: 280px; overflow-y: auto;
    box-shadow: var(--shadow);
}
.suggest-list li { padding: 8px 12px; cursor: pointer; font-size: .9rem; }
.suggest-list li:hover, .suggest-list li.active { background: #eef2fa; }

#success { display: flex; flex-direction: column; gap: 12px; }
#success[hidden] { display: none; }
.station-block { background: #fff; padding: 12px 14px; border-radius: 8px; box-shadow: var(--shadow); }

.messenger-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.messenger-buttons a {
    display: block; text-align: center; padding: 14px; border-radius: 10px;
    background: var(--c-primary); color: #fff; text-decoration: none; font-weight: 600;
}
.messenger-buttons a:hover { background: var(--c-primary-hover); }

@media (max-width: 380px) {
    .messenger-buttons { grid-template-columns: 1fr; }
}

.qr-block { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; margin-bottom: 16px; }
.qr-image { display: block; margin: 0 auto 12px; max-width: 280px; width: 100%; height: auto; image-rendering: pixelated; }
.link-block { background: #fff; padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.link-row { margin: 8px 0; word-break: break-all; }
.form-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions button, .actions .btn-secondary {
    flex: 1 1 auto;
    text-align: center;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .95rem;
}
.actions .btn-secondary { background: #20242a; color: #fff; }
.actions .btn-secondary:hover { background: #1a1d22; }
.hint { background: #fafbfc; padding: 14px 16px; border-radius: var(--radius); border: 1px dashed var(--c-border); }
.hint ul { margin: 8px 0 0; padding-left: 18px; color: var(--c-muted); font-size: .9rem; }
.hint li + li { margin-top: 6px; }
