html { font-size: 15px; }
body { min-height: 100vh; background: #f5f7fa; }
#map { position: relative; height: calc(100vh - 350px); min-height: 520px; border: 2px solid #111; border-radius: .25rem; box-shadow: 0 .25rem .75rem rgba(0,0,0,.12); overflow: hidden; }
#map.map-print-capture { min-height: 0; max-width: none; border-width: 2px; }
.map-toolbar, .map-overlay-controls { background: #fff; }
.map-checker-frame { position: absolute; inset: 0; z-index: 850; pointer-events: none; border: 1px solid #111; }
.frame-edge { position: absolute; background-color: #fff; }
.frame-top, .frame-bottom { left: 0; right: 0; height: 14px; border-block: 1px solid #111; }
.frame-top { top: 0; }
.frame-bottom { bottom: 0; }
.frame-left, .frame-right { top: 0; bottom: 0; width: 14px; border-inline: 1px solid #111; }
.frame-left { left: 0; }
.frame-right { right: 0; }
.checker-cell { position: absolute; display: block; }
.frame-top .checker-cell, .frame-bottom .checker-cell { top: 0; height: 12px; }
.frame-left .checker-cell, .frame-right .checker-cell { left: 0; width: 12px; }
.black-cell { background: #111; }
.white-cell { background: #fff; }
.paper-map-visible .leaflet-control-container .leaflet-left { margin-left: 14px; }
.paper-map-visible .leaflet-control-container .leaflet-right { margin-right: 14px; }
.paper-map-hidden .map-north-arrow, .paper-map-hidden .map-sheet-furniture, .paper-map-hidden .leaflet-control-scale { display: none !important; }
.route-point-label { padding: 1px 4px; border: 1px solid #111; border-radius: 2px; background: rgba(255,255,255,.94); color: #111; font-size: 12px; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.25); white-space: nowrap; }
.route-point-label::before { border-top-color: #111 !important; }
.route-point-symbol { display: flex; align-items: center; justify-content: center; color: #111; font-size: 15px; font-weight: 800; line-height: 1; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.map-north-arrow { margin-top: 18px !important; margin-right: 18px !important; width: 54px; padding: 4px; background: rgba(255,255,255,.92); border: 1px solid #111; text-align: center; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.north-arrow-symbol { font-size: 28px; color: #111; }
.map-north-arrow strong, .map-north-arrow small { display: block; }
.map-sheet-furniture { margin-bottom: 18px !important; margin-left: 18px !important; min-width: 210px; padding: 7px 9px; background: rgba(255,255,255,.92); border: 2px solid #111; font: 11px/1.25 monospace; }
.sheet-title { margin-bottom: 3px; font: 700 13px sans-serif; letter-spacing: .08em; }
#sheetGridData { max-width: 360px; white-space: pre-line; }
.sheet-legend { margin: 5px 0 3px; padding-top: 4px; border-top: 1px solid #777; }
.legend-route, .legend-track { display: inline-block; width: 26px; margin-right: 3px; border-top: 3px solid #dc3545; vertical-align: middle; }
.legend-track { border-top-color: #0d6efd; border-top-style: dotted; margin-left: 8px; }
.legend-position { margin-left: 8px; color: #0d6efd; }
.paper-scale-ruler { display: none; position: absolute; z-index: 850; right: 24px; bottom: 24px; padding: 7px 9px; background: rgba(255,255,255,.94); border: 2px solid #111; }
.paper-scale-ruler.active { display: block; }
.paper-scale-title { margin-bottom: 4px; font: 700 12px monospace; text-align: center; }
.paper-scale-segments { display: grid; grid-template-columns: repeat(5, 1fr); height: 14px; border: 1px solid #111; }
.paper-scale-segments span:nth-child(odd) { background: #111; }
.paper-scale-segments span:nth-child(even) { background: #fff; }
.paper-scale-labels { display: flex; justify-content: space-between; font: 9px monospace; }
.map-grid-fine { opacity: .2; }
.paper-map-hidden .paper-scale-ruler { display: none !important; }
.print-preview-label { padding: 3px 7px; border: 2px solid #ff6b00; background: rgba(255,255,255,.96); color: #b44700; font: 700 13px sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.login-card { max-width: 420px; margin: 10vh auto; }
.team-item, .access-row { padding: .75rem 0; border-bottom: 1px solid #dee2e6; }
.team-item:last-child, .access-row:last-child { border-bottom: 0; }
.grid-options { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.grid-options label { white-space: nowrap; }
.grid-label { width: auto !important; color: #fff; font-size: 11px; font-weight: 600; text-align: center; text-shadow: 0 1px 2px #000, 1px 0 2px #000; }
.coordinate-readout { margin-top: .5rem; font: 12px/1.4 monospace; color: #343a40; }
.route-color { display: inline-block; width: 1rem; height: 1rem; margin-right: .4rem; border-radius: .2rem; vertical-align: middle; }
.team-color, .mini-team-icon { display: inline-flex; align-items: center; justify-content: center; color: #fff; border-radius: 50%; font-weight: 700; }
.team-color { width: 2rem; height: 2rem; }
.mini-team-icon { width: 1.4rem; height: 1.4rem; font-size: .8rem; }
.team-settings { padding: .75rem 0; border-bottom: 1px solid #dee2e6; }
.team-map-marker span { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 3px solid #fff; border-radius: 50%; color: #fff; font-size: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.route-map-marker { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; text-shadow: 0 1px 2px #fff, 0 0 3px #fff; }
.route-editor-layout { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 1rem; }
#routeEditorMap { height: calc(100vh - 150px); min-height: 620px; border-radius: .5rem; }
.point-list { max-height: 360px; overflow: auto; }
.point-row { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .3rem .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid #dee2e6; font-size: 12px; }
.point-row select, .point-row .point-label, .point-row button { grid-column: 1 / -1; }
.point-row button { justify-self: end; }
.route-edit-marker { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; text-shadow: 0 1px 2px #fff, 0 0 4px #fff; }
.log-table { max-height: 300px; overflow: auto; }
.progress { min-width: 90px; }
footer { background: #fff; }
@media (max-width: 900px) { .route-editor-layout { grid-template-columns: 1fr; } #routeEditorMap { height: 520px; } }
