.crq {
    --crq-red: #b52d1a;
    --crq-line: #dedbd7;
    --crq-text: #252525;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr);
    gap: 16px;
    width: 100%;
    min-width: 0;
    padding: 16px;
    margin: 24px 0;
    border: 1px solid #454746;
    border-radius: 30px;
    background: #262a2a;
    color: #fff;
    font-family: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}
.crq, .crq * { box-sizing: border-box; }
.crq [hidden] { display: none !important; }
.crq button, .crq input, .crq select, .crq textarea { font: inherit; }
.crq button { cursor: pointer; }
.crq button:disabled { cursor: default; opacity: .72; }
.crq :focus-visible { outline: 2px solid #d33b26; outline-offset: 3px; }

.crq-map {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(ellipse at 60% 42%, #2c3232, #232829 80%);
}
.crq-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.crq-map-svg:active { cursor: grabbing; }
.crq-map-svg .country {
    fill: #343a39;
    stroke: #515856;
    stroke-width: .8;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
.crq-country-label { fill: #9aa39e; font-size: 12px; letter-spacing: 1.4px; }
.crq-town-label { fill: #bdc6bf; font-size: 12px; }
.crq-marker-letter { font-size: 12px; font-weight: 700; }
.crq-marker-name { fill: #fff; font-size: 16px; font-weight: 600; }
.crq-route-line, .crq-route-flow { fill: none; vector-effect: non-scaling-stroke; }
.crq-route-line { stroke: #e35c43; stroke-width: 3; }
.crq-route-flow { stroke: #ffc0b0; stroke-width: 2; stroke-dasharray: 4 14; animation: crq-flow 6s linear infinite; }
@keyframes crq-flow { to { stroke-dashoffset: -108; } }

.crq-map-header, .crq-map-controls, .crq-route, .crq-attribution { position: absolute; left: 16px; }
.crq-map-header { top: 16px; padding: 10px 12px; border-radius: 10px; background: #202525e8; pointer-events: none; }
.crq-map-header strong { display: block; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; }
.crq-map-header span { display: block; font-size: 13px; color: #b5bcb8; }
.crq-map-controls { top: 98px; display: grid; gap: 2px; padding: 2px; border: 1px solid #58605c; border-radius: 10px; background: #272d2c; }
.crq-map-controls button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 7px; color: #fff; background: transparent; font-size: 21px; }
.crq-map-controls button:hover { background: #404946; }
.crq-route { bottom: 42px; max-width: calc(100% - 32px); padding: 12px 16px; border: 1px solid #545c57; border-radius: 13px; background: #202626ef; pointer-events: none; }
.crq-route small { display: block; color: #b5bfb9; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.crq-route strong { display: block; font-size: 22px; line-height: 1.2; margin-top: 3px; overflow-wrap: anywhere; }
.crq-attribution { bottom: 10px; right: 12px; color: #aab2ad; font-size: 10px; }
.crq-attribution a { color: inherit; text-decoration: underline; }

.crq .crq-form {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 23px;
    margin: 0;
    border: 0;
    border-radius: 21px;
    background: #fff;
    color: var(--crq-text);
}
.crq-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid #e5e2de; border-radius: 12px; background: #f1f0ed; }
.crq-tabs button { min-height: 44px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: #625f5a; font-weight: 600; font-size: 14px; line-height: 1.15; }
.crq-tabs button[aria-selected="true"] { background: white; color: var(--crq-red); box-shadow: 0 2px 6px #33221a16; }
.crq .crq-form h2 { width: auto; margin: 2px 0 0; padding: 0; color: var(--crq-text); font-family: inherit; font-weight: 700; font-size: 29px; line-height: 1.12; text-transform: none; }
.crq .crq-intro, .crq .crq-note { margin: -5px 0 2px; padding: 0; color: #66615d; font-size: 14px; }
.crq .crq-note { margin: 0; text-align: center; font-size: 12px; }

.crq-locations { position: relative; display: grid; gap: 11px; }
.crq-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.crq-field { min-width: 0; position: relative; }
.crq .crq-field label { display: block; margin: 0 0 5px; padding: 0; color: #625e59; font-size: 13px; line-height: 1.35; }
.crq-field label small { font-size: 11px; color: #75706b; }
.crq .crq-field > input:not([type="hidden"]), .crq .crq-field select, .crq .crq-field textarea, .crq-input-shell {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid var(--crq-line);
    border-radius: 10px;
    background: white;
    color: var(--crq-text);
    box-shadow: none;
    font-size: 16px;
    line-height: 1.35;
}
.crq .crq-field textarea { min-height: 64px; resize: vertical; }
.crq .crq-field select {
    -webkit-appearance: none;
    appearance: none;
    height: 43px;
    padding-right: 34px;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%2367615b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
@media (forced-colors: active) {
    .crq .crq-field select { appearance: auto; background-image: none; }
}
.crq .crq-field textarea::placeholder, .crq input::placeholder { color: #76716d; opacity: 1; }
.crq-input-shell { display: flex; align-items: center; gap: 9px; padding: 0 10px; }
.crq-input-shell:focus-within { border-color: var(--crq-red); box-shadow: 0 0 0 2px #b52d1a18; }
.crq .crq-input-shell input { min-width: 0; width: 100%; min-height: 40px; padding: 6px 0; margin: 0; background: transparent; border: 0; color: inherit; box-shadow: none; outline: 0; }
.crq-input-shell:has(input[aria-invalid="true"]) { border-color: var(--crq-red); }
.crq-unit { color: #6b6762; flex: none; font-size: 13px; }
.crq-point { flex: none; display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #d5d2ce; border-radius: 50%; font-size: 12px; font-weight: 700; color: #5f5952; }
.crq-point-b { color: #fff; background: var(--crq-red); border-color: var(--crq-red); }
.crq-clear, .crq-swap { padding: 0; border: 0; background: transparent; color: #675f58; }
.crq-clear { width: 22px; height: 28px; font-size: 21px; }
.crq-swap { position: absolute; top: 54px; right: 10px; z-index: 1; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--crq-line); background: white; }

.crq-options { position: absolute; inset: calc(100% + 4px) 0 auto; z-index: 5; max-height: 210px; overflow: auto; padding: 4px; border: 1px solid var(--crq-line); border-radius: 10px; background: #fff; box-shadow: 0 9px 24px #16100c30; }
.crq-options button { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: #252525; text-align: left; }
.crq-options button:hover, .crq-options button[aria-selected="true"] { background: #f5e9e5; }
.crq-options button small, .crq-option-message { color: #68615a; font-size: 13px; }
.crq-option-message { padding: 8px; }

.crq .crq-submit.btn-red {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 51px;
    float: none;
    margin: 2px 0 0;
    padding: 13px 21px;
    border: 0;
    border-radius: 33px;
    background: linear-gradient(180deg, #d33b26, #a81400);
    box-shadow: 0 8px 16px #6a000026;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.crq .crq-submit.btn-red:hover:not(:disabled) { background: linear-gradient(180deg, #c63220, #971500); }
.crq-feedback { padding: 9px 11px; border-radius: 8px; font-size: 14px; }
.crq-feedback[data-kind="success"] { background: #eaf3eb; color: #245532; }
.crq-feedback[data-kind="error"] { background: #faece8; color: #892919; }

@media (max-width: 760px) {
    .crq { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; border-radius: 22px; }
    .crq-map { min-height: 360px; border-radius: 21px 21px 0 0; }
    .crq .crq-form { padding: 18px; border-radius: 0 0 21px 21px; }
    .crq-map-header { left: 11px; top: 11px; max-width: calc(100% - 66px); }
    .crq-map-header span { font-size: 12px; }
    .crq-map-controls { left: auto; right: 10px; top: 11px; }
    .crq-country-label { font-size: 22px; letter-spacing: .6px; }
    .crq-route { bottom: 29px; left: 11px; padding: 8px 11px; }
    .crq-route strong { font-size: 18px; }
    .crq[data-mode="local"] .crq-route { display: none; }
    .crq-attribution { left: 11px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .crq-route-flow { animation: none; }
}
