/* Mobile-first application shell for WebGIS. Loaded after the desktop styles. */
.mobile-bottom-nav,
.mobile-bottom-sheet,
.mobile-sheet-backdrop {
  display: none;
}

.visual-advanced-settings > summary,
.owner-manual-settings > summary {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-header-h: 56px;
    --mobile-nav-h: 68px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-sheet-radius: 22px;
  }

  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body {
    background: #dbe5df;
    touch-action: manipulation;
  }

  body.mobile-sheet-lock {
    overflow: hidden !important;
  }

  .app-shell {
    width: 100%;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden;
  }

  .topbar {
    position: fixed !important;
    z-index: 1200;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    min-height: var(--mobile-header-h) !important;
    height: var(--mobile-header-h);
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 8px !important;
    padding: 7px 10px calc(7px + env(safe-area-inset-top, 0px)) !important;
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 4px 18px rgba(17, 36, 24, .18);
  }

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

  .brand-logo {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy .eyebrow {
    overflow: hidden;
    color: rgba(226, 239, 225, .72);
    font-size: .56rem;
    letter-spacing: .1em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar h1 {
    overflow: hidden;
    margin-top: 1px;
    font-size: .94rem !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-subtitle,
  .topbar .mode-switch,
  .topbar .topbar-actions {
    display: none !important;
  }

  .topbar-status {
    justify-self: end !important;
    display: grid !important;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: rgba(255,255,255,.06);
  }

  .topbar-status #storage-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
  }

  .topbar-status .status-dot {
    width: 10px;
    height: 10px;
  }

  .topbar-status {
    display: none !important;
  }

  .webgis-session-panel {
    justify-self: end;
    max-width: none;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .webgis-session-identity {
    display: none !important;
  }

  .webgis-session-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 13px;
    font-size: 0;
  }

  .webgis-session-logout::before {
    content: "Keluar";
    font-size: 0.63rem;
    font-weight: 850;
  }

  .webgis-session-log::before {
    content: "Log";
    font-size: 0.63rem;
    font-weight: 850;
  }

  .workspace,
  body[data-mode="visual"] .workspace,
  body[data-left-collapsed="true"] .workspace,
  body[data-right-collapsed="true"] .workspace,
  body[data-map-focus="true"] .workspace {
    position: fixed;
    z-index: 1;
    top: var(--mobile-header-h);
    right: 0;
    bottom: calc(var(--mobile-nav-h) + var(--mobile-safe-bottom));
    left: 0;
    display: block !important;
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .workspace > .sidebar,
  .workspace > .data-drawer,
  .workspace > .visual-drawer {
    display: none !important;
  }

  .map-area {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    order: initial !important;
  }

  #map {
    width: 100%;
    height: 100%;
  }

  .leaflet-control-zoom a {
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
    font-size: 21px !important;
  }

  .leaflet-top.leaflet-left {
    top: 54px;
    left: 6px;
  }

  .map-workspace-card {
    top: 10px !important;
    right: auto !important;
    bottom: auto !important;
    left: 10px !important;
    min-width: 0 !important;
    max-width: calc(100% - 172px);
    padding: 8px 10px !important;
    border-radius: 999px !important;
  }

  .map-workspace-card .map-card-kicker,
  .map-workspace-card .map-card-meta span:last-child {
    display: none;
  }

  .map-workspace-card strong {
    display: inline !important;
    margin: 0 !important;
    font-size: .76rem !important;
  }

  .map-workspace-card .map-card-meta {
    display: inline-flex;
    margin: 0 0 0 6px;
    font-size: .68rem;
  }

  .map-quick-toolbar {
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    display: flex;
    flex-direction: column;
    gap: 7px !important;
    max-width: none !important;
  }

  .map-icon-button,
  .map-floating-toolbar .toolbar-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
    padding: 0 !important;
    border-radius: 13px !important;
  }

  .map-floating-toolbar,
  .visual-toolbar {
    display: none !important;
  }

  .map-mode-badge {
    display: none !important;
  }

  .map-instruction {
    right: 12px;
    bottom: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: .7rem;
    line-height: 1.35;
  }

  body.mobile-sheet-open .map-instruction {
    opacity: 0;
    pointer-events: none;
  }

  .map-legend {
    right: 10px !important;
    bottom: 12px !important;
    min-width: 148px !important;
    max-width: calc(100% - 20px);
    padding: 9px !important;
    border-radius: 13px !important;
    font-size: .66rem !important;
  }

  body.mobile-sheet-open .map-legend {
    bottom: 10px !important;
    transform: scale(.92);
    transform-origin: bottom right;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1400;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(var(--mobile-nav-h) + var(--mobile-safe-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 5px calc(5px + var(--mobile-safe-bottom));
    border-top: 1px solid #dce6df;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 24px rgba(20, 47, 29, .12);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-button {
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border: 0;
    border-radius: 14px;
    color: #64756b;
    background: transparent;
    font-size: .62rem;
    font-weight: 760;
  }

  .mobile-nav-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-nav-button.active {
    color: #194b30;
    background: #e9f3e9;
  }

  .mobile-nav-button.active svg {
    transform: translateY(-1px);
  }

  .mobile-sheet-backdrop {
    position: fixed;
    z-index: 1240;
    inset: 0 0 calc(var(--mobile-nav-h) + var(--mobile-safe-bottom));
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(7, 23, 13, .3);
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.mobile-sheet-open.mobile-sheet-full .mobile-sheet-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-bottom-sheet {
    position: fixed;
    z-index: 1300;
    right: 0;
    bottom: calc(var(--mobile-nav-h) + var(--mobile-safe-bottom));
    left: 0;
    height: min(54dvh, 520px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(31, 75, 47, .12);
    border-bottom: 0;
    border-radius: var(--mobile-sheet-radius) var(--mobile-sheet-radius) 0 0;
    background: #f8faf8;
    box-shadow: 0 -14px 38px rgba(15, 42, 24, .2);
    transform: translateY(calc(100% + 12px));
    transition: transform .24s cubic-bezier(.2,.8,.2,1), height .24s ease;
    will-change: transform, height;
  }

  body.mobile-sheet-open .mobile-bottom-sheet {
    transform: translateY(0);
  }

  .mobile-bottom-sheet[data-size="peek"] {
    height: 116px;
  }

  .mobile-bottom-sheet[data-size="medium"] {
    height: min(54dvh, 520px);
  }

  .mobile-bottom-sheet[data-size="full"] {
    height: calc(100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - var(--mobile-safe-bottom));
  }

  .mobile-sheet-handle {
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    touch-action: none;
  }

  .mobile-sheet-handle::before {
    content: "";
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: #b5c2ba;
  }

  .mobile-sheet-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid #e1e9e3;
    background: rgba(248,250,248,.98);
  }

  .mobile-sheet-heading {
    min-width: 0;
  }

  .mobile-sheet-kicker {
    color: #6b7c71;
    font-size: .58rem;
    font-weight: 850;
    letter-spacing: .11em;
  }

  .mobile-sheet-title {
    overflow: hidden;
    margin: 2px 0 0;
    color: #1d3f2a;
    font-size: 1rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-sheet-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid #d7e1da;
    border-radius: 13px;
    color: #294b35;
    background: #fff;
    font-size: 1.35rem;
  }

  .mobile-field-context {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-bottom: 1px solid #e4ebe6;
    background: #f1f6f2;
  }

  .mobile-field-context label {
    color: #68796e;
    font-size: .68rem;
    font-weight: 800;
  }

  .mobile-field-context select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 34px 8px 10px;
    font-size: 16px;
  }

  .mobile-section-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 9px 12px;
    border-bottom: 1px solid #e4ebe6;
    background: #fff;
    scrollbar-width: none;
  }

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

  .mobile-tab-button {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid #d9e4dc;
    border-radius: 999px;
    color: #53675a;
    background: #fff;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-tab-button.active {
    border-color: #3f7b4c;
    color: #fff;
    background: #3f7b4c;
  }

  .mobile-sheet-content {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: 96px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-bottom-sheet[data-size="peek"] .mobile-field-context,
  .mobile-bottom-sheet[data-size="peek"] .mobile-section-tabs,
  .mobile-bottom-sheet[data-size="peek"] .mobile-sheet-content {
    display: none;
  }

  .mobile-peek-status {
    display: none;
    flex: 1 1 auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #51655a;
    font-size: .72rem;
    line-height: 1.3;
  }

  .mobile-bottom-sheet[data-size="peek"] .mobile-peek-status {
    display: flex;
  }

  .mobile-peek-status::before {
    content: "";
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #3f7b4c;
    box-shadow: 0 0 0 4px rgba(63,123,76,.12);
  }

  /* Nodes moved from the desktop columns into the mobile sheet. */
  .mobile-sheet-content > .panel,
  .mobile-sheet-content > .data-drawer,
  .mobile-sheet-content > .visual-drawer {
    display: block !important;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1 !important;
    transform: none !important;
  }

  .mobile-sheet-content .mode-input-only,
  .mobile-sheet-content .mode-visual-only {
    display: block !important;
  }

  .mobile-sheet-content .panel-heading,
  .mobile-sheet-content .drawer-header {
    display: none;
  }

  .mobile-sheet-content .panel-body {
    display: block !important;
  }

  .mobile-sheet-content .panel-ornament,
  .mobile-sheet-content .helper-text:has(strong:first-child:last-child) {
    display: none;
  }

  .mobile-sheet-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .mobile-sheet-content select,
  .report-modal input:not([type="checkbox"]):not([type="radio"]),
  .report-modal select {
    min-height: 48px;
    font-size: 16px !important;
  }

  .mobile-sheet-content textarea {
    font-size: 16px;
  }

  .mobile-sheet-content .button,
  .mobile-sheet-content .text-button,
  .mobile-sheet-content .icon-button,
  .mobile-sheet-content .panel-toggle,
  .mobile-sheet-content .point-actions button,
  .mobile-sheet-content .owner-actions button {
    min-height: 44px;
  }

  .mobile-sheet-content .icon-button,
  .mobile-sheet-content .panel-toggle {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }

  .mobile-sheet-content .coordinate-grid,
  .mobile-sheet-content .nutrient-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mobile-sheet-content .quick-actions-row,
  .mobile-sheet-content .result-actions,
  .mobile-sheet-content .drawer-actions {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .mobile-sheet-content .button.full,
  .mobile-sheet-content #save-point {
    position: static;
    min-height: 50px;
    margin-top: 10px;
    box-shadow: none;
  }

  .mobile-sheet-content .input-stepper {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .mobile-sheet-content .step-chip {
    flex: 0 0 auto;
  }

  .mobile-sheet-content .field-hero-card {
    padding: 11px;
  }

  .mobile-sheet-content .field-mode-block {
    display: none;
  }

  .mobile-sheet-content .field-meta-row {
    align-items: center;
  }

  .mobile-sheet-content .field-meta-row > span {
    font-size: .7rem;
  }

  .mobile-sheet-content .average-strip,
  .mobile-sheet-content .area-summary-strip {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .mobile-sheet-content .fertilizer-card > div:last-child {
    min-width: 0;
  }

  .mobile-sheet-content .owner-actions,
  .mobile-sheet-content .point-actions {
    gap: 7px;
  }

  .mobile-sheet-content .owner-actions button,
  .mobile-sheet-content .point-actions button {
    flex: 1 1 auto;
    padding: 8px 10px;
  }

  .mobile-sheet-content .owner-vertex-handle {
    width: 30px !important;
    height: 30px !important;
  }

  .owner-manual-settings,
  .visual-advanced-settings {
    margin-top: 12px;
    border: 1px solid #dce5df;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
  }

  .owner-manual-settings > summary,
  .visual-advanced-settings > summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: #2a5036;
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
    list-style: none;
  }

  .owner-manual-settings > summary::-webkit-details-marker,
  .visual-advanced-settings > summary::-webkit-details-marker {
    display: none;
  }

  .owner-manual-settings > summary::after,
  .visual-advanced-settings > summary::after {
    content: "+";
    font-size: 1rem;
  }

  .owner-manual-settings[open] > summary::after,
  .visual-advanced-settings[open] > summary::after {
    content: "−";
  }

  .owner-manual-settings > .owner-vertex-input-card,
  .visual-advanced-settings > .visual-advanced-body {
    margin: 0;
    padding: 0 12px 12px;
    border: 0;
    border-top: 1px solid #e7ede9;
    border-radius: 0;
    background: #fff;
  }

  .owner-manual-settings .owner-list-header.compact {
    display: none;
  }

  .mobile-visual-quick {
    display: grid;
    gap: 11px;
    margin: 12px 0;
  }

  .mobile-control-caption {
    color: #65766b;
    font-size: .69rem;
    font-weight: 800;
  }

  .mobile-chip-row,
  .mobile-segment-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-chip-row::-webkit-scrollbar,
  .mobile-segment-row::-webkit-scrollbar {
    display: none;
  }

  .mobile-layer-chip,
  .mobile-display-chip {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid #d9e4dc;
    border-radius: 999px;
    color: #4c6354;
    background: #fff;
    font-size: .72rem;
    font-weight: 820;
  }

  .mobile-layer-chip.active,
  .mobile-display-chip.active {
    border-color: #3f7b4c;
    color: #fff;
    background: #3f7b4c;
  }

  .mobile-sheet-content label[for="visual-layer"],
  .mobile-sheet-content #visual-layer,
  .mobile-sheet-content .raster-toggle-row,
  .mobile-sheet-content label[for="visual-display-mode"],
  .mobile-sheet-content #visual-display-mode {
    display: none !important;
  }

  .mobile-more-menu {
    display: grid;
    gap: 9px;
  }

  .mobile-more-action {
    width: 100%;
    min-height: 56px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #dce5df;
    border-radius: 14px;
    color: #24432f;
    background: #fff;
    text-align: left;
  }

  .mobile-more-action .mobile-more-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #2d6940;
    background: #eaf4ea;
    font-size: 1.1rem;
    font-weight: 900;
  }

  .mobile-more-action strong,
  .mobile-more-action small {
    display: block;
  }

  .mobile-more-action strong {
    font-size: .8rem;
  }

  .mobile-more-action small {
    margin-top: 2px;
    color: #718076;
    font-size: .67rem;
    line-height: 1.3;
  }

  .mobile-more-action::after {
    content: "›";
    color: #8a988f;
    font-size: 1.3rem;
  }

  /* Report and statistics become full-height mobile sheets. */
  .report-modal,
  .statistics-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .report-modal-shell,
  .statistics-modal-shell {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px)) !important;
    height: calc(100dvh - env(safe-area-inset-top, 0px));
    display: flex;
    flex-direction: column;
    border-radius: 22px 22px 0 0 !important;
  }

  .report-modal-header,
  .statistics-modal-header {
    min-height: 64px;
    flex: 0 0 auto;
    padding: 11px 14px !important;
  }

  .report-modal-header .icon-button,
  .statistics-modal-header .icon-button {
    width: 44px;
    height: 44px;
  }

  .report-modal-body,
  .statistics-modal-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto !important;
    padding: 12px 12px calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }

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

  .report-form-grid > * {
    grid-column: 1 !important;
  }

  .report-scope-grid {
    grid-template-columns: 1fr !important;
  }

  .report-scope-option {
    min-height: 62px;
    align-items: flex-start;
    padding: 11px !important;
  }

  .report-scope-option input,
  .report-owner-options input {
    width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    flex: 0 0 22px;
  }

  .report-modal-actions {
    position: sticky;
    z-index: 6;
    bottom: calc(-92px - env(safe-area-inset-bottom, 0px));
    display: grid !important;
    grid-template-columns: .8fr 1.2fr;
    gap: 9px;
    margin: 14px -12px calc(-92px - env(safe-area-inset-bottom, 0px)) !important;
    padding: 11px 12px calc(11px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid #dfe8e2;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 20px rgba(18, 48, 29, .08);
  }

  .report-modal-actions .button {
    min-height: 50px;
  }

  .statistics-card-grid,
  .fertilizer-stats-grid,
  .visual-stats-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 9px !important;
  }

  .statistics-card {
    min-height: 104px;
    padding: 12px !important;
  }

  .statistics-table-wrapper {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  .statistics-table {
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .statistics-table thead {
    display: none;
  }

  .statistics-table tbody,
  .statistics-table tr,
  .statistics-table td {
    display: block;
    width: 100%;
  }

  .statistics-table tr {
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #dce5df;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 50, 31, .05);
  }

  .statistics-table td {
    min-height: 38px;
    display: grid;
    grid-template-columns: minmax(112px, .8fr) minmax(0,1.2fr);
    align-items: center;
    gap: 10px;
    padding: 8px 11px !important;
    border-bottom: 1px solid #edf1ee !important;
    white-space: normal !important;
    text-align: right !important;
  }

  .statistics-table td::before {
    content: attr(data-label);
    color: #718076;
    font-size: .67rem;
    font-weight: 750;
    text-align: left;
  }

  .statistics-table td:first-child {
    grid-template-columns: 1fr;
    min-height: 48px;
    color: #234b31;
    background: #eff6f0;
    font-size: .82rem;
    font-weight: 850;
    text-align: left !important;
  }

  .statistics-table td:first-child::before {
    display: none;
  }

  .statistics-table td:last-child {
    border-bottom: 0 !important;
  }

  .statistics-empty-row td {
    display: block;
    padding: 18px !important;
    text-align: center !important;
  }

  .statistics-empty-row td::before {
    display: none;
  }

  .point-popup,
  .owner-popup {
    min-width: min(260px, calc(100vw - 74px));
  }

  .leaflet-popup-content {
    margin: 12px !important;
  }

  .popup-actions button {
    min-height: 42px;
    padding: 8px 11px;
  }
}

@media (max-width: 430px) {
  .mobile-sheet-content .coordinate-grid,
  .mobile-sheet-content .nutrient-grid,
  .mobile-sheet-content .quick-actions-row,
  .mobile-sheet-content .result-actions,
  .mobile-sheet-content .drawer-actions {
    grid-template-columns: 1fr;
  }

  .mobile-sheet-content .average-strip,
  .mobile-sheet-content .area-summary-strip {
    gap: 5px;
  }

  .mobile-sheet-content .average-strip > div,
  .mobile-sheet-content .area-summary-strip > div {
    padding: 8px 5px;
  }

  .mobile-nav-button {
    font-size: .58rem;
  }

  .mobile-nav-button svg {
    width: 21px;
    height: 21px;
  }

  .map-workspace-card {
    max-width: calc(100% - 160px);
  }
}

@media (max-width: 760px) and (orientation: landscape) and (max-height: 520px) {
  .mobile-bottom-sheet {
    top: var(--mobile-header-h);
    right: 0;
    bottom: calc(var(--mobile-nav-h) + var(--mobile-safe-bottom));
    left: auto;
    width: min(420px, 58vw);
    height: auto !important;
    border-radius: 20px 0 0 0;
    transform: translateX(calc(100% + 12px));
  }

  body.mobile-sheet-open .mobile-bottom-sheet {
    transform: translateX(0);
  }

  .mobile-sheet-backdrop {
    right: min(420px, 58vw);
  }
}
