/* Mobile map controls: clear roads, readable sheets, and one thumb-level action. */
html.kd-mobile-shell {
  --kd-mobile-ink:#182a43;
  --kd-mobile-muted:#52657d;
  --kd-mobile-line:#d8e1ec;
  --kd-mobile-sheet:#fff;
  --kd-mobile-control:rgba(255,255,255,.92);
  --kd-mobile-blue:#156bf2;
  --kd-mobile-shadow:0 6px 20px #18355214,inset 0 1px 0 #ffffffb0;
  --kd-tabs-height:calc(66px + var(--kd-safe-bottom));
  color-scheme:light;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html.kd-mobile-shell[data-theme="dark"] {
  --kd-mobile-ink:#eff5fd;
  --kd-mobile-muted:#b4c4d8;
  --kd-mobile-line:#314865;
  --kd-mobile-sheet:#18283d;
  --kd-mobile-control:rgba(24,40,61,.94);
  --kd-mobile-blue:#8bbcff;
  --kd-mobile-shadow:0 6px 20px #0003,inset 0 1px 0 #c4dcff25;
  color-scheme:dark;
}
html.kd-mobile-shell :is(button,a,input,select,textarea,summary):focus-visible {
  outline:3px solid var(--kd-mobile-blue);outline-offset:3px;
}
html.kd-mobile-shell :is(button,a,summary) {touch-action:manipulation;}
html.kd-mobile-shell[data-kd-screen="map"] .topbar {
  top:calc(var(--kd-app-offset-top) + var(--kd-safe-top) + 8px);
  left:calc(var(--kd-app-offset-left) + var(--kd-safe-left) + 10px);
  right:calc(var(--kd-safe-right) + 10px);height:48px;
}
html.kd-mobile-shell[data-kd-screen="map"] .brand {
  min-height:48px;padding:4px 10px 4px 5px;gap:7px;border-radius:16px;
  background:var(--kd-mobile-control);box-shadow:var(--kd-mobile-shadow);
}
html.kd-mobile-shell .brand-mark {width:34px;height:34px;flex-basis:34px;}
html.kd-mobile-shell .brand-name {font-size:16px;line-height:1.05;}
html.kd-mobile-shell .brand-na {font-size:8px;line-height:1.1;}
html.kd-mobile-shell .brand-drive {font-size:14px;line-height:1.05;}
html.kd-mobile-shell .topbar-actions {gap:6px;}
html.kd-mobile-shell .topbar-actions>button {
  background:var(--kd-mobile-control);color:var(--kd-mobile-ink);
  box-shadow:var(--kd-mobile-shadow);border-radius:50%;
}
html.kd-mobile-shell .map-screen .kd-map-top,
html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-map-top {
  top:calc(var(--kd-safe-top) + 64px);left:calc(var(--kd-safe-left) + 10px);right:calc(var(--kd-safe-right) + 10px);
  height:48px;min-height:48px;padding:2px 4px 2px 8px;gap:5px;
  border-radius:24px;background:var(--kd-mobile-control);box-shadow:var(--kd-mobile-shadow);
}
html.kd-mobile-shell .map-screen .kd-city-control select {
  font-size:15px;font-weight:650;min-height:44px;padding:4px 22px 4px 2px;color:var(--kd-mobile-ink);
}
html.kd-mobile-shell .map-screen .kd-map-styles button {
  font-size:11px;font-weight:600;padding:6px;min-height:44px;min-width:48px;
  border-radius:12px;color:var(--kd-mobile-muted);
}
html.kd-mobile-shell .map-screen .kd-map-styles button.is-selected {background:#156bf215;color:#1557b4;box-shadow:none;}
html.kd-mobile-shell[data-theme="dark"] .map-screen .kd-map-styles button.is-selected {background:#8bbcff25;color:#d9e9ff;}
html.kd-mobile-shell .map-screen .kd-map-modes,
html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-map-modes {
  top:calc(var(--kd-safe-top) + 120px);left:calc(var(--kd-safe-left) + 10px);
  width:min(238px,calc(100% - 78px - var(--kd-safe-left) - var(--kd-safe-right)));
  min-height:48px;padding:2px;gap:2px;border-radius:25px;
  background:var(--kd-mobile-control);box-shadow:var(--kd-mobile-shadow);
}
html.kd-mobile-shell .map-screen .kd-map-modes button {font-size:14px;font-weight:650;min-height:44px;border-radius:22px;padding:6px 8px;}
html.kd-mobile-shell .map-screen .kd-map-modes button>span {font-size:19px;}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-source-status,
html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-source-status {
  top:calc(var(--kd-safe-top) + 176px);left:calc(var(--kd-safe-left) + 10px);
  min-height:48px;max-width:calc(100% - 78px - var(--kd-safe-left) - var(--kd-safe-right));
  padding:4px 5px 4px 9px;gap:6px;border-radius:14px;
  background:var(--kd-mobile-control);box-shadow:var(--kd-mobile-shadow);
}
html.kd-mobile-shell .map-screen .kd-source-status strong {font-size:11px;line-height:1.3;color:var(--kd-mobile-ink);}
html.kd-mobile-shell .map-screen .kd-source-status div>span {font-size:10px;line-height:1.35;color:var(--kd-mobile-muted);}
html.kd-mobile-shell .map-screen .kd-source-status>button {min-width:44px;width:44px;min-height:44px;height:44px;}
html.kd-mobile-shell .map-screen .kd-source-beta {display:none;}
html.kd-mobile-shell .map-screen .kd-map-tools {
  top:calc(var(--kd-safe-top) + 120px);right:calc(var(--kd-safe-right) + 10px);gap:6px;
}
html.kd-mobile-shell .map-screen .kd-map-tools button {background:var(--kd-mobile-control);box-shadow:var(--kd-mobile-shadow);}
html.kd-mobile-shell .map-screen .kd-map-tools button:first-child {margin-bottom:0;}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-map-tip {
  top:calc(var(--kd-safe-top) + 238px);left:calc(var(--kd-safe-left) + 10px);
  font-size:12px;line-height:1.45;
}
html.kd-mobile-shell:not([data-kd-keyboard-open="true"]) .map-screen .kd-map-workspace .kd-route-panel,
html.kd-mobile-shell:not([data-kd-keyboard-open="true"]) .map-screen .kd-map-workspace.kd-map-immersive .kd-route-panel {
  top:auto;left:calc(var(--kd-safe-left) + 10px);right:calc(var(--kd-safe-right) + 10px);
  bottom:calc(var(--kd-tab-reserve) + 6px);width:auto;
  max-height:max(64px,min(calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 74px),max(220px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 246px))));
  border-radius:24px;background:var(--kd-mobile-sheet);color:var(--kd-mobile-ink);
  border-color:var(--kd-mobile-line);box-shadow:0 -4px 28px #18355218;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  scroll-padding-top:72px;scroll-padding-bottom:20px;
}
html.kd-mobile-shell .map-screen .kd-route-toggle {
  position:sticky;top:0;z-index:2;min-height:64px;padding:14px 16px 12px;
  background:var(--kd-mobile-sheet);color:var(--kd-mobile-ink);
}
html.kd-mobile-shell .map-screen .kd-route-toggle small {color:var(--kd-mobile-muted);font-size:12px;line-height:1.4;}
html.kd-mobile-shell .map-screen .kd-route-toggle strong {font-size:16px;line-height:1.35;}
html.kd-mobile-shell .map-screen .kd-route-content {padding:0 16px 18px;}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-route-fields {display:flex;flex-direction:column;gap:20px;position:relative;}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-route-field {
  width:100%;min-height:72px;padding:11px 12px;margin:0;border-radius:16px;gap:8px;
  background:var(--kd-mobile-sheet);border-color:var(--kd-mobile-line);
}
html.kd-mobile-shell .map-screen .kd-route-field input {font-size:16px;line-height:1.4;min-height:34px;color:var(--kd-mobile-ink);}
html.kd-mobile-shell .map-screen .kd-route-field-main>span:first-child {font-size:12px;color:var(--kd-mobile-muted);}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-route-fields .kd-route-field>button.kd-route-pick {
  width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:0;flex-shrink:0;
  background:#156bf211;color:var(--kd-mobile-blue);border-radius:12px;
}
html.kd-mobile-shell .map-screen .kd-route-pick::before {content:'⌖';font-size:25px;line-height:1;}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-swap-button {
  position:absolute;right:12px;left:auto;top:calc(50% - 22px);z-index:1;
  width:44px;height:44px;min-height:44px;min-width:44px;
  background:var(--kd-mobile-sheet);border-color:var(--kd-mobile-line);border-radius:12px;
}
html.kd-mobile-shell .map-screen .kd-route-options {padding:3px;border-radius:24px;border-color:var(--kd-mobile-line);background:#52657d0c;}
html.kd-mobile-shell .map-screen .kd-route-options button {font-size:13px;line-height:1.25;min-height:44px;padding:5px;border-radius:21px;}
html.kd-mobile-shell .map-screen .kd-route-options button[aria-pressed="true"] {background:#156bf2;color:#fff;box-shadow:none;}
html.kd-mobile-shell .map-screen :is(.kd-route-help,.kd-route-message,.kd-route-proof,.kd-route-scope) {font-size:12px;line-height:1.5;color:var(--kd-mobile-muted);}
html.kd-mobile-shell .map-screen .kd-route-primary {min-height:48px;background:#156bf2;box-shadow:none;font-size:14px;border-radius:14px;}
html.kd-mobile-shell .map-screen .kd-route-primary:disabled {background:#e2e9f2;color:#5d7089;}
html.kd-mobile-shell[data-theme="dark"] .map-screen .kd-route-primary:disabled {background:#2d4058;color:#b4c4d8;}
html.kd-mobile-shell .map-screen .kd-route-comparison {gap:6px;}
html.kd-mobile-shell .map-screen .kd-route-comparison>div {border-color:var(--kd-mobile-line);background:#52657d08;border-radius:14px;padding:11px;}
html.kd-mobile-shell .map-screen .kd-route-comparison>div.is-selected {border-color:#156bf26b;background:#156bf20c;}
html.kd-mobile-shell .map-screen .kd-route-comparison strong {font-size:27px;font-variant-numeric:tabular-nums;}
html.kd-mobile-shell .map-screen .kd-route-comparison :is(span,small) {font-size:12px;}
html.kd-mobile-shell .map-screen .kd-route-transfer>p {font-size:12px;line-height:1.5;color:var(--kd-mobile-muted);}
html.kd-mobile-shell .map-screen .kd-route-yandex {font-size:14px;border-color:var(--kd-mobile-line);min-height:50px;}
html.kd-mobile-shell[data-theme="dark"] .map-screen :is(.kd-route-yandex,.kd-route-fit) {background:#263b56;color:#eff5fd;border-color:var(--kd-mobile-line);}
html.kd-mobile-shell .map-screen .kd-fuel-panel,
html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-fuel-panel {
  top:auto;left:calc(var(--kd-safe-left) + 10px);right:calc(var(--kd-safe-right) + 10px);
  bottom:calc(var(--kd-tab-reserve) + 6px);width:auto;padding:10px 16px 14px;
  max-height:max(180px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 188px));
  border-radius:24px;background:var(--kd-mobile-sheet);color:var(--kd-mobile-ink);
  border-color:var(--kd-mobile-line);backdrop-filter:none;-webkit-backdrop-filter:none;
}
html.kd-mobile-shell .map-screen .kd-fuel-panel.is-detail,
html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-fuel-panel.is-detail {
  height:max(180px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 188px));
}
html.kd-mobile-shell .map-screen .kd-fuel-sheet-handle {touch-action:none;}
html.kd-mobile-shell .map-screen .kd-fuel-header {min-height:44px;}
html.kd-mobile-shell .map-screen .kd-fuel-header-info strong {font-size:17px;line-height:1.35;}
html.kd-mobile-shell .map-screen .kd-fuel-header-info small {font-size:12px;line-height:1.4;color:var(--kd-mobile-muted);}
html.kd-mobile-shell .map-screen .kd-fuel-filter {border-radius:14px;font-size:14px;padding:8px 10px;}
html.kd-mobile-shell .map-screen .kd-fuel-filter select {font-size:16px;min-height:44px;background:var(--kd-mobile-sheet);color:var(--kd-mobile-ink);}
html.kd-mobile-shell .map-screen :is(.kd-fuel-layer-status,.kd-fuel-refresh,.kd-fuel-empty) {font-size:14px;line-height:1.5;}
html.kd-mobile-shell .map-screen :is(.kd-fuel-filter-note,.kd-fuel-health-note,.kd-fuel-detail-status,.kd-fuel-confirmation,.kd-fuel-catalog) {font-size:12px;line-height:1.55;color:var(--kd-mobile-muted);}
html.kd-mobile-shell .map-screen :is(.kd-fuel-stock,.kd-fuel-secondary,.kd-fuel-queue) {padding:13px;border-radius:16px;background:#52657d06;border-color:var(--kd-mobile-line);}
html.kd-mobile-shell .map-screen :is(.kd-fuel-section-title,.kd-fuel-queue>span) {font-size:13px;line-height:1.45;}
html.kd-mobile-shell .map-screen .kd-fuel-tile {padding:10px;gap:4px;border-radius:12px;}
html.kd-mobile-shell .map-screen .kd-fuel-tile-grade {font-size:15px;}
html.kd-mobile-shell .map-screen .kd-fuel-tile-value {font-size:13px;line-height:1.4;}
html.kd-mobile-shell .map-screen :is(.kd-fuel-tile small,.kd-fuel-payment-time,.kd-fuel-queue small,.kd-fuel-queue-scale small,.kd-fuel-group-label) {font-size:11px;line-height:1.45;}
html.kd-mobile-shell .map-screen .kd-fuel-record-details summary,
html.kd-mobile-shell .map-screen .kd-fuel-reports summary {font-size:12px;min-height:44px;}
html.kd-mobile-shell .map-screen .kd-fuel-card-footer .kd-fuel-route {min-height:48px;font-size:14px;background:#156bf2;}
html.kd-mobile-shell .map-screen .kd-community-panel {background:var(--kd-mobile-sheet);border-color:var(--kd-mobile-line);}
html.kd-mobile-shell .map-screen [data-community-content] {font-size:14px;line-height:1.55;overflow-wrap:anywhere;}
html.kd-mobile-shell .map-screen .kd-community-panel h2 {font-size:20px;line-height:1.3;}
html.kd-mobile-shell .map-screen .kd-community-panel button {min-height:48px;font-size:14px;}
html.kd-mobile-shell .map-screen .kd-dps-popup .leaflet-popup-content {font-size:14px;line-height:1.5;}
html.kd-mobile-shell body .mobile-nav {
  top:calc(var(--kd-app-offset-top) + var(--kd-app-visible-height) - var(--kd-safe-bottom) - 66px)!important;
  left:calc(var(--kd-app-offset-left) + var(--kd-safe-left) + 10px)!important;
  width:calc(var(--kd-app-visible-width) - var(--kd-safe-left) - var(--kd-safe-right) - 20px)!important;
  height:62px;min-height:62px;padding:5px 6px!important;gap:3px!important;border-radius:31px;
  background:var(--kd-mobile-control);box-shadow:var(--kd-mobile-shadow);
}
html.kd-mobile-shell body .mobile-nav button {font-size:12px!important;font-weight:600;min-height:48px;border-radius:25px;color:var(--kd-mobile-muted);}
html.kd-mobile-shell body .mobile-nav button.active {color:#1557b4;background:#156bf215;}
html.kd-mobile-shell body .mobile-nav button.active>span {color:inherit;}
html.kd-mobile-shell[data-theme="dark"] body .mobile-nav button.active {color:#d9e9ff;background:#8bbcff25;}
/* Glass is confined to the navigation layer; forms keep an opaque reading surface. */
html.kd-mobile-shell .map-screen .kd-community-add {
  border:1px solid var(--kd-glass-edge);border-radius:24px;
  background:var(--kd-mobile-control);color:var(--kd-mobile-ink);box-shadow:var(--kd-mobile-shadow);
}
html.kd-mobile-shell .map-screen .kd-map-workspace .kd-map-expand {display:none;}
html.kd-mobile-shell .map-screen .kd-community-add {
  left:calc(50% + (var(--kd-safe-left) - var(--kd-safe-right))/2);right:auto;
  translate:-50% 0;max-width:calc(100% - var(--kd-safe-left) - var(--kd-safe-right) - 32px);
}
@media(orientation:portrait) {
  html.kd-mobile-shell .map-screen .kd-map-workspace .kd-source-status,
  html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-source-status {
    top:calc(var(--kd-safe-top) + 8px);left:calc(var(--kd-safe-left) + 128px);right:calc(var(--kd-safe-right) + 106px);
    width:auto;max-width:none;min-height:48px;height:48px;padding:2px 0 2px 7px;gap:0;border-radius:16px;
  }
  html.kd-mobile-shell .map-screen .kd-source-status>.kd-source-detail,
  html.kd-mobile-shell .map-screen .kd-source-status>.kd-status-dot {display:none;}
  html.kd-mobile-shell .map-screen .kd-source-status>.kd-source-compact {display:grid;flex:1;gap:2px;min-width:0;}
  html.kd-mobile-shell .map-screen .kd-source-compact strong {font-size:13px;white-space:nowrap;line-height:1.15;}
  html.kd-mobile-shell .map-screen .kd-source-compact strong small {font-size:9px;font-weight:500;margin-left:3px;}
  html.kd-mobile-shell .map-screen .kd-source-compact>span {font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.15;margin:0;}
  html.kd-mobile-shell .map-screen .kd-map-workspace .kd-map-tip {top:calc(var(--kd-safe-top) + 180px);}
}
@media(orientation:portrait) and (max-width:360px) {
  html.kd-mobile-shell .map-screen .kd-source-compact strong small {display:none;}
  html.kd-mobile-shell .map-screen .kd-source-compact>span {font-size:8px;}
}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  html.kd-mobile-shell {--kd-mobile-control:rgba(248,252,255,.78);}
  html.kd-mobile-shell[data-theme="dark"] {--kd-mobile-control:rgba(24,40,61,.82);}
  html.kd-mobile-shell .map-screen :is(.kd-map-modes,.kd-community-add) {
    -webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);
  }
}
html.kd-mobile-shell .map-screen :is(.kd-map-modes button,.kd-community-add,.kd-route-options button,.kd-route-primary) {
  transition:background-color 160ms ease,transform 160ms ease;
}
html.kd-mobile-shell .map-screen :is(.kd-community-add,.kd-route-primary):active {transform:scale(.98);}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  html.kd-mobile-shell,html.kd-mobile-shell[data-theme="dark"] {--kd-mobile-control:var(--kd-mobile-sheet);}
  html.kd-mobile-shell .map-screen :is(.kd-map-modes,.kd-community-add) {backdrop-filter:none;-webkit-backdrop-filter:none;}
}
@media(prefers-reduced-motion:reduce) {
  html.kd-mobile-shell .map-screen :is(.kd-map-modes button,.kd-community-add,.kd-route-options button,.kd-route-primary) {transition:none;}
  html.kd-mobile-shell .map-screen :is(.kd-community-add,.kd-route-primary):active {transform:none;}
}
@media(max-width:360px) {
  html.kd-mobile-shell .map-screen .kd-map-styles button {font-size:10px;min-width:44px;padding:4px;}
  html.kd-mobile-shell .map-screen .kd-route-content {padding-inline:12px;}
  html.kd-mobile-shell .map-screen .kd-route-toggle {padding-inline:12px;}
}
@media(max-width:900px) and (orientation:portrait) and (max-height:700px) {
  html.kd-mobile-shell:not([data-kd-keyboard-open="true"]) .map-screen .kd-map-workspace .kd-route-panel,
  html.kd-mobile-shell:not([data-kd-keyboard-open="true"]) .map-screen .kd-map-workspace.kd-map-immersive .kd-route-panel {
    max-height:max(64px,min(calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 74px),max(220px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 188px))));
  }
}
@media(max-width:900px) and (orientation:landscape) and (max-height:540px) {
  html.kd-mobile-shell {--kd-tabs-height:calc(54px + var(--kd-safe-bottom));}
  html.kd-mobile-shell body .mobile-nav {top:calc(var(--kd-app-offset-top) + var(--kd-app-visible-height) - var(--kd-safe-bottom) - 54px)!important;height:50px;min-height:50px;padding:3px 5px!important;}
  html.kd-mobile-shell body .mobile-nav button {min-height:44px;font-size:11px!important;padding:2px!important;gap:1px;}
  html.kd-mobile-shell body .mobile-nav button svg {width:18px;height:18px;}
  html.kd-mobile-shell .map-screen .kd-map-top,
  html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-map-top {top:calc(var(--kd-safe-top) + 8px);left:calc(var(--kd-safe-left) + 152px);right:calc(var(--kd-safe-right) + 110px);}
  html.kd-mobile-shell .map-screen .kd-map-styles button {min-width:44px;padding-inline:4px;font-size:10px;}
  html.kd-mobile-shell .map-screen .kd-map-modes,
  html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-map-modes {top:calc(var(--kd-safe-top) + 64px);left:auto;right:calc(var(--kd-safe-right) + 64px);width:min(224px,calc(50% - 78px - var(--kd-safe-right)));}
  html.kd-mobile-shell .map-screen .kd-map-tools {top:calc(var(--kd-safe-top) + 64px);}
  html.kd-mobile-shell .map-screen .kd-map-workspace .kd-source-status,
  html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-source-status {top:calc(var(--kd-safe-top) + 120px);left:auto;right:calc(var(--kd-safe-right) + 64px);max-width:calc(50% - 78px - var(--kd-safe-right));}
  html.kd-mobile-shell:not([data-kd-keyboard-open="true"]) .map-screen .kd-map-workspace .kd-route-panel,
  html.kd-mobile-shell:not([data-kd-keyboard-open="true"]) .map-screen .kd-map-workspace.kd-map-immersive .kd-route-panel {
    left:calc(var(--kd-safe-left) + 10px);right:auto;width:calc(50% - var(--kd-safe-left) - 20px);
    bottom:calc(var(--kd-tab-reserve) + 6px);max-height:max(64px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 76px));
  }
  html.kd-mobile-shell .map-screen .kd-route-toggle {min-height:54px;padding:12px 12px 10px;}
  html.kd-mobile-shell .map-screen .kd-route-toggle strong {font-size:14px;}
  html.kd-mobile-shell .map-screen .kd-route-toggle small {font-size:11px;}
  html.kd-mobile-shell .map-screen .kd-route-content {padding-inline:12px;}
  html.kd-mobile-shell .map-screen .kd-fuel-panel,
  html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-fuel-panel {
    top:auto;left:calc(var(--kd-safe-left) + 10px);right:auto;width:calc(50% - var(--kd-safe-left) - 20px);padding:6px 12px 8px;
    bottom:calc(var(--kd-tab-reserve) + 6px);max-height:calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 76px);
  }
  html.kd-mobile-shell .map-screen .kd-fuel-panel.is-detail,
  html.kd-mobile-shell .map-screen .kd-map-workspace.kd-map-immersive .kd-fuel-panel.is-detail {height:calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 76px);}
  html.kd-mobile-shell .map-screen .kd-fuel-sheet-handle {display:none;}
  html.kd-mobile-shell .map-screen .kd-fuel-header.has-identity {padding-bottom:4px;margin-bottom:4px;gap:5px;align-items:center;}
  html.kd-mobile-shell .map-screen .kd-fuel-header-info {padding:0;}
  html.kd-mobile-shell .map-screen .kd-fuel-header-info strong {font-size:15px;-webkit-line-clamp:1;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;}
  html.kd-mobile-shell .map-screen .kd-fuel-header-info small {font-size:11px;-webkit-line-clamp:1;margin-top:2px;}
  html.kd-mobile-shell .map-screen .kd-fuel-card-footer {padding-top:5px;margin-top:4px;}
  html.kd-mobile-shell .map-screen .kd-fuel-card-footer .kd-fuel-route {min-height:44px;padding:8px 10px;font-size:13px;}
  html.kd-mobile-shell .map-screen .kd-map-workspace .kd-map-expand {bottom:calc(var(--kd-tab-reserve) + 10px);}
}
/* A short Telegram viewport gives the active sheet priority over map HUD. */
@media(orientation:portrait) {
  html.kd-mobile-shell[data-kd-compact-height="true"][data-kd-screen="map"]:has(.kd-routing-open,.kd-fuel-panel-open) .topbar {display:none;}
  html.kd-mobile-shell[data-kd-compact-height="true"] .map-screen :is(.kd-routing-open,.kd-fuel-panel-open) :is(.kd-map-top,.kd-map-modes,.kd-source-status,.kd-map-tools,.kd-map-tip) {display:none;}
  html.kd-mobile-shell[data-kd-compact-height="true"] .map-screen .kd-map-workspace.kd-routing-open .kd-route-panel {
    max-height:max(64px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 20px));
  }
  html.kd-mobile-shell[data-kd-compact-height="true"] .map-screen .kd-map-workspace.kd-fuel-panel-open .kd-fuel-panel {
    max-height:max(140px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 20px));
  }
  html.kd-mobile-shell[data-kd-compact-height="true"] .map-screen .kd-map-workspace.kd-fuel-panel-open .kd-fuel-panel.is-detail {
    height:max(140px,calc(var(--kd-app-visible-height) - var(--kd-tab-reserve) - var(--kd-safe-top) - 20px));
  }
}
/* Keyboard rules follow every size rule, including landscape sheets. */
html.kd-mobile-shell[data-kd-keyboard-open="true"] .map-screen :is(.kd-map-modes,.kd-map-top,.kd-map-tools) {display:none;}
html.kd-mobile-shell[data-kd-keyboard-open="true"] .map-screen .kd-map-workspace .kd-route-panel,
html.kd-mobile-shell[data-kd-keyboard-open="true"] .map-screen .kd-map-workspace.kd-map-immersive .kd-route-panel {
  top:auto;left:calc(var(--kd-safe-left) + 10px);right:calc(var(--kd-safe-right) + 10px);width:auto;
  bottom:calc(var(--kd-safe-bottom) + 8px);max-height:max(64px,calc(var(--kd-app-visible-height) - var(--kd-safe-top) - var(--kd-safe-bottom) - 16px));
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  html.kd-mobile-shell {--kd-mobile-control:var(--kd-mobile-sheet);}
}
@media(prefers-reduced-motion:reduce) {
  html.kd-mobile-shell .map-screen :is(.kd-route-panel,.kd-fuel-panel,.kd-route-result,.kd-route-content) {animation:none!important;transition:none!important;}
}

html.kd-mobile-shell .map-screen .kd-dps-popup .leaflet-popup-content{font-size:13px;line-height:1.4;margin:12px 30px 12px 12px}
html.kd-mobile-shell .map-screen .kd-dps-popup .leaflet-popup-content-wrapper{border-radius:16px}
html.kd-mobile-shell .map-screen .kd-dps-popup .kd-community-note{font-size:11px!important;line-height:1.35}

/* Desktop keeps map freshness beside the city and style controls, on one row. */
@media(min-width:901px) {
  html:not(.kd-mobile-shell) .map-screen .kd-map-workspace .kd-community-add {
    left:50%;right:auto;transform:translateX(-50%);
  }
  html:not(.kd-mobile-shell) .map-screen .kd-map-workspace .kd-map-top {
    top:calc(var(--kd-safe-top,0px) + 14px);
    left:calc(var(--kd-safe-left,0px) + 20px);right:calc(var(--kd-safe-right,0px) + 220px);
  }
  html:not(.kd-mobile-shell) .map-screen .kd-map-workspace .kd-source-status {
    top:calc(var(--kd-safe-top,0px) + 14px);left:auto;right:calc(var(--kd-safe-right,0px) + 20px);
    width:188px;max-width:none;height:56px;min-height:56px;padding:5px 6px 5px 12px;gap:6px;border-radius:18px;
  }
  html:not(.kd-mobile-shell) .map-screen .kd-source-status>:is(.kd-source-detail,.kd-status-dot,.kd-source-beta) {display:none;}
  html:not(.kd-mobile-shell) .map-screen .kd-source-status>.kd-source-compact {display:grid;flex:1;gap:2px;min-width:0;}
  html:not(.kd-mobile-shell) .map-screen .kd-source-compact strong {font-size:14px;white-space:nowrap;line-height:1.2;}
  html:not(.kd-mobile-shell) .map-screen .kd-source-compact strong small {font-size:10px;font-weight:500;margin-left:4px;}
  html:not(.kd-mobile-shell) .map-screen .kd-source-compact>span {font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2;margin:0;}
  html:not(.kd-mobile-shell) .map-screen .kd-source-status>button {width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;flex:none;}
  html:not(.kd-mobile-shell) .map-screen .kd-map-workspace.kd-map-immersive :is(.kd-map-top,.kd-source-status) {top:calc(var(--kd-safe-top,0px) + 68px);}
}
