:root {
    --bg: #07101b;
    --panel: rgba(12, 24, 38, .96);
    --panel-solid: #0c1826;
    --surface: #132235;
    --surface-2: #1a2c42;
    --text: #f3f7fb;
    --muted: #91a5b9;
    --line: rgba(152, 178, 203, .18);
    --accent: #2da8ff;
    --accent-strong: #087fd2;
    --accent-soft: rgba(45, 168, 255, .14);
    --good: #38d88b;
    --warn: #ffbd45;
    --danger: #ff5d6c;
    --shadow: 0 14px 40px rgba(0, 0, 0, .36);
    --radius: 14px;
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
    --bg: #eaf0f5;
    --panel: rgba(255, 255, 255, .97);
    --panel-solid: #fff;
    --surface: #f1f5f8;
    --surface-2: #e4ebf1;
    --text: #132131;
    --muted: #5b7083;
    --line: rgba(42, 65, 86, .16);
    --accent-soft: rgba(11, 137, 224, .1);
    --shadow: 0 14px 40px rgba(28, 52, 71, .16);
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    html[data-theme="system"] {
        --bg: #eaf0f5;
        --panel: rgba(255, 255, 255, .97);
        --panel-solid: #fff;
        --surface: #f1f5f8;
        --surface-2: #e4ebf1;
        --text: #132131;
        --muted: #5b7083;
        --line: rgba(42, 65, 86, .16);
        --accent-soft: rgba(11, 137, 224, .1);
        --shadow: 0 14px 40px rgba(28, 52, 71, .16);
        color-scheme: light;
    }
}

* {
    box-sizing: border-box;
}

html,
body,
#app {
    height: 100%;
    height: 100svh;
    margin: 0;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 10px 13px;
    cursor: pointer;
    font-weight: 650;
    transition: .16s ease;
}

button:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: .42;
    cursor: not-allowed;
    transform: none;
}

button.primary {
    background: var(--accent);
    color: #04101a;
    border-color: transparent;
}

button.danger {
    background: var(--danger);
    color: #1b0508;
    border-color: transparent;
}

button.danger-ghost {
    color: var(--danger);
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    padding: 9px 11px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

label {
    color: var(--muted);
    font-size: .82rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 1rem;
    margin-bottom: 2px;
    letter-spacing: -.01em;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

h3 {
    font-size: .92rem;
    margin-bottom: 8px;
}

.hidden {
    display: none !important;
}

.app-header {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: env(safe-area-inset-top, 0) 12px 0;
    background: var(--panel-solid);
    border-bottom: 1px solid var(--line);
    z-index: 1001;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 1.45rem;
}

.brand p {
    color: var(--muted);
    font-size: .7rem;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 180px;
}

.header-status {
    display: flex;
    gap: 6px;
    align-items: center;
}

.status-chip,
.score-chip,
.icon-chip,
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-chip i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-chip.active {
    color: var(--good);
}

.status-chip.warning {
    color: var(--warn);
}

.status-chip.error {
    color: var(--danger);
}

.score-chip.good {
    background: rgba(56, 216, 139, .15);
    color: var(--good);
}

.score-chip.moderate {
    background: rgba(255, 189, 69, .15);
    color: var(--warn);
}

.score-chip.poor {
    background: rgba(255, 93, 108, .15);
    color: var(--danger);
}

.workspace {
    position: relative;
    height: calc(100% - 58px);
    min-height: 0;
}

.map-stage,
#map {
    position: absolute;
    inset: 0;
}

#map {
    background: #cad5dc;
    z-index: 1;
}

.leaflet-control-attribution {
    font-size: 9px !important;
}

.map-tools {
    position: absolute;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    top: 12px;
}

.map-tools-left {
    left: 10px;
}

.map-tools-right {
    right: 10px;
}

.map-button {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 13px;
    box-shadow: var(--shadow);
    background: var(--panel);
    font-size: 1.25rem;
    backdrop-filter: blur(12px);
}

.map-button.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--panel-solid);
}

