:root {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #ffffff;
  --line: #d7dee8;
  --text: #17202c;
  --muted: #667383;
  --gold: #ffc629;
  --green: #2ca145;
  --red: #e84d3d;
  --black: #111821;
  --blue: #1688e8;
  --bolt-row-bg: rgba(23, 32, 44, 0.030);
  --bolt-row-bg-alt: rgba(23, 32, 44, 0.075);
  --editable-number-bg: #fff6cf;
  --editable-number-border: rgba(245, 185, 31, .58);
  --tablet-nav-width: 68%;
  --shadow: 0 10px 32px rgba(18, 28, 40, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafc;
  color: var(--text);
  font-weight: 750;
}

button:active {
  transform: translateY(1px);
}

.phone-shell {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
  padding: 12px 10px max(56px, calc(env(safe-area-inset-bottom) + 42px));
}

.login-card,
.search-panel,
.results-panel,
.editor-panel,
.point-navigator,
.mobile-header {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card {
  margin: 24px auto;
  padding: 20px;
}

.login-card img {
  display: block;
  width: 150px;
  margin: 0 auto 14px;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.maintenance-banner {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 13px;
  border: 1px solid #e0a912;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8d9, #fff3b5);
  color: #17202c;
  box-shadow: 0 10px 28px rgba(153, 105, 0, .14);
}

.maintenance-banner strong,
.maintenance-banner span {
  display: block;
}

.maintenance-banner strong {
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.15;
}

.maintenance-banner span {
  color: #654b00;
  font-weight: 750;
  line-height: 1.35;
}

.maintenance-graphic {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #17202c;
  color: #ffc629;
}

.maintenance-graphic svg {
  width: 49px;
  height: 49px;
  overflow: visible;
  fill: rgba(255, 198, 41, .15);
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.maintenance-graphic .maintenance-tool {
  fill: #ffc629;
  stroke: #17202c;
  stroke-width: 2;
}

label {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 16px;
}

textarea {
  resize: vertical;
  min-height: 118px;
}

.primary {
  width: 100%;
  border-color: #dfa600;
  background: linear-gradient(#ffd75a, #ffc01f);
  color: #111821;
}

.install-link {
  width: 100%;
  margin-top: 10px;
  border-color: rgba(223, 166, 0, .55);
  background: #fff9e6;
  color: #111821;
}

.install-message {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.mobile-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 10px;
}

.mobile-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
}

.mobile-title {
  min-width: 0;
}

.mobile-header-search {
  grid-column: 1 / -1;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
}

.mobile-menu {
  position: relative;
  z-index: 30;
}

.mobile-menu summary {
  position: relative;
  width: 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f9fafc;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  list-style: none;
}

.mobile-menu.has-unread summary {
  border-color: #7dc8ff;
  background: linear-gradient(180deg, #eef8ff, #dff1ff);
  color: #0b6fba;
}

.mobile-menu-icon,
.mobile-menu-mail {
  grid-area: 1 / 1;
  transition: opacity 160ms ease, transform 160ms ease;
}

.mobile-menu-mail {
  opacity: 0;
  transform: translateY(4px) scale(0.88);
}

.mobile-menu.has-unread .mobile-menu-icon {
  opacity: 0;
  transform: translateY(-4px) scale(0.88);
}

.mobile-menu.has-unread .mobile-menu-mail {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mobile-menu-unread {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: #f7f8fa;
  box-shadow: var(--shadow);
}

.mobile-menu-popover a,
.mobile-menu-popover button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  display: grid;
  align-items: center;
  color: var(--text);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
  text-align: left;
}

.mobile-menu-popover button.filter-active {
  border-color: rgba(22, 136, 232, .68);
  background: linear-gradient(180deg, #eef8ff, #dcefff);
  color: #075d9f;
  box-shadow: inset 0 0 0 2px rgba(22, 136, 232, .12);
}

.mobile-menu-popover .menu-chat-row {
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.mobile-menu-row-badge {
  min-width: 26px;
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.mobile-header strong {
  display: block;
  font-size: 19px;
}

.mobile-header span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.header-actions button,
.header-actions .header-link {
  min-height: 40px;
  padding: 7px 10px;
}

.header-actions .header-link {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(223, 166, 0, .55);
  border-radius: 8px;
  background: #fff9e6;
  color: #111821;
  text-decoration: none;
  font-weight: 800;
}

.search-panel,
.results-panel,
.editor-panel {
  padding: 10px;
}

.editor-panel {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

body.navigator-editor-fullscreen-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.editor-panel.editor-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483600 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  padding: 0 max(12px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  background: var(--panel);
  isolation: isolate;
}

.fullscreen-editor-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  min-height: calc(58px + env(safe-area-inset-top));
  margin: 0 -2px 12px;
  padding: max(8px, env(safe-area-inset-top)) 2px 8px;
  display: grid;
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr) minmax(118px, auto);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 18px rgba(26, 49, 70, .10);
  backdrop-filter: blur(12px);
}

.fullscreen-editor-bar[hidden] {
  display: none !important;
}

.fullscreen-editor-bar strong {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.fullscreen-editor-bar button {
  min-height: 42px;
  padding: 7px 10px;
  font-weight: 900;
}

.fullscreen-editor-bar .primary {
  border-color: rgba(44, 161, 69, .55);
  background: linear-gradient(#35bd56, #24913d);
  color: #fff;
}

body.navigator-editor-fullscreen-open .save-icon-button {
  display: none !important;
}

.point-coordinate-watermark {
  position: sticky;
  top: clamp(150px, 34vh, 300px);
  z-index: 0;
  display: grid;
  height: 0;
  place-items: center;
  overflow: visible;
  color: #197ac4;
  font-size: clamp(112px, 32vw, 220px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.055em;
  white-space: nowrap;
  opacity: .105;
  transform: rotate(-7deg);
  pointer-events: none;
  user-select: none;
}

.point-description-field {
  min-width: 0;
}

.point-description-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.point-description-heading button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(232, 77, 61, .32);
  background: #fff5f3;
  color: #b63227;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.point-description-heading button:disabled {
  border-color: var(--line);
  background: #f3f5f7;
  color: #aab3bc;
}

.editor-panel > :not(.point-coordinate-watermark) {
  position: relative;
  z-index: 1;
}

.search-box {
  position: relative;
  margin: 0 0 8px;
}

.search-box span {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.search-box input {
  padding-left: 44px;
  font-size: 18px;
  font-weight: 750;
  text-transform: uppercase;
}

.search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
}

.search-tools > *,
.search-tools select {
  min-width: 0;
  max-width: 100%;
}

.mobile-active-filters {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(22, 136, 232, .52);
  border-radius: 8px;
  padding: 7px 8px 7px 10px;
  background: linear-gradient(180deg, #eef8ff, #dcefff);
  color: #075d9f;
  box-shadow: 0 0 0 3px rgba(22, 136, 232, .08);
}

.mobile-active-filters strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-active-filters button {
  min-height: 34px;
  padding: 5px 8px;
  border-color: rgba(22, 136, 232, .48);
  background: #fff;
  color: #075d9f;
  font-size: 12px;
}

.neighbor-cell.filter-excluded {
  pointer-events: auto;
  touch-action: none;
  cursor: pointer;
  border-style: dashed;
  background: rgba(239, 245, 250, .72);
  color: #8795a4;
  opacity: .58;
}

.neighbor-cell.filter-excluded:active {
  border-color: rgba(22, 136, 232, .72);
  background: #dcefff;
  opacity: .92;
}

.neighbor-cell.filter-excluded .neighbor-arrow {
  color: #718293;
}

@media (max-width: 520px) {
  .search-tools {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .search-tools #searchButton {
    grid-column: 1 / -1;
  }
}

.point-navigator {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  contain: inline-size;
  overflow: hidden;
  padding: 10px;
}

.point-navigator.has-open-tools {
  z-index: 100;
  overflow: visible;
}

.tablet-split-resizer {
  display: none;
}

.point-navigator > .panel-title {
  display: block;
  width: 100%;
  min-width: 0;
}

.navigator-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
}

.navigator-head-actions #navigatorTitle {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navigator-rotation-controls {
  min-height: 42px;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(22, 136, 232, .42);
  border-radius: 8px;
  background: linear-gradient(180deg, #f5fbff, #e2f2ff);
  box-shadow: 0 6px 14px rgba(22, 136, 232, .10);
}

.navigator-rotation-controls button {
  width: 34px;
  min-width: 34px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0877cd;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.navigator-rotation-controls .navigator-compass-mode-toggle {
  width: 42px;
  min-width: 42px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(22, 136, 232, .28);
  border-left: 1px solid rgba(22, 136, 232, .28);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.navigator-rotation-controls .navigator-compass-mode-toggle.is-off {
  background: linear-gradient(180deg, #f35d50, #d83c31);
  box-shadow: inset 0 0 0 1px rgba(145, 24, 17, .16);
}

.navigator-rotation-controls .navigator-compass-mode-toggle.is-active {
  background: linear-gradient(180deg, #35bd56, #24913d);
  box-shadow: inset 0 0 0 1px rgba(11, 104, 42, .18);
}

.navigator-rotation-controls.is-auto .navigator-manual-rotate {
  visibility: hidden;
  pointer-events: none;
}

.navigator-fullscreen-toggle,
.navigator-overview-toggle {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 8px;
  display: grid;
  place-items: center;
  border-color: rgba(22, 136, 232, .42);
  background: linear-gradient(180deg, #f5fbff, #e2f2ff);
  color: #0877cd;
  box-shadow: 0 6px 14px rgba(22, 136, 232, .12);
}

.navigator-overview-toggle[aria-pressed="true"] {
  border-color: #1688e8;
  background: linear-gradient(180deg, #1688e8, #0876cb);
  color: #fff;
  box-shadow: 0 7px 18px rgba(22, 136, 232, .28);
}

.navigator-overview-toggle svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigator-overview-toggle svg circle {
  fill: currentColor;
  stroke: none;
}

.navigator-fullscreen-toggle svg {
  grid-area: 1 / 1;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigator-fullscreen-toggle .navigator-collapse-icon { display: none; }
.navigator-fullscreen-toggle[aria-pressed="true"] .navigator-expand-icon { display: none; }
.navigator-fullscreen-toggle[aria-pressed="true"] .navigator-collapse-icon { display: block; }

body.navigator-fullscreen-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.point-navigator.navigator-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
}

@media (max-width: 420px) {
  .point-navigator > .panel-title { gap: 6px; }
  .navigator-head-actions { gap: 5px; }
  .navigator-head-actions #navigatorTitle {
    font-size: 13px;
  }
  .navigator-fullscreen-toggle,
  .navigator-overview-toggle,
  .navigator-tools summary {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .navigator-rotation-controls {
    min-height: 40px;
  }
  .navigator-rotation-controls button {
    width: 26px;
    min-width: 26px;
    min-height: 38px;
    font-size: 16px;
  }
  .navigator-rotation-controls .navigator-compass-mode-toggle {
    width: 42px;
    min-width: 42px;
    padding: 0 2px;
    font-size: 11px;
  }
}

.point-navigator.navigator-fullscreen .panel-title {
  flex: 0 0 auto;
  min-height: 52px;
  margin-bottom: 8px;
}

.point-navigator.navigator-fullscreen .neighbor-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  touch-action: none;
  background: #f5f8fb;
}

.point-navigator.navigator-overview-open .neighbor-grid-rotator {
  visibility: hidden;
  pointer-events: none;
}

.navigator-overview[hidden] {
  display: none !important;
}

.navigator-overview {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 45%, rgba(22, 136, 232, .07), transparent 42%),
    linear-gradient(180deg, #fbfdff, #edf3f8);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.navigator-overview:active {
  cursor: grabbing;
}

.navigator-overview-pan {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.navigator-overview-map {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center;
  will-change: transform;
}

.navigator-overview-map svg {
  display: block;
  overflow: visible;
  pointer-events: none;
}

.overview-sector rect {
  fill: var(--sector-fill);
  stroke: var(--sector-stroke);
  stroke-width: 2;
  stroke-dasharray: 7 4;
  vector-effect: non-scaling-stroke;
}

.overview-sector-label rect {
  fill: rgba(255, 255, 255, .94);
  stroke: var(--sector-stroke);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 3px rgba(17, 35, 52, .20));
}

.overview-sector-label text {
  fill: #253849;
  stroke: rgba(255, 255, 255, .82);
  stroke-width: 2px;
  paint-order: stroke fill;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: .5px;
  vector-effect: non-scaling-stroke;
}

.overview-dot {
  vector-effect: non-scaling-stroke;
}

/* Ta sama informacja o fizycznym słupie co na kafelkowej mapie punktów. */
.overview-column-backing {
  fill: #d7dce1;
  stroke: #9da7b1;
  stroke-width: .9;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.overview-dot.todo {
  fill: #fff;
  stroke: #7c8793;
  stroke-width: 1.8;
}

.overview-dot.done { fill: #28a745; stroke: #168a34; stroke-width: .7; }
.overview-dot.attention { fill: #f2b41f; stroke: #c68600; stroke-width: .7; }
.overview-dot.problem { fill: #e84d3d; stroke: #b82c20; stroke-width: .7; }
.overview-dot.partial { fill: url(#overviewPartialDot); stroke: #111820; stroke-width: .8; }
.overview-dot.planned {
  fill: #fff;
  stroke: #1688e8;
  stroke-width: 1.8;
  stroke-dasharray: 4 2;
}

.overview-dot.lift circle {
  fill: #fff;
  stroke: #e84d3d;
  stroke-width: 1.8;
}

.overview-dot.lift text {
  fill: #c42f25;
  font-size: 2.65px;
  font-weight: 950;
  pointer-events: none;
}

.overview-dot.blocked circle {
  fill: #111820;
}

.overview-dot.blocked path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.overview-dot.missing circle {
  fill: #fff;
  stroke: #111820;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.overview-dot.missing path {
  fill: none;
  stroke: #111820;
  stroke-width: 1.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.overview-current circle:first-child {
  fill: rgba(22, 136, 232, .13);
  stroke: #1688e8;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  animation: navigator-overview-current-pulse 1.5s ease-in-out infinite;
}

.overview-current circle:nth-child(2) {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.overview-current path {
  fill: none;
  stroke: #0877cd;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

@keyframes navigator-overview-current-pulse {
  0%, 100% { stroke-opacity: .7; fill-opacity: .65; }
  50% { stroke-opacity: 1; fill-opacity: 1; }
}

.overview-gps path {
  fill: #0877cd;
  stroke: #fff;
  stroke-width: 2;
  paint-order: stroke fill;
  vector-effect: non-scaling-stroke;
}

.overview-range-selection {
  fill: rgba(22, 136, 232, .16);
  stroke: #1688e8;
  stroke-width: 2.5;
  stroke-dasharray: 6 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 3px rgba(7, 93, 159, .22));
}

.navigator-overview-labels-toggle,
.navigator-overview-readout,
.navigator-overview-hint {
  position: absolute;
  z-index: 9;
  border: 1px solid rgba(22, 136, 232, .28);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 5px 16px rgba(26, 49, 70, .13);
  backdrop-filter: blur(8px);
}

.navigator-overview-labels-toggle {
  top: 8px;
  left: 8px;
  min-height: 36px;
  padding: 6px 10px;
  color: #0877cd;
  font-size: 12px;
  font-weight: 900;
}

.navigator-overview-labels-toggle[aria-pressed="false"] {
  border-color: rgba(100, 115, 130, .30);
  color: #657382;
  background: rgba(247, 249, 251, .94);
}

.navigator-overview-readout {
  left: 8px;
  bottom: 38px;
  max-width: calc(100% - 16px);
  padding: 6px 9px;
  border-radius: 7px;
  color: #152536;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.navigator-overview-hint {
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  border-radius: 6px;
  color: #657382;
  font-size: 10px;
  font-weight: 750;
}

.point-navigator.navigator-fullscreen .neighbor-cell,
.point-navigator.navigator-fullscreen .neighbor-grid[data-size] .neighbor-cell {
  min-height: 0;
}

.navigator-tools {
  position: relative;
  z-index: 15;
}

.navigator-tools.is-open {
  z-index: 110;
}

.navigator-tools summary {
  width: 42px;
  min-height: 42px;
  border: 1px solid rgba(22, 136, 232, .42);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(#55b7ff, #1688e8);
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  box-shadow: 0 8px 18px rgba(22, 136, 232, .18);
}

.navigator-tools summary::-webkit-details-marker {
  display: none;
}

.navigator-tools-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: #f3f6f9;
  box-shadow: var(--shadow);
}

.navigator-tools-popover button {
  min-height: 42px;
  background: #fff;
  text-align: left;
  padding: 8px 10px;
}

.navigator-tools-popover small,
.navigator-tools-popover strong {
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.navigator-tools-popover .navigator-compass-toggle.is-active {
  border-color: rgba(22, 136, 232, .72);
  background: linear-gradient(180deg, #e9f6ff, #d8efff);
  color: #075d9f;
  box-shadow: inset 0 0 0 2px rgba(22, 136, 232, .14);
}

.navigator-tools-popover .navigator-compass-toggle.is-locked {
  border-color: rgba(223, 166, 0, .72);
  background: linear-gradient(180deg, #fff8dc, #ffedaa);
  color: #6d5100;
}

.navigator-tools-popover #selectNavigatorRange.is-active {
  border-color: rgba(22, 136, 232, .72);
  background: linear-gradient(180deg, #e9f6ff, #d8efff);
  color: #075d9f;
  box-shadow: inset 0 0 0 2px rgba(22, 136, 232, .14);
}

.mobile-range-panel[hidden] {
  display: none !important;
}

.mobile-range-panel {
  position: relative;
  z-index: 24;
  margin-top: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(0, 2fr);
  gap: 10px;
  align-items: end;
  border: 2px solid rgba(22, 136, 232, .55);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(239, 249, 255, .98), rgba(220, 241, 255, .98));
  box-shadow: 0 8px 22px rgba(22, 91, 144, .18);
}

.mobile-range-summary {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mobile-range-summary > span {
  color: #506476;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.mobile-range-summary > strong {
  color: #075d9f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 950;
}

.mobile-range-summary > small,
.mobile-range-summary > .message {
  margin: 0;
  color: #536b7e;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.mobile-range-summary > .message.error {
  color: #a02219;
}

.mobile-range-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(96px, auto));
  gap: 7px;
  align-items: end;
}

.mobile-range-actions label {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 3px;
}

.mobile-range-actions label span {
  color: #536b7e;
  font-size: 10px;
  font-weight: 850;
}

.mobile-range-actions select,
.mobile-range-actions button {
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 850;
}

.mobile-range-actions .range-clear-bolts {
  grid-column: 1 / -1;
  border-color: #c7352a;
  background: #fff3f1;
  color: #9f241c;
  font-weight: 850;
}

.mobile-range-actions .mobile-range-lift-access {
  grid-column: 1 / -1;
}

.lift-access-control {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px solid rgba(232, 77, 61, .42);
  border-radius: 9px;
  background: rgba(232, 77, 61, .07);
}

.lift-access-control[hidden] { display: none !important; }
.lift-access-heading,
.lift-access-inputs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.lift-access-heading strong { font-size: 12px; }
.lift-access-heading output {
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}
.lift-access-inputs > input[type="range"] {
  min-width: 0;
  flex: 1 1 auto;
  accent-color: var(--red);
}
.lift-access-inputs label {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  color: var(--red);
  font-weight: 950;
}
.lift-access-inputs input[type="number"] {
  width: 68px;
  min-height: 38px;
  border: 1px solid rgba(232, 77, 61, .48);
  border-radius: 7px;
  padding: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  text-align: right;
}

.mobile-range-actions .range-clear-bolts:disabled {
  opacity: .45;
}

.point-navigator.navigator-fullscreen .mobile-range-panel {
  flex: 0 0 auto;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .mobile-range-panel {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .mobile-range-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .mobile-range-actions label {
    grid-column: 1 / -1;
  }
}

.navigator-compass-status {
  display: block;
  padding: 4px 6px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: left !important;
}

.navigator-size-control {
  margin: 0;
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.navigator-size-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.navigator-size-control input[type="range"] {
  min-height: 30px;
  padding: 0;
  accent-color: var(--blue);
}

.navigator-size-control strong {
  color: var(--text);
  font-size: 20px;
}

.neighbor-viewport {
  --nav-cell-height: 92px;
  --nav-gap: 8px;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  contain: inline-size;
  overflow: hidden;
  height: var(--nav-viewport-height, 344px);
  border-radius: 8px;
  touch-action: pan-y;
}

.neighbor-grid-rotator {
  position: absolute;
  inset: 0;
  transform: rotate(calc(var(--nav-map-rotation, 0deg) + var(--nav-gesture-rotation, 0deg))) scale(var(--nav-gesture-scale, 1));
  transform-origin: center;
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.neighbor-grid-rotator.is-compass-active {
  inset: 0 auto auto 50%;
  width: var(--nav-square-side, 100%);
  height: var(--nav-square-side, 100%);
  transform: translateX(-50%) rotate(calc(var(--nav-map-rotation, 0deg) + var(--nav-gesture-rotation, 0deg))) scale(var(--nav-gesture-scale, 1));
  overflow: hidden;
  border-radius: 8px;
}

.neighbor-grid-rotator.is-fullscreen-sideways {
  inset: 50% auto auto 50%;
  width: var(--nav-sideways-width, 100%);
  height: var(--nav-sideways-height, 100%);
  transform: translate(-50%, -50%) rotate(calc(var(--nav-map-rotation, 0deg) + var(--nav-gesture-rotation, 0deg))) scale(var(--nav-gesture-scale, 1));
  overflow: hidden;
  border-radius: 8px;
}

.neighbor-grid-rotator.is-locked {
  transition-duration: 180ms;
}

.neighbor-grid-rotator.is-gesture-rotating {
  transition: none;
}

.neighbor-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--nav-render-cols, var(--nav-size, 3)), minmax(0, 1fr));
  grid-template-rows: repeat(var(--nav-render-rows, var(--nav-size, 3)), var(--nav-cell-height));
  gap: var(--nav-gap);
  width: var(--nav-grid-width, 100%);
  transform: translate3d(
    calc(var(--nav-shift-x, 0%) + var(--nav-drag-x, 0px)),
    calc(var(--nav-shift-y, 0px) + var(--nav-drag-y, 0px)),
    0
  );
  transform-origin: center;
  will-change: transform, opacity;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.neighbor-grid.is-dragging {
  cursor: grabbing;
  transition: none;
}

.neighbor-grid.is-sliding {
  animation: neighbor-grid-enter 10400ms cubic-bezier(.16, 1, .3, 1);
}

.neighbor-grid.is-sliding .neighbor-cell.current {
  border-color: var(--line);
  outline-color: transparent;
  background: #fff;
}

.neighbor-grid.is-settling .neighbor-cell.current {
  animation: neighbor-current-settle 260ms ease-out;
}

@keyframes neighbor-grid-enter {
  from {
    opacity: .58;
    transform: translate3d(calc(var(--nav-slide-x, 0) * 1.35), calc(var(--nav-slide-y, 0) * 1.35), 0) scale(.975);
  }
  58% {
    opacity: .92;
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes neighbor-current-settle {
  from {
    outline-color: transparent;
    background: #fff;
    transform: scale(.985);
  }
  to {
    outline-color: var(--red);
    background: #eef7ff;
    transform: scale(1);
  }
}

.neighbor-cell {
  position: relative;
  min-width: 0;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 8px 9px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  text-align: center;
  background: #fff;
  overflow: hidden;
}

.neighbor-cell-upright {
  width: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  transform: rotate(var(--nav-label-rotation, 0deg));
  transform-origin: center;
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.neighbor-grid[data-size="4"] { gap: 7px; }
.neighbor-grid[data-size="5"] { gap: 6px; }
.neighbor-grid[data-size="6"],
.neighbor-grid[data-size="7"],
.neighbor-grid[data-size="8"],
.neighbor-grid[data-size="9"] { gap: 3px; }

.neighbor-viewport:has(.neighbor-grid[data-size="4"]) { --nav-cell-height: 74px; --nav-gap: 7px; }
.neighbor-viewport:has(.neighbor-grid[data-size="5"]) { --nav-cell-height: 62px; --nav-gap: 6px; }
.neighbor-viewport:has(.neighbor-grid[data-size="6"]) { --nav-cell-height: 52px; --nav-gap: 3px; }
.neighbor-viewport:has(.neighbor-grid[data-size="7"]) { --nav-cell-height: 46px; --nav-gap: 3px; }
.neighbor-viewport:has(.neighbor-grid[data-size="8"]) { --nav-cell-height: 40px; --nav-gap: 3px; }
.neighbor-viewport:has(.neighbor-grid[data-size="9"]) { --nav-cell-height: 34px; --nav-gap: 3px; }

.neighbor-grid[data-size="4"] .neighbor-cell { min-height: 74px; padding: 15px 6px 7px; }
.neighbor-grid[data-size="5"] .neighbor-cell { min-height: 62px; padding: 13px 5px 6px; }
.neighbor-grid[data-size="6"] .neighbor-cell { min-height: 52px; padding: 12px 4px 5px; border-radius: 7px; }
.neighbor-grid[data-size="7"] .neighbor-cell { min-height: 46px; padding: 10px 3px 4px; border-radius: 6px; }
.neighbor-grid[data-size="8"] .neighbor-cell { min-height: 40px; padding: 8px 2px 3px; border-radius: 6px; }
.neighbor-grid[data-size="9"] .neighbor-cell { min-height: 34px; padding: 6px 1px 2px; border-radius: 5px; gap: 1px; }

.neighbor-cell.current {
  border-color: var(--red);
  outline: 3px solid var(--red);
  background: #eef7ff;
}

.neighbor-cell.navigator-center:not(.current) {
  border-color: rgba(22, 136, 232, .42);
  background: linear-gradient(180deg, rgba(22, 136, 232, .10), rgba(255,255,255,.96));
}

.neighbor-cell.search-highlight:not(.current) {
  border-color: rgba(223, 166, 0, .58);
  background: linear-gradient(180deg, #fff8dd, #ffeaa8);
  box-shadow: inset 0 0 0 2px rgba(255, 198, 41, .28);
}

.neighbor-cell.search-col-highlight.search-row-highlight:not(.current) {
  border-color: rgba(223, 166, 0, .82);
  background: linear-gradient(180deg, #ffe99d, #ffd45b);
  box-shadow: inset 0 0 0 3px rgba(255, 198, 41, .45);
}

.neighbor-cell.current.search-highlight {
  background: linear-gradient(180deg, #eaf6ff, #dff1ff);
  box-shadow: inset 0 0 0 3px rgba(255, 198, 41, .38);
}

.neighbor-grid.is-sliding .neighbor-cell.current.search-highlight {
  background: linear-gradient(180deg, #fff8dd, #ffeaa8);
}

.neighbor-cell.edge-shift:not(.current) {
  background: linear-gradient(180deg, rgba(22, 136, 232, .10), rgba(255,255,255,.96));
}

/* Pełny słup konstrukcyjny zajmuje całą kafelkę — czytelne także w skalach 6×6–9×9. */
.neighbor-cell.structural-column,
.neighbor-cell.structural-column.current,
.neighbor-cell.structural-column.navigator-center:not(.current),
.neighbor-cell.structural-column.edge-shift:not(.current),
.neighbor-grid.is-sliding .neighbor-cell.structural-column.current {
  border-color: #aab3bc;
  background: #d7dce1;
}

.neighbor-cell.structural-column.current {
  border-color: var(--red);
}

.neighbor-cell.range-selected::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 7;
  border: 2px solid rgba(22, 136, 232, .72);
  border-radius: 6px;
  background: rgba(22, 136, 232, .08);
  pointer-events: none;
}

.neighbor-cell.range-origin::after {
  border-color: #23a34a;
  border-width: 3px;
  background: rgba(35, 163, 74, .12);
}

.neighbor-cell.range-end::after {
  border-color: #0877cd;
  border-width: 3px;
  background: rgba(8, 119, 205, .15);
}

.neighbor-cell.structural-column .point-type-marker::before {
  content: none;
}

.neighbor-cell.prime-coordinate strong,
.result-card.prime-coordinate strong {
  position: relative;
  z-index: 2;
  padding: 2px 5px;
  border-radius: 4px;
  background: #cfd5db;
  box-shadow: inset 0 0 0 1px rgba(80, 92, 105, .14);
}

.qa-pending-corner {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 8;
  width: 0;
  height: 0;
  border-top: 22px solid #ffd22e;
  border-left: 22px solid transparent;
  filter: drop-shadow(-1px 1px 0 rgba(117, 82, 0, .28));
  pointer-events: none;
}

.neighbor-grid[data-size="6"] .qa-pending-corner,
.neighbor-grid[data-size="7"] .qa-pending-corner,
.neighbor-grid[data-size="8"] .qa-pending-corner,
.neighbor-grid[data-size="9"] .qa-pending-corner {
  border-top-width: 15px;
  border-left-width: 15px;
}

.neighbor-cell.empty {
  background: #f7f9fb;
  color: #a8b2bf;
}

.neighbor-cell .neighbor-arrow {
  position: absolute;
  left: 8px;
  top: 6px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  pointer-events: none;
}

.neighbor-grid[data-size="4"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="5"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="6"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="7"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="8"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="9"] .neighbor-cell .neighbor-arrow {
  left: 2px;
  top: 2px;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .76);
  font-size: 9px;
  opacity: .72;
}

.neighbor-grid[data-size="7"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="8"] .neighbor-cell .neighbor-arrow,
.neighbor-grid[data-size="9"] .neighbor-cell .neighbor-arrow {
  width: 9px;
  height: 9px;
  font-size: 7px;
  opacity: .62;
}

.navigator-gps-arrow {
  position: absolute;
  right: 7px;
  top: 6px;
  color: var(--blue);
  font-size: 16px;
  line-height: 1;
  transform-origin: center;
  text-shadow: 0 1px 0 #fff;
}

.neighbor-cell .status-dot {
  width: 28px;
  height: 28px;
  border-width: 4px;
}

.neighbor-grid[data-size="5"] .neighbor-cell .point-type-marker { width: 32px; height: 32px; }
.neighbor-grid[data-size="6"] .neighbor-cell .point-type-marker { width: 27px; height: 27px; }
.neighbor-grid[data-size="7"] .neighbor-cell .point-type-marker,
.neighbor-grid[data-size="8"] .neighbor-cell .point-type-marker { width: 22px; height: 22px; }
.neighbor-grid[data-size="9"] .neighbor-cell .point-type-marker { width: 17px; height: 17px; }

.neighbor-grid[data-size="5"] .neighbor-cell .status-dot { width: 24px; height: 24px; border-width: 4px; }
.neighbor-grid[data-size="6"] .neighbor-cell .status-dot { width: 20px; height: 20px; border-width: 3px; }
.neighbor-grid[data-size="7"] .neighbor-cell .status-dot,
.neighbor-grid[data-size="8"] .neighbor-cell .status-dot { width: 16px; height: 16px; border-width: 3px; }
.neighbor-grid[data-size="9"] .neighbor-cell .status-dot { width: 12px; height: 12px; border-width: 2px; }

.neighbor-cell strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(16px, 5vw, 22px);
}

.neighbor-grid[data-size="4"] .neighbor-cell strong { font-size: clamp(14px, 4.2vw, 18px); }
.neighbor-grid[data-size="5"] .neighbor-cell strong { font-size: clamp(12px, 3.6vw, 16px); }
.neighbor-grid[data-size="6"] .neighbor-cell strong { font-size: 12px; }
.neighbor-grid[data-size="7"] .neighbor-cell strong,
.neighbor-grid[data-size="8"] .neighbor-cell strong { font-size: 10px; }
.neighbor-grid[data-size="9"] .neighbor-cell strong { font-size: 8px; font-weight: 850; }

.neighbor-cell small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 850;
}

.neighbor-grid[data-size="6"] .neighbor-cell small,
.neighbor-grid[data-size="7"] .neighbor-cell small,
.neighbor-grid[data-size="8"] .neighbor-cell small,
.neighbor-grid[data-size="9"] .neighbor-cell small {
  font-size: 8px;
  font-weight: 800;
}

.neighbor-grid[data-size="9"] .neighbor-cell .neighbor-arrow {
  left: 1px;
  top: 1px;
  font-size: 6px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
}

.panel-title span {
  color: var(--muted);
  font-weight: 800;
}

.result-list {
  display: grid;
  gap: 7px;
  max-height: 42vh;
  overflow: auto;
  padding-right: 2px;
}

.result-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 9px;
  text-align: left;
  background: #fff;
}

.result-card.active {
  outline: 3px solid var(--blue);
  background: #eef7ff;
}

.result-card.structural-column:not(.active) {
  background: #f0f2f4;
}

.point-type-marker {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.structural-column .point-type-marker::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #aab3bc;
  border-radius: 5px;
  background: #d7dce1;
}

.point-type-marker .status-dot {
  position: relative;
  z-index: 1;
}

.result-card strong {
  display: block;
  font-size: 18px;
}

.result-card small {
  color: var(--muted);
}

.point-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.point-head span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.point-head h2 {
  margin: 2px 0;
  font-size: 34px;
  letter-spacing: 0;
}

.point-total-count {
  font-weight: 400;
  color: var(--muted);
}

.point-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.point-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.save-icon-button {
  --save-button-translate-x: -50%;
  display: none;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 2147483000;
  width: 80px;
  min-height: 80px;
  padding: 0;
  place-items: center;
  border-color: rgba(44, 161, 69, .62);
  border-radius: 999px;
  background: linear-gradient(#35bd56, #24913d);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  box-shadow: 0 16px 40px rgba(44, 161, 69, .4);
}

body.save-button-avoids-keypad[data-save-button-side="left"] .save-icon-button {
  --save-button-translate-x: 0%;
  left: max(14px, calc(env(safe-area-inset-left) + 12px));
  right: auto;
}

body.save-button-avoids-keypad[data-save-button-side="right"] .save-icon-button {
  --save-button-translate-x: 0%;
  left: auto;
  right: max(14px, calc(env(safe-area-inset-right) + 12px));
}

.save-icon-button.is-visible {
  display: grid;
  animation: save-nudge 1.2s ease-in-out infinite;
}

.save-icon-button.is-saving {
  opacity: .72;
}

@keyframes save-nudge {
  0%, 100% { transform: translateX(var(--save-button-translate-x)) scale(1); box-shadow: 0 16px 40px rgba(44, 161, 69, .4); }
  50% { transform: translateX(var(--save-button-translate-x)) scale(1.08); box-shadow: 0 0 0 12px rgba(44, 161, 69, .16); }
}

.status-dot {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 4px solid #7c8793;
  background: #fff;
  flex: 0 0 auto;
}

.status-dot.done {
  border-color: var(--green);
  background: var(--green);
}

.status-dot.planned {
  border-color: var(--blue);
  border-right-color: transparent;
  background: transparent;
  animation: planned-mobile-spin 1.8s linear infinite;
}

.status-dot.planned.has-plan-label {
  position: relative;
  border-right-color: var(--blue);
  animation: none;
}

.status-dot.planned.has-plan-label::after {
  content: attr(data-plan-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0969b7;
  font-size: clamp(6px, 42%, 11px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.04em;
}

.status-dot.lift {
  position: relative;
  border-color: var(--red);
  background: #fff;
}

.status-dot.lift::after {
  content: attr(data-lift-percent);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c42f25;
  font-size: clamp(5px, 36%, 9px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.08em;
}

.status-dot.attention {
  border-color: #f2b41f;
  background: #f2b41f;
}

.status-dot.problem {
  border-color: var(--red);
  background: var(--red);
  animation: pulse 1.1s infinite;
}

.status-dot.blocked {
  position: relative;
  border-color: var(--black);
  background: #fff;
}

.status-dot.blocked::before,
.status-dot.blocked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: max(3px, 16%);
  border-radius: 999px;
  background: var(--black);
  transform: translate(-50%, -50%) rotate(45deg);
  transform-origin: center;
}

.status-dot.blocked::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.status-dot.missing-column {
  position: relative;
  border-color: #111;
  background: #fff;
}

.status-dot.missing-column::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: max(2px, 10%);
  border-radius: 3px;
  background: #111;
  transform: translateY(-50%);
}

.status-dot.missing-column::after { content: none; }

.status-dot.partial_blocked {
  border-color: var(--black);
  background: linear-gradient(90deg, var(--green) 0 50%, var(--black) 50% 100%);
}

@keyframes planned-mobile-spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 77, 61, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(232, 77, 61, 0); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.mobile-plan-panel {
  margin: -4px 0 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(22, 136, 232, .4);
  border-radius: 10px;
  background: rgba(22, 136, 232, .07);
}

.mobile-plan-panel[hidden] { display: none !important; }
.mobile-plan-panel:not([open]) > :not(summary) { display: none !important; }
.mobile-plan-body { display: grid; gap: 10px; padding: 0 12px 12px; }

.mobile-plan-heading,
.mobile-plan-range,
.mobile-plan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-plan-heading {
  min-height: 62px;
  justify-content: space-between;
  padding: 10px 36px 10px 12px;
  position: relative;
  list-style: none;
  cursor: pointer;
}
.mobile-plan-heading::-webkit-details-marker { display: none; }
.mobile-plan-heading::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 50%;
  translate: 0 -52%;
  color: var(--blue);
  font-size: 21px;
  font-weight: 900;
  transition: transform 180ms ease;
}
.mobile-plan-panel[open] .mobile-plan-heading::after { transform: rotate(180deg); }
.mobile-plan-panel[open] .mobile-plan-heading { margin-bottom: 2px; }
.mobile-plan-heading strong,
.mobile-plan-heading small { display: block; }
.mobile-plan-heading small,
.mobile-plan-range > span,
.mobile-plan-message {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-plan-panel label {
  gap: 5px;
  margin: 0;
  font-size: 13px;
}

.mobile-plan-panel input,
.mobile-plan-panel textarea {
  min-height: 44px;
  padding: 9px 10px;
}

.mobile-plan-panel textarea { min-height: 88px; }
.mobile-plan-range label { flex: 1 1 155px; }
.mobile-plan-range > button { flex: 1 1 190px; }

.mobile-plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mobile-plan-actions button,
.mobile-plan-range button {
  min-height: 44px;
  padding: 8px 10px;
}

.mobile-plan-actions button:nth-child(n+3) {
  border-color: rgba(232, 77, 61, .35);
  color: #a83227;
}

.mobile-plan-message {
  min-height: 1.2em;
  margin: 0;
  line-height: 1.35;
}
.mobile-plan-message[data-mode="error"] { color: var(--red); }
.mobile-plan-message[data-mode="success"] { color: var(--green); }

.mobile-planning-map-pick .neighbor-viewport {
  outline: 3px solid rgba(22, 136, 232, .62);
  outline-offset: -3px;
  box-shadow: 0 0 0 6px rgba(22, 136, 232, .12);
}

.mobile-planning-map-pick .neighbor-cell:not(:disabled) {
  cursor: crosshair;
}

.stats div {
  padding: 10px 8px;
  text-align: center;
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats small {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.stats strong {
  display: block;
  font-size: 26px;
}

.bolt-table {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.bolt-row {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 0.75fr);
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
  padding: 5px;
  border-radius: 8px;
}

.bolt-row:nth-child(odd):not(:first-child) {
  background: var(--bolt-row-bg-alt);
}

.bolt-type-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.08;
}

.bolt-type-label small {
  display: block;
  color: var(--muted);
  font-size: 0.72em;
  font-weight: 850;
}

.bolt-row input {
  min-height: 40px;
  padding: 6px;
  text-align: center;
  font-weight: 850;
  font-size: 16px;
}

.bolt-number-control {
  position: relative;
  display: block;
  min-width: 0;
}

.bolt-number-control input {
  padding-right: 31px;
  appearance: textfield;
}

.bolt-number-control input::-webkit-inner-spin-button,
.bolt-number-control input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.bolt-number-steppers {
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  display: grid;
  width: 27px;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
}

.bolt-number-steppers button {
  min-height: 0;
  padding: 0;
  border-color: rgba(102, 115, 131, .32);
  border-radius: 5px;
  background: rgba(255, 255, 255, .72);
  color: #526071;
  font-size: 9px;
  line-height: 1;
  touch-action: manipulation;
}

.bolt-number-steppers button:disabled {
  opacity: .35;
}

.bolt-row input:not([readonly]):not(:disabled) {
  background: var(--editable-number-bg);
  border-color: var(--editable-number-border);
}

.bolt-row input[readonly] {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  cursor: default;
}

.mobile-app.number-fields-left .bolt-row {
  grid-template-columns: .75fr .75fr .75fr 1.1fr;
  grid-template-areas: "done blocked total type";
}

.mobile-app.number-fields-left .bolt-row > :nth-child(1) { grid-area: type; }
.mobile-app.number-fields-left .bolt-row > :nth-child(2) { grid-area: total; }
.mobile-app.number-fields-left .bolt-row > :nth-child(3) { grid-area: done; }
.mobile-app.number-fields-left .bolt-row > :nth-child(4) { grid-area: blocked; }

.mobile-app.number-fields-left .bolt-type-label {
  align-items: flex-end;
  text-align: right;
}

.mobile-settings-dialog {
  width: min(92vw, 520px);
  max-height: min(88vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 22px 70px rgba(12, 25, 38, .32);
}

.mobile-settings-dialog::backdrop {
  background: rgba(15, 25, 36, .55);
  backdrop-filter: blur(3px);
}

.mobile-settings-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f8fafc;
  color: var(--text);
}

.mobile-settings-card header,
.mobile-settings-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-settings-card header h2 { margin: 3px 0 0; font-size: 20px; }
.mobile-settings-card header small,
.mobile-settings-card p,
.mobile-settings-grid-size small { color: var(--muted); }
.mobile-settings-card header > button { width: 42px; min-height: 42px; font-size: 24px; }
.mobile-settings-card fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.mobile-settings-card legend { padding: 0 6px; font-weight: 900; }
.mobile-settings-card p { margin: 0 0 10px; font-size: 13px; }

.mobile-settings-side-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-settings-side-options label { margin: 0; }
.mobile-settings-side-options input { position: absolute; opacity: 0; pointer-events: none; }
.mobile-settings-side-options span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}
.mobile-settings-side-options input:checked + span {
  border-color: var(--blue);
  background: #e4f3ff;
  box-shadow: inset 0 0 0 2px rgba(22, 136, 232, .16);
}

.mobile-settings-preview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, .8fr);
  gap: 4px;
  padding: 7px;
  border-radius: 8px;
  background: #edf1f5;
  font-size: 11px;
  font-weight: 850;
}
.mobile-settings-preview > * { min-width: 0; padding: 7px 3px; border-radius: 5px; background: #fff; text-align: center; }
.mobile-settings-preview > b { background: var(--editable-number-bg); }
.mobile-settings-preview.is-left { grid-template-areas: "done blocked total type"; grid-template-columns: repeat(3, .8fr) 1.2fr; }
.mobile-settings-preview.is-left > :nth-child(1) { grid-area: type; }
.mobile-settings-preview.is-left > :nth-child(2) { grid-area: total; }
.mobile-settings-preview.is-left > :nth-child(3) { grid-area: done; }
.mobile-settings-preview.is-left > :nth-child(4) { grid-area: blocked; }

.mobile-settings-grid-size { margin: 0; }
.mobile-settings-grid-size select { width: 100%; }
.mobile-settings-card footer { justify-content: flex-end; }
.mobile-settings-card footer button { min-width: 130px; }

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-statistics-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: -2px 0 14px;
  border: 1px solid #9cccf1;
  border-radius: 13px;
  background: #eef8ff;
  color: #0869b4;
  font-weight: 800;
  text-decoration: none;
}

.hidden-file {
  display: none;
}

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

.docs-section[hidden] {
  display: none !important;
}

.quality-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--muted);
  font-weight: 850;
}

.quality-check[hidden] {
  display: none !important;
}

.quality-check input {
  width: 42px;
  height: 42px;
  margin: 0;
  accent-color: var(--green);
}

.quality-check strong {
  display: block;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.18;
}

.quality-check small {
  display: block;
  margin-top: 2px;
  color: #111821;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
}

.quality-check .quality-meta-detail {
  color: var(--muted);
  font-weight: 750;
}

.quality-check small:empty {
  display: none;
}

.doc-card {
  position: relative;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7fa;
}

.doc-card img,
.doc-card video {
  width: 100%;
  height: 112px;
  object-fit: cover;
  display: block;
}

.doc-card .file-tile {
  display: grid;
  place-items: center;
  height: 112px;
  padding: 10px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.doc-card .video-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  height: 112px;
  padding: 10px 10px 30px;
  text-align: center;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 198, 41, .24), transparent 42%),
    linear-gradient(135deg, #111821, #303946);
}

.video-play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
}

.video-tile strong {
  color: #fff;
  font-size: 16px;
}

.video-tile small {
  color: rgba(255, 255, 255, .72);
  font-weight: 750;
}

.doc-card footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.doc-card footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-card footer span small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.doc-card .doc-gps-status {
  margin-top: 2px;
  white-space: normal;
}

.doc-gps-status.used {
  color: #21963a;
}

.doc-gps-status.excluded {
  color: #c93a2e;
}

.doc-gps-status.no-gps {
  color: var(--muted);
}

.doc-card footer button {
  min-height: 32px;
  padding: 0 8px;
}

.sticky-save {
  display: none !important;
}

.message {
  min-height: 20px;
  color: var(--muted);
  font-weight: 700;
}

.mobile-header-search .message:empty {
  display: none;
}

.message.error {
  color: var(--red);
}

.message.ok {
  color: var(--green);
}

.compass-calibration-dialog {
  width: min(620px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(8, 18, 30, .32);
}

.compass-calibration-dialog::backdrop {
  background: rgba(8, 13, 20, .72);
  backdrop-filter: blur(3px);
}

.compass-calibration-card {
  max-height: calc(100dvh - 22px);
  padding: 16px;
  overflow: auto;
}

.compass-calibration-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.compass-calibration-card > header small {
  color: var(--blue);
  font-weight: 850;
  text-transform: uppercase;
}

.compass-calibration-card h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

.compass-calibration-card > header button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}

.compass-calibration-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.compass-live-heading {
  margin-bottom: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 12px;
  border: 1px solid rgba(22, 136, 232, .32);
  border-radius: 10px;
  background: linear-gradient(135deg, #eef8ff, #fff);
}

.compass-live-heading span,
.compass-live-heading small {
  color: var(--muted);
  font-weight: 750;
}

.compass-live-heading strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 30px;
  color: #075d9f;
}

.compass-calibration-history {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.compass-calibration-history > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.compass-calibration-history > div:first-child span {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f4ff;
  color: #075d9f;
  font-weight: 850;
  text-align: center;
}

#compassCalibrationList {
  display: grid;
  gap: 6px;
}

.compass-calibration-entry {
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.compass-calibration-entry small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.transfer {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 80;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.transfer-bar {
  height: 10px;
  margin: 8px 0;
  border-radius: 99px;
  background: #e5eaf1;
  overflow: hidden;
}

.transfer-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(8, 13, 20, 0.76);
}

.media-window {
  position: relative;
  width: min(100%, 920px);
  max-height: 92vh;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0f15;
}

#closeMedia {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 44px;
}

#mediaContent img,
#mediaContent video {
  display: block;
  width: 100%;
  max-height: calc(92vh - 74px);
  object-fit: contain;
}

.mobile-media-meta {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  border-top: 1px solid var(--line);
}

.mobile-media-meta .doc-gps-status {
  font-size: 13px;
  font-weight: 850;
}

.mobile-media-meta button {
  min-height: 40px;
}

.tablet-number-keypad {
  position: fixed;
  z-index: 90;
  width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 28, 40, .24);
}

/* Klawiatura jest elementem body, a pełnoekranowa karta ma własną, bardzo
   wysoką warstwę. W trybie edycji klawiatura musi pozostać nad kartą. */
body.navigator-editor-fullscreen-open .tablet-number-keypad {
  z-index: 2147483646;
}

/* Galeria jest dołączana bezpośrednio do body. W pełnoekranowej karcie musi
   znaleźć się nad edytorem, a nie czekać niewidoczna pod jego warstwą. */
body.navigator-editor-fullscreen-open .bolt-media-gallery,
body.navigator-editor-fullscreen-open .media-modal {
  z-index: 2147483647 !important;
}

.axis-side-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(22, 136, 232, .34);
  border-radius: 9px;
  background: #f5faff;
}

.missing-column-notice {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #909aa5;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, #edf1f4);
  color: #111820;
}

.missing-column-notice[hidden] { display: none !important; }
.missing-column-notice strong { font-size: 17px; }
.missing-column-notice span { color: #55616d; font-size: 13px; font-weight: 750; line-height: 1.4; }

.axis-side-panel[hidden] {
  display: none !important;
}

.axis-side-panel.pending {
  border-color: rgba(22, 136, 232, .78);
  box-shadow: 0 0 0 3px rgba(22, 136, 232, .12);
}

.axis-side-heading {
  display: grid;
  gap: 2px;
}

.axis-side-heading strong {
  font-size: 14px;
}

.axis-side-heading small {
  color: var(--muted);
  font-weight: 700;
}

.axis-side-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.axis-side-tab {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 8px 9px;
  overflow: hidden;
  text-align: left;
}

.axis-side-tab.qa-pending::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 20px solid #ffd22e;
  border-left: 20px solid transparent;
  filter: drop-shadow(-1px 1px 0 rgba(117, 82, 0, .28));
  pointer-events: none;
}

.axis-side-tab small {
  color: var(--muted);
}

.axis-side-context {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.axis-side-tab.active {
  border-color: var(--blue);
  background: #eaf6ff;
  box-shadow: inset 0 0 0 2px rgba(22, 136, 232, .22);
}

.axis-side-tab.empty:not(.active) {
  border-style: dashed;
}

.result-card.axis-side-pending,
.neighbor-cell.axis-side-pending {
  outline: 3px solid rgba(22, 136, 232, .56);
  outline-offset: -3px;
  box-shadow: 0 0 16px rgba(22, 136, 232, .32);
}

/* Wskazanie punktu jest nadrzędne wobec niebieskiego stanu oczekującej karty D/N. */
.neighbor-cell.axis-side-pending.current {
  border-color: var(--red);
  outline: 3px solid var(--red);
  outline-offset: 0;
  box-shadow: 0 0 16px rgba(216, 66, 47, .36);
}

.tablet-number-keypad-mode,
.tablet-number-keypad-result {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tablet-number-keypad-mode {
  margin: 0 2px 6px;
}

.tablet-number-keypad-result {
  min-height: 17px;
  margin: -2px 2px 8px;
  text-align: right;
}

.tablet-number-keypad.is-additive {
  border-color: rgba(22, 136, 232, .62);
}

.tablet-number-keypad.is-additive > strong {
  color: #096ebd;
  background: #eef8ff;
}

.tablet-number-keypad.is-correction {
  border-color: rgba(201, 139, 0, .72);
}

.tablet-number-keypad.is-correction > strong {
  color: #805500;
  background: #fff8dd;
}

.tablet-number-keypad > strong {
  display: block;
  min-height: 38px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--text);
  font-size: 22px;
  line-height: 28px;
  text-align: right;
}

.tablet-number-keypad > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.tablet-number-keypad button {
  min-height: 48px;
  padding: 6px;
  font-size: 20px;
  font-weight: 850;
}

.tablet-number-keypad .primary {
  width: 100%;
  min-height: 46px;
}

input.tablet-keypad-active {
  border-color: var(--blue);
  outline: 3px solid rgba(22, 136, 232, .22);
  background: #f7fbff;
}

input.tablet-keypad-additive {
  color: #096ebd;
  font-weight: 900;
}

input.tablet-keypad-correction {
  color: #805500;
  font-weight: 900;
}

body.is-resizing-tablet-split,
body.is-resizing-tablet-split * {
  cursor: col-resize !important;
  user-select: none !important;
}

.app-version {
  position: fixed;
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(8px, calc(env(safe-area-inset-bottom) + 6px));
  z-index: 5;
  color: var(--muted);
  font-size: 11px;
}

@media (min-width: 700px) {
  .mobile-app {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .mobile-header,
  .search-panel {
    grid-column: 1 / -1;
  }

  .result-list {
    max-height: calc(100vh - 250px);
  }
}

@media (min-width: 900px) and (orientation: landscape) {
  .phone-shell {
    max-width: none;
    min-height: 100vh;
    padding: 12px;
  }

  .mobile-app {
    grid-template-columns: minmax(0, var(--tablet-nav-width)) 10px minmax(280px, 1fr);
    gap: 8px;
    align-items: start;
  }

  .mobile-header {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(210px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 12px 7px;
  }

  .mobile-header-search {
    grid-column: auto;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, auto);
    align-items: end;
    gap: 6px 10px;
  }

  .search-box {
    margin: 0;
  }

  .search-box span {
    left: 14px;
    font-size: 24px;
  }

  .search-box input {
    padding-left: 48px;
  }

  .search-tools {
    grid-template-columns: minmax(160px, 1fr) auto;
  }

  .point-navigator {
    grid-column: 1;
    min-height: calc(100vh - 132px);
    display: flex;
    flex-direction: column;
  }

  .tablet-split-resizer {
    grid-column: 2;
    display: block;
    align-self: stretch;
    min-height: calc(100vh - 132px);
    border: 1px solid rgba(102, 115, 131, .22);
    border-radius: 8px;
    background: linear-gradient(90deg, transparent 0 35%, rgba(102, 115, 131, .28) 35% 65%, transparent 65% 100%);
    cursor: col-resize;
    touch-action: none;
  }

  .tablet-split-resizer::after {
    content: "";
    display: block;
    width: 4px;
    height: 46px;
    margin: 42vh auto 0;
    border-radius: 999px;
    background: rgba(102, 115, 131, .46);
  }

  .neighbor-viewport {
    flex: 1;
    height: auto;
    min-height: min(820px, calc(100vh - 170px));
    touch-action: none;
  }

  .neighbor-grid {
    flex: 0 0 auto;
    height: auto;
    min-height: 100%;
    grid-auto-rows: var(--nav-cell-height);
    align-content: start;
  }

  .neighbor-cell,
  .neighbor-grid[data-size="4"] .neighbor-cell,
  .neighbor-grid[data-size="5"] .neighbor-cell,
  .neighbor-grid[data-size="6"] .neighbor-cell,
  .neighbor-grid[data-size="7"] .neighbor-cell,
  .neighbor-grid[data-size="8"] .neighbor-cell,
  .neighbor-grid[data-size="9"] .neighbor-cell {
    min-height: 0;
  }

  .neighbor-grid[data-size="7"] .neighbor-cell strong,
  .neighbor-grid[data-size="8"] .neighbor-cell strong {
    font-size: 11px;
  }

  .neighbor-grid[data-size="9"] .neighbor-cell strong {
    font-size: 9px;
  }

  .editor-panel {
    grid-column: 3;
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    overflow: auto;
    padding: 8px 10px;
  }

  .editor-panel label {
    gap: 3px;
    margin-bottom: 6px;
    font-size: 13px;
  }

  .editor-panel select {
    min-height: 36px;
    padding: 5px 9px;
    font-size: 15px;
  }

  .point-head {
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .point-head h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.04;
  }

  .point-total-count {
    font-size: .58em;
  }

  .point-head p {
    font-size: 14px;
    line-height: 1.2;
  }

  .point-head .status-dot {
    width: 24px;
    height: 24px;
    border-width: 4px;
  }

  .save-icon-button.is-visible {
    display: grid;
    animation: save-nudge 1.2s ease-in-out infinite;
  }

  .stats {
    margin-bottom: 6px;
  }

  .stats div {
    padding: 4px 5px;
  }

  .stats small {
    font-size: 11px;
    line-height: 1.1;
  }

  .stats strong {
    font-size: 19px;
    line-height: 1.1;
  }

  .bolt-table {
    gap: 2px;
    margin-bottom: 6px;
  }

  .bolt-row {
    grid-template-columns: .9fr .58fr .58fr .58fr;
    gap: 4px;
    padding: 3px 4px;
    font-size: 11px;
    border-radius: 6px;
  }

  .bolt-type-label small {
    font-size: .66em;
  }

  .bolt-row input {
    min-height: 30px;
    padding: 2px 4px;
    font-size: 14px;
    border-radius: 6px;
  }

  .bolt-number-control input {
    padding-right: 24px;
  }

  .bolt-number-steppers {
    width: 21px;
  }

  .bolt-number-steppers button {
    font-size: 7px;
    border-radius: 4px;
  }

  .editor-panel textarea {
    min-height: 58px;
    padding: 7px 9px;
    font-size: 14px;
  }

  .mobile-actions {
    gap: 6px;
    margin-bottom: 6px;
  }

  .mobile-actions button,
  .quality-check {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 14px;
  }

  .doc-grid {
    gap: 5px;
  }

  .doc-card,
  .doc-card img,
  .doc-card video,
  .doc-card .file-tile,
  .doc-card .video-tile {
    min-height: 70px;
    height: 70px;
  }

  .sticky-save {
    display: none;
  }

  .app-version {
    right: max(18px, calc(env(safe-area-inset-right) + 12px));
  }
}
