.report-hero { align-items: center; }
.report-form { display: grid; gap: 18px; padding-bottom: 18px; }
.report-steps { padding: 4px 6px 2px; }
.report-steps ol { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
.report-steps li { position: relative; display: grid; justify-items: center; gap: 5px; color: #7b8797; font-size: 13px; }
.report-steps li::after { content: ""; position: absolute; z-index: 0; top: 17px; right: calc(50% + 24px); width: calc(100% - 48px); height: 2px; border-radius: 99px; background: #d5dde7; }
.report-steps li:last-child::after { display: none; }
.report-steps li > span { position: relative; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid #cbd4df; border-radius: 50%; background: var(--bg); font-weight: 800; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.report-steps li > strong { font-size: 13px; }
.report-steps li.active { color: var(--primary); }
.report-steps li.active > span { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(18,59,109,.09); }
.report-steps li.completed { color: #067647; }
.report-steps li.completed > span { border-color: #15805c; background: #e4f7ed; color: #067647; }
.report-steps li.completed::after { background: #72bd9d; }
.dialog-steps { margin: -4px -6px 20px; }
.dialog-steps li > span { background: #fff; }
.location-card { overflow: hidden; }
.step-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.step-heading.compact { align-items: center; }
.step-heading h2 { margin: 0; font-size: clamp(22px, 4vw, 30px); }
.step-heading p { margin: 3px 0 0; color: var(--muted); }
.location-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.location-choice { min-height: 78px; border: 1px solid #b7c4d4; border-radius: 12px; background: #fff; color: var(--text); padding: 12px; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 11px; text-align: start; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.choice-icon { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #edf3fa; color: var(--primary); }
.choice-icon svg, .upload-icon svg, .confirmation-icon svg, .intersection-marker svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.choice-copy { min-width: 0; display: grid; gap: 2px; }
.choice-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.location-choice strong { font-size: 15px; }
.location-choice small { color: var(--muted); font-size: 12px; font-weight: 500; }
.location-choice:hover, .location-choice:focus-visible { border-color: #3978b7; background: #f3f8ff; transform: translateY(-1px); }
.location-choice.primary-choice { background: var(--primary); color: #fff; border-color: var(--primary); }
.location-choice.primary-choice small { color: rgba(255,255,255,.78); }
.location-choice.primary-choice .choice-icon { background: rgba(255,255,255,.13); color: #fff; }
.speed-badge { display: inline-flex; padding: 1px 7px; border-radius: 999px; background: #dff7ed; color: #075f47; font-size: 10px; font-weight: 800; }
.location-choice:disabled { opacity: .65; cursor: wait; }
.privacy-note, .field-hint { color: var(--muted); font-size: 13px; margin: 10px 0; }
.location-message { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #eef2f6; font-weight: 700; }
.location-message.success { background: #dcfae6; color: #067647; }
.location-message.warning { background: #fff0d5; color: #7a2e0e; }
.location-message.error { background: #fee4e2; color: var(--danger); }
.location-message[hidden], .location-confirmation[hidden], .photo-selection[hidden], .field-error[hidden] { display: none !important; }
.location-confirmation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin: 14px 0; padding: 15px 16px; border: 1px solid #a9d7c3; border-radius: 14px; background: #f1fbf6; color: #075f47; animation: confirmation-in .18s ease-out; }
.confirmation-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #d7f3e5; }
.confirmation-copy { min-width: 0; }
.confirmation-copy > strong { display: block; font-size: 16px; }
.confirmation-copy p { margin: 2px 0 0; color: var(--text); overflow-wrap: anywhere; }
.confirmation-copy .location-details { color: #4b635a; font-size: 12px; }
.location-edit { min-height: 42px; white-space: nowrap; }
@keyframes confirmation-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.map-panel { position: relative; }
.map-panel[hidden], .intersection-panel[hidden], .intersection-search-results[hidden] { display: none !important; }
.map-label { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: 14px; }
.map-label span { color: var(--muted); }
.report-map, .review-map { width: 100%; min-height: 310px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #dfe8ef; }
.fault-marker { width: 34px; height: 34px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50% 50% 50% 0; background: #c5261f; box-shadow: 0 4px 12px rgba(0,0,0,.3); transform: rotate(-45deg); }
.fault-marker::after { content: ""; width: 9px; height: 9px; background: #fff; border-radius: 50%; }
.intersection-marker { width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: #143c68; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.28); line-height: 1; }
.intersection-marker svg { width: 18px; height: 18px; }
.map-legend { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; }
.map-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.map-legend-symbol { width: 11px; height: 11px; border-radius: 50%; background: #c5261f; }
.map-legend-symbol.intersection { background: #143c68; }
.map-fallback { padding: 24px; border-radius: 14px; background: #fff0d5; color: #7a2e0e; }
.nearest-panel { margin-top: 16px; padding: 16px; border: 1px solid #b8ddca; border-radius: 14px; background: #f0fbf5; }
.nearest-panel h3 { margin: 0 0 10px; }
.nearest-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #cee8da; }
.nearest-result:last-child { border-bottom: 0; }
.nearest-result small { display: block; color: var(--muted); }
.nearest-result button { flex: 0 0 auto; }
.section-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: var(--muted); }
.section-divider::before, .section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.intersection-panel { display: grid; gap: 12px; }
.intersection-search-results { display: grid; gap: 8px; padding: 4px; max-height: 310px; overflow: auto; }
.intersection-result { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.intersection-result:hover, .intersection-result:focus-visible { border-color: #3978b7; background: #f3f8ff; }
.intersection-result strong, .intersection-result small { display: block; }
.intersection-result small { color: var(--muted); margin-top: 3px; }
.intersection-result .result-number { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #e9f2fb; color: var(--primary); font-weight: 800; }
.intersection-empty { padding: 14px; border-radius: 12px; background: #f5f7fa; color: var(--muted); text-align: center; }
.report-fields h2 { margin: 0; }
.field-label { display: block; margin-bottom: 7px; font-weight: 700; }
.photo-field { position: relative; }
.file-input-accessible { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.upload-dropzone { min-height: 126px; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 14px; padding: 20px; border: 1.5px dashed #9dafc2; border-radius: 14px; background: #f8fafc; text-align: start; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.upload-dropzone:hover { border-color: #3978b7; background: #f2f7fc; }
.file-input-accessible:focus-visible + .upload-dropzone { border-color: #3978b7; outline: 3px solid rgba(38,132,187,.25); outline-offset: 3px; }
.upload-icon { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #e7eef7; color: var(--primary); }
.upload-icon svg { width: 27px; height: 27px; }
.upload-dropzone strong, .upload-dropzone small { display: block; }
.upload-dropzone small { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.photo-selection { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border: 1px solid #c8d7e5; border-radius: 13px; background: #fff; }
.photo-selection img { width: 68px; height: 58px; display: block; border-radius: 9px; object-fit: cover; background: #edf1f5; }
.photo-meta { min-width: 0; display: grid; }
.photo-meta span { color: var(--muted); font-size: 11px; }
.photo-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remove-photo { min-height: 42px; color: var(--danger); }
.field-error { margin: 8px 0 0; color: var(--danger); font-size: 13px; font-weight: 700; }
.reporter-privacy { margin: -7px 0 0; color: var(--muted); font-size: 13px; }
.submit-bar { position: relative; z-index: 8; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 18px; margin-top: 4px; border: 1px solid #c9d7e5; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 10px 35px rgba(15,39,66,.16); backdrop-filter: blur(8px); }
.submit-bar.ready { position: sticky; bottom: 12px; }
.submit-bar p { margin: 0; color: var(--muted); font-size: 13px; }
.submit-bar p.ready { color: #067647; font-weight: 700; }
.submit-report { min-width: 180px; min-height: 50px; }
.submit-report:disabled { background: #aab4c1; color: #eef1f5; opacity: 1; box-shadow: none; cursor: not-allowed; }
.report-review-dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 20px; color: var(--text); box-shadow: 0 24px 80px rgba(15,39,66,.28); }
.report-review-dialog::backdrop { background: rgba(10,26,44,.58); backdrop-filter: blur(3px); }
.review-dialog-content { padding: clamp(20px, 4vw, 32px); }
.review-dialog-content h2 { margin: 6px 0 20px; }
.review-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.review-summary > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.review-summary .full { grid-column: 1 / -1; }
.review-summary dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.review-summary dd { margin: 0; font-weight: 700; white-space: pre-wrap; }
.review-dialog-actions { display: flex; justify-content: flex-start; gap: 10px; margin-top: 20px; }
.review-location { margin-top: 16px; }
.review-map { min-height: 300px; }
.candidate-list { display: grid; gap: 8px; }
.candidate-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.candidate-card p { margin: 4px 0; }

@media (max-width: 700px) {
  .report-steps { padding-inline: 0; }
  .report-steps li { font-size: 12px; }
  .report-steps li::after { right: calc(50% + 20px); width: calc(100% - 40px); }
  .report-steps li > span { width: 34px; height: 34px; }
  .location-card { padding: 16px; }
  .location-actions { grid-template-columns: 1fr; }
  .location-choice { min-height: 64px; font-size: 16px; }
  .location-confirmation { grid-template-columns: auto 1fr; align-items: start; }
  .location-edit { grid-column: 1 / -1; width: 100%; }
  .report-map { min-height: 280px; margin-inline: -1px; }
  .map-label { flex-direction: column; gap: 2px; }
  .map-legend { justify-content: flex-start; }
  .nearest-result { align-items: flex-start; flex-direction: column; }
  .nearest-result button { width: 100%; min-height: 46px; }
  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .form-grid .full { grid-column: auto; }
  .upload-dropzone { min-height: 112px; justify-content: flex-start; padding: 16px; }
  .photo-selection { grid-template-columns: 58px minmax(0, 1fr); }
  .photo-selection img { width: 58px; height: 54px; }
  .remove-photo { grid-column: 1 / -1; width: 100%; }
  .submit-bar { bottom: 6px; grid-template-columns: 1fr; align-items: stretch; }
  .submit-bar p { text-align: center; }
  .submit-report { width: 100%; }
  .review-summary { grid-template-columns: 1fr; }
  .review-summary .full { grid-column: auto; }
  .review-dialog-actions { flex-direction: column-reverse; }
  .review-dialog-actions .btn { width: 100%; }
}

@media (max-width: 360px) {
  .location-card, .report-fields { padding: 13px; border-radius: 14px; }
  .step-heading { gap: 9px; }
  .report-steps li > strong { font-size: 11px; }
  .report-steps li > span { width: 31px; height: 31px; font-size: 12px; }
  .report-steps li::after { top: 15px; }
  .report-map { min-height: 300px; }
  .upload-dropzone { align-items: flex-start; }
  .upload-icon { flex-basis: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .location-choice, .report-steps li > span, .location-confirmation { transition: none; animation: none; }
}