.map-popover {
    position: absolute;
    z-index: 550;
    right: 66px;
    top: 106px;
    width: 245px;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.map-popover strong {
    display: block;
    margin-bottom: 8px;
}

.map-popover button {
    width: 100%;
    text-align: left;
    margin-top: 5px;
}

.map-popover button.active {
    border-color: var(--accent);
    color: var(--accent);
}

.quick-actions {
    position: absolute;
    z-index: 500;
    left: 50%;
    transform: translateX(-50%);
    bottom: 31vh;
    display: flex;
    gap: 8px;
}

.quick-actions button {
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    white-space: nowrap;
}

.resume-follow {
    position: absolute;
    z-index: 500;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
}

.map-message {
    position: absolute;
    z-index: 500;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel);
    padding: 9px 13px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.control-panel {
    position: absolute;
    z-index: 700;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    min-height: 0;
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: height .22s ease, transform .22s ease;
}

.control-panel.sheet-dragging {
    transition: none;
}

.sheet-handle {
    height: 22px;
    display: grid;
    place-items: center;
    cursor: ns-resize;
    touch-action: none;
}

.sheet-handle span {
    width: 46px;
    height: 4px;
    background: var(--muted);
    border-radius: 5px;
    opacity: .45;
}

.sheet-reopen {
    display: none;
}

.tabs-shell {
    position: relative;
}

.tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 8px 7px;
    border-bottom: 1px solid var(--line);
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-scroll-button {
    display: none;
    position: absolute;
    top: 7px;
    z-index: 12;
    width: 34px;
    min-height: 38px;
    height: 38px;
    padding: 0;
    border-radius: 9px;
    background: var(--panel-solid);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .24);
}

.tab-scroll-button:hover,
.tab-scroll-button:active {
    transform: none;
}

.tab-scroll-button svg {
    display: block;
    width: 18px;
    height: 18px;
    margin: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-scroll-left {
    left: 7px;
    right: auto;
}

.tab-scroll-right {
    right: 7px;
}

.tabs button {
    border: 0;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--muted);
    background: transparent;
    flex: 0 0 auto;
}

.tabs button.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.panel-scroll {
    min-height: 0;
    height: calc(100% - 68px);
    max-height: calc(100% - 68px);
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 16px;
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0));
    scrollbar-gutter: stable;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-heading.minor {
    align-items: center;
    margin: 20px 0 10px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.section-heading.minor h3 {
    margin: 0;
}

.eyebrow {
    font-size: .65rem;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: .14em;
    margin-bottom: 4px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.button-grid.compact button {
    font-size: .78rem;
    padding: 8px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.metric-grid>div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    min-width: 0;
}

.metric-grid label {
    display: block;
    font-size: .67rem;
    margin-bottom: 4px;
}

.metric-grid strong {
    display: block;
    font-size: .86rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-grid.compact {
    grid-template-columns: repeat(2, 1fr);
}

.confidence-card,
.summary-box,
.notice,
.privacy {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 12px;
    margin: 10px 0;
    font-size: .84rem;
}

.confidence-card>div:first-child {
    display: flex;
    justify-content: space-between;
}

.confidence-card p,
.notice p,
.privacy p {
    margin: 8px 0 0;
    color: var(--muted);
}

.progress {
    height: 7px;
    background: var(--surface-2);
    border-radius: 7px;
    margin-top: 9px;
    overflow: hidden;
}

.progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width .3s;
}

.hint {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.warning {
    color: var(--warn);
    font-size: .82rem;
}

details {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0;
}

summary {
    cursor: pointer;
    font-weight: 700;
    font-size: .84rem;
}

.form-row,
.search-row,
.inline-actions {
    display: flex;
    gap: 8px;
    align-items: end;
    margin: 10px 0;
}

.form-row>* {
    flex: 1;
}

.form-row button,
.search-row button {
    flex: 0 0 auto;
}

.inline-actions {
    flex-wrap: wrap;
}

.inline-actions button {
    min-height: 38px;
    font-size: .76rem;
}

.grow {
    flex: 1;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle span {
    width: 38px;
    height: 22px;
    border-radius: 22px;
    background: var(--surface-2);
    position: relative;
    flex: 0 0 auto;
}

.toggle span:after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--muted);
    position: absolute;
    top: 3px;
    left: 3px;
    transition: .18s;
}

.toggle input:checked+span {
    background: var(--accent);
}

.toggle input:checked+span:after {
    transform: translateX(16px);
    background: #fff;
}

.permission-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    color: var(--text);
}

.permission-check input {
    position: static;
    opacity: 1;
    width: 22px;
    height: 22px;
    min-height: 22px;
    margin: 1px 0 0;
    padding: 0;
    flex: 0 0 22px;
    accent-color: var(--accent);
    box-shadow: none;
}

.permission-check span {
    display: block;
    min-width: 0;
}

.permission-check strong {
    display: block;
    font-size: .82rem;
}

.permission-check small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.35;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    color: var(--muted);
    padding: 18px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 11px;
}

.item-card {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
}

.item-card header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.item-card h3 {
    margin: 0 0 3px;
}

.item-card p {
    color: var(--muted);
    margin: 3px 0;
    font-size: .76rem;
    word-break: break-word;
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.item-actions button {
    min-height: 34px;
    font-size: .7rem;
    padding: 6px 8px;
}

.coordinate-list {
    padding-left: 24px;
    color: var(--muted);
    font-size: .78rem;
}

.coordinate-list li {
    padding: 6px 2px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.manual-entry {
    margin-top: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.form-grid label {
    min-width: 0;
}

.settings-group {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.settings-group>label {
    display: block;
    margin: 10px 0;
}

.endpoint-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.endpoint-grid>div {
    background: var(--surface);
    border-radius: 10px;
    padding: 10px;
}

.endpoint-grid label,
.endpoint-grid strong {
    display: block;
    margin-bottom: 7px;
}

.endpoint-grid strong {
    font-size: .76rem;
    min-height: 30px;
}

.endpoint-grid button {
    width: 100%;
    min-height: 36px;
    font-size: .72rem;
}

.chart-container {
    height: 210px;
    margin: 14px 0;
    position: relative;
}

.table-scroll {
    overflow: auto;
    max-height: 260px;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: .72rem;
}

th,
td {
    padding: 7px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.compass-wrap {
    text-align: center;
}

.compass-dial {
    --dial-border-size: 3px;
    width: 220px;
    height: 220px;
    margin: 12px auto;
    border-radius: 50%;
    border: var(--dial-border-size) solid var(--line);
    background: radial-gradient(circle, var(--surface) 0 58%, var(--surface-2) 59% 60%, var(--surface) 61%);
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .2);
}

.compass-dial>span {
    position: absolute;
    font-weight: 800;
    color: var(--muted);
}

.north {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--danger) !important;
}

.south {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.east {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.west {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-needle,
.target-needle {
    position: absolute;
    top: calc(0px - var(--dial-border-size));
    height: calc(50% + var(--dial-border-size));
    transform-origin: 50% 100%;
    transition: transform .15s linear;
}

.compass-needle {
    left: calc(50% - 9px);
    width: 18px;
    z-index: 2;
}

.compass-needle:before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 16px, 12px 16px, 12px 100%, 6px 100%, 6px 16px, 0 16px);
}

.target-needle {
    left: calc(50% - 2px);
    width: 4px;
    z-index: 1;
}

.target-needle:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--warn);
    border-radius: 4px;
}

.dial-center {
    width: 16px;
    height: 16px;
    position: absolute;
    border-radius: 50%;
    background: var(--text);
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    z-index: 3;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(1, 7, 13, .72);
    display: grid;
    place-items: center;
    padding: 16px;
}

.modal {
    position: relative;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: min(470px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 20px;
}

.modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
}

.qr-box {
    background: #fff;
    padding: 14px;
    width: max-content;
    max-width: 100%;
    margin: 15px auto;
}

.toast-region {
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(92vw, 390px);
    pointer-events: none;
}

.toast {
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 11px 13px;
    font-size: .82rem;
    animation: toastIn .2s ease;
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warn);
}

.toast.success {
    border-left-color: var(--good);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.current-location-icon {
    background: transparent !important;
    border: 0 !important;
}

.location-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #168ff0;
    border: 4px solid #fff;
    box-shadow: 0 2px 12px rgba(0, 70, 130, .5);
    position: relative;
}

.location-dot:before {
    content: "";
    position: absolute;
    top: -14px;
    left: 7px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 12px solid #168ff0;
    transform-origin: 50% 25px;
    transform: rotate(var(--heading, 0deg));
}

.location-dot.no-heading:before {
    display: none;
}

.location-dot.poor {
    background: var(--warn);
}

.location-dot.stale {
    background: var(--danger);
}

.saved-pin {
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    background: #ff7043;
    transform: rotate(-45deg);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.saved-pin.manual {
    background: #9b6dff;
}

.long-press-draggable {
    cursor: grab;
    touch-action: none;
}

.saved-location-marker.moving {
    cursor: grabbing;
    z-index: 1200 !important;
}

.saved-location-marker.moving .saved-pin {
    transform: rotate(-45deg) scale(1.25);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .55), 0 0 0 7px rgba(45, 168, 255, .2);
}

.leaflet-interactive.long-press-draggable.moving {
    cursor: grabbing;
    stroke-width: 5;
    filter: drop-shadow(0 0 5px rgba(45, 168, 255, .85));
}

.point-handle {
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.measurement-point-handle {
    background: #ffbd45;
}

.area-point-handle,
.terrain-start-handle {
    background: #38d88b;
}

.terrain-end-handle {
    background: #ff5d6c;
}

.point-handle.moving {
    cursor: grabbing;
    transform: scale(1.3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .5), 0 0 0 7px rgba(45, 168, 255, .24);
}

@media (max-width: 799px) {
    .control-panel {
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 18px 18px 0 0;
        height: 50svh;
        min-height: min(300px, calc(100svh - 70px));
        max-height: calc(100svh - 70px);
    }

    .control-panel.sheet-collapsed {
        height: 108px;
        min-height: 108px;
    }

    .control-panel.sheet-expanded {
        height: 88svh;
    }

    .control-panel.sheet-hidden {
        transform: translateY(calc(100% + 24px));
        pointer-events: none;
    }

    .control-panel.sheet-hidden+.sheet-reopen {
        display: flex;
        position: absolute;
        z-index: 710;
        left: 50%;
        bottom: calc(10px + env(safe-area-inset-bottom, 0));
        transform: translateX(-50%);
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 999px;
        background: var(--panel);
        box-shadow: var(--shadow);
        backdrop-filter: blur(12px);
    }

    .sheet-reopen span {
        color: var(--accent);
        font-size: 1.15rem;
        line-height: 1;
    }

    .icon-chip {
        display: none;
    }

    .status-chip {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .quick-actions {
        top: 12px;
        bottom: auto;
        left: 66px;
        right: 66px;
        transform: none;
        justify-content: center;
    }

    .quick-actions button {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 8px;
        font-size: .78rem;
    }

    .resume-follow {
        top: 68px;
    }
}

@media (min-width: 800px) {
    .workspace {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 390px;
        min-height: 0;
        overflow: hidden;
    }

    .map-stage {
        position: relative;
        grid-column: 1;
    }

    .control-panel {
        position: relative;
        grid-column: 2;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        border-width: 0 0 0 1px;
        box-shadow: none;
    }

    .sheet-handle {
        display: none;
    }

    .panel-scroll {
        height: calc(100% - 53px);
        max-height: calc(100% - 53px);
    }

    .tabs-shell {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        align-items: center;
        height: 53px;
        border-bottom: 1px solid var(--line);
    }

    .tabs {
        grid-column: 2;
        width: 100%;
        height: 52px;
        padding-top: 7px;
        padding-right: 0;
        padding-left: 0;
        border-bottom: 0;
    }

    .tab-scroll-button {
        display: grid;
        position: static;
        top: auto;
        place-items: center;
        justify-self: center;
    }

    .tab-scroll-left {
        grid-column: 1;
    }

    .tab-scroll-right {
        grid-column: 3;
    }

    .quick-actions {
        bottom: 20px;
    }

    .map-tools-right {
        right: 12px;
    }
}

@media (max-width: 430px) {
    .brand-mark {
        display: none;
    }

    .brand p {
        max-width: 125px;
    }

    .header-status {
        gap: 4px;
    }

    .status-chip,
    .score-chip {
        padding: 4px 7px;
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *:before,
    *:after {
        transition: none !important;
        animation: none !important;
    }
}
