:root {
  --pi-green: #2f6b45;
  --pi-ink: #15221a;
  --pi-muted: #66736b;
  --pi-line: rgba(34, 55, 42, 0.18);
  --pi-surface: #f7f9f5;
  --pi-warn: #9a5b12;
  --pi-blue: #1d4f73;
  --pi-gold: #ff8a00;
  --pi-thumb-size: 64px;
  --pi-control-split: auto;
  --pi-radius: 8px;
  --pi-panel-bg: rgba(255, 255, 255, 0.94);
  --pi-shadow: 0 14px 36px rgba(21, 34, 26, 0.16);
  --pi-navbar-height: 40px;
  --pi-splitter-size: 0px;
}

html,
body,
.pi-app {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  overflow: hidden;
  color: var(--pi-ink);
  background: var(--pi-surface);
}

.pi-hidden,
.pi-auth-locked,
[hidden] {
  display: none !important;
}

.pi-page .button,
.pi-detail-sheet .button {
  width: auto;
  display: inline-flex;
  flex: 0 0 auto;
}

.pi-auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eef6ed;
}

.pi-auth-card {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--pi-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(18, 36, 26, 0.14);
}

.pi-auth-card h1 {
  margin: 0;
  font-size: 24px;
}

.pi-auth-card label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}

.pi-auth-card input,
.pi-auth-card button {
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--pi-line);
  padding: 0 12px;
  font: inherit;
}

.pi-auth-card button {
  border: 0;
  background: var(--pi-green);
  color: #fff;
  font-weight: 800;
}

.pi-auth-error {
  min-height: 18px;
  color: #a33a2a;
  font-size: 13px;
}

.pi-navbar-title {
  min-width: 0;
  max-width: calc(100% - 118px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
}

.pi-navbar-title > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-page .navbar,
.pi-page .navbar-inner {
  min-height: var(--pi-navbar-height);
  height: var(--pi-navbar-height);
}

.pi-page .navbar .brand-lockup {
  transform: scale(0.82);
  transform-origin: left center;
}

.pi-agv3-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  padding: 0 8px;
  border: 1px solid var(--pi-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--pi-ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.pi-agv3-link .brand-lockup {
  font-size: 15px;
}

.pi-settings-toggle {
  min-width: 32px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  border: 1px solid var(--pi-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pi-green);
  font-size: 17px;
  font-weight: 900;
}

.pi-page-content {
  height: calc(100% - var(--pi-navbar-height));
  margin-top: var(--pi-navbar-height);
  position: relative;
  display: grid;
  grid-template-rows: var(--pi-control-split) var(--pi-splitter-size) minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.pi-control-band {
  min-height: 0;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: hidden;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pi-line);
  background: #fff;
}

.pi-control-band--overlay-open {
  z-index: 940;
}

.pi-pane-splitter {
  min-height: var(--pi-splitter-size);
  cursor: row-resize;
  background: linear-gradient(180deg, #d9e5db, #f6faf5);
  border-top: 1px solid rgba(34, 55, 42, 0.12);
  border-bottom: 1px solid rgba(34, 55, 42, 0.12);
  touch-action: none;
}

.pi-pane-splitter[hidden] {
  display: none !important;
}

.pi-pane-splitter::before {
  content: "";
  display: block;
  width: 96px;
  height: 6px;
  margin: 5px auto;
  border-radius: 999px;
  background: rgba(47, 107, 69, 0.45);
}

.pi-is-resizing {
  cursor: row-resize;
  user-select: none;
}

.pi-wizard-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pi-wizard-step {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  background: rgba(255, 255, 255, 0.88);
  color: var(--pi-muted);
  text-align: left;
  cursor: pointer;
}

.pi-wizard-step:disabled {
  cursor: default;
  opacity: 0.48;
}

.pi-wizard-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2ec;
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.pi-wizard-step b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.pi-wizard-step.is-active {
  border-color: rgba(255, 138, 0, 0.6);
  background: #fff;
  color: var(--pi-ink);
  box-shadow: 0 10px 28px rgba(47, 107, 69, 0.12);
}

.pi-wizard-step.is-active span {
  background: var(--pi-gold);
  color: #fff;
}

.pi-wizard-step.is-done span {
  background: var(--pi-green);
  color: #fff;
}

.pi-intake-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.pi-intake-farm {
  min-width: 190px;
}

.pi-source-switch,
.pi-csv-intake {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.pi-csv-intake select,
.pi-csv-intake input[type="text"] {
  width: auto;
  min-width: 150px;
  max-width: 220px;
  min-height: 34px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  padding: 0 10px;
  background: #fff;
  color: var(--pi-ink);
  font-weight: 800;
}

.pi-mini-check {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  background: rgba(255,255,255,0.78);
  font-size: 12px;
  font-weight: 850;
}

.pi-csv-mapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.pi-csv-mapper label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--pi-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pi-csv-mapper .pi-csv-aliases {
  position: relative;
  grid-column: span 2;
  align-self: end;
}

.pi-csv-mapper select,
.pi-csv-mapper input,
.pi-csv-mapper textarea {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  padding: 0 8px;
  background: #fff;
  color: var(--pi-ink);
  font-weight: 800;
}

.pi-csv-alias-btn {
  width: auto;
  min-height: 34px;
  justify-self: start;
  font-weight: 900;
}

.pi-csv-alias-panel {
  position: fixed;
  z-index: 960;
  top: calc(var(--pi-navbar-height) + 118px);
  left: 50%;
  right: auto;
  width: min(760px, calc(100vw - 34px));
  max-height: calc(100vh - var(--pi-navbar-height) - 136px);
  max-height: calc(100dvh - var(--pi-navbar-height) - 136px);
  overflow: auto;
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  background: var(--pi-panel-bg);
  box-shadow: var(--pi-shadow);
}

.pi-csv-alias-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pi-csv-alias-table-head strong {
  display: block;
  color: var(--pi-ink);
  font-size: 13px;
  font-weight: 950;
}

.pi-csv-alias-table-head span {
  display: block;
  margin-top: 2px;
  color: var(--pi-muted);
  font-size: 11px;
  font-weight: 850;
}

.pi-csv-alias-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pi-csv-alias-actions .button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.pi-csv-alias-table {
  display: grid;
  gap: 6px;
}

.pi-csv-alias-row {
  display: grid;
  grid-template-columns: minmax(58px, 0.58fr) minmax(170px, 1.35fr) minmax(110px, 0.9fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  background: rgba(255,255,255,0.82);
  color: var(--pi-ink);
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
}

.pi-csv-alias-row.is-excluded {
  opacity: 0.74;
  background: rgba(163, 58, 42, 0.06);
}

.pi-csv-alias-value {
  min-width: 0;
  overflow: hidden;
  color: var(--pi-ink);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-csv-alias-row select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  padding: 0 8px;
  background: #fff;
  color: var(--pi-ink);
  font-weight: 850;
}

.pi-csv-alias-current {
  min-width: 0;
  overflow: hidden;
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-csv-alias-row input[type="checkbox"] {
  justify-self: end;
  width: 18px;
  height: 18px;
}

.pi-csv-alias-grid,
.pi-csv-alias-list,
.pi-csv-alias-pairs {
  display: none;
}

@media (max-width: 620px) {
  .pi-csv-alias-table-head {
    display: grid;
  }

  .pi-csv-alias-actions {
    justify-content: flex-start;
  }

  .pi-csv-alias-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pi-csv-alias-row select,
  .pi-csv-alias-current {
    grid-column: 1 / -1;
  }
}

.pi-csv-alias-done {
  margin-top: 10px;
}

.pi-csv-mapper .button {
  align-self: end;
}

.pi-intake-hint {
  min-height: 20px;
  color: var(--pi-ink);
  font-size: 15px;
  font-weight: 850;
}

.pi-file-pick {
  width: max-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--pi-radius);
  background: var(--pi-green);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.pi-file-pick input {
  display: none;
}

.pi-delete-all {
  --f7-button-height: 34px;
  width: auto;
  align-self: center;
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 34px;
  border-color: rgba(163, 58, 42, 0.32);
  color: #a33a2a;
  font-size: 12px;
  font-weight: 900;
}

.pi-settings-disclosure {
  min-width: 0;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  background: rgba(247, 249, 245, 0.75);
}

.pi-settings-popover {
  position: absolute;
  top: 8px;
  right: 10px;
  left: 10px;
  z-index: 900;
  display: none;
  max-height: min(72vh, 520px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(21, 34, 26, 0.22);
}

.pi-settings-popover[open] {
  display: block;
  animation: piSettingsDrop 140ms ease-out;
}

.pi-settings-disclosure summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pi-settings-popover summary {
  min-height: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

@keyframes piSettingsDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pi-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.pi-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--pi-muted);
}

.pi-field select,
.pi-field input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  padding: 0 10px;
  background: #fff;
  color: var(--pi-ink);
}

.pi-field input[type="range"].pi-slider {
  min-height: 34px;
  padding: 0;
  accent-color: var(--pi-green);
  cursor: pointer;
}

.pi-field-check {
  grid-template-columns: 22px 1fr;
  align-items: center;
  align-content: end;
  min-height: 58px;
}

.pi-field-check input {
  min-height: 20px;
  accent-color: var(--pi-green);
}

.pi-map-section {
  grid-row: 3;
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #dfe8de;
}

.pi-map {
  width: 100%;
  height: 100%;
}

.pi-map .leaflet-top.leaflet-left {
  top: auto;
  bottom: 118px;
  z-index: 420;
}

.pi-map .leaflet-top.leaflet-left .leaflet-control {
  margin-top: 0;
  margin-bottom: 8px;
}

.pi-map .leaflet-control-zoom {
  transform: scale(0.7);
  transform-origin: left bottom;
}

.pi-map--blank {
  background: #f8fbf8;
}

.pi-map.is-hidden-for-review {
  display: none;
}

.pi-map-hud,
.pi-map-toolbar,
.pi-bulk-panel,
.pi-no-gps-tray,
.pi-trash-drop,
.pi-trash-drawer,
.pi-offscreen-badge,
.pi-progress {
  position: absolute;
  z-index: 500;
}

.pi-map-hud {
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.pi-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pi-readiness-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(47, 107, 69, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--pi-ink);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 24px rgba(21, 34, 26, 0.14);
}

.pi-readiness-pill--ready {
  background: rgba(217, 241, 222, 0.94);
  color: var(--pi-green);
}

.pi-readiness-pill--warn {
  background: rgba(255, 233, 196, 0.96);
  color: #9a5b12;
}

.pi-status {
  max-width: min(420px, 50%);
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pi-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  box-shadow: 0 8px 24px rgba(21, 34, 26, 0.14);
}

.pi-status:empty {
  display: none;
}

.pi-status[data-tone="error"],
.pi-status[data-tone="warn"] {
  color: #9a3d12;
}

.pi-status[data-tone="success"] {
  color: var(--pi-green);
}

.pi-map-toolbar {
  top: 52px;
  right: 10px;
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(47, 107, 69, 0.16);
  border-radius: var(--pi-radius);
  background: var(--pi-panel-bg);
  box-shadow: var(--pi-shadow);
}

.pi-map-toolbar .button,
.pi-bulk-controls .button,
.pi-icon-action,
.pi-selected-count {
  --f7-button-height: 30px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: var(--pi-radius);
  font-size: 12px;
  font-weight: 900;
}

.pi-selected-count {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(29, 79, 115, 0.22);
  background: rgba(255, 255, 255, 0.94);
  color: #1d4f73;
}

#piReviewBtn.is-ready {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 5px rgba(47, 107, 69, 0.45), 0 12px 28px rgba(47, 107, 69, 0.28);
}

.pi-shape-app .pi-settings-toggle {
  width: auto;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.pi-shape-inspector,
.pi-shape-warnings {
  position: absolute;
  z-index: 510;
  right: 10px;
  width: min(340px, calc(100% - 20px));
  border: 1px solid rgba(47, 107, 69, 0.18);
  border-radius: var(--pi-radius);
  background: var(--pi-panel-bg);
  box-shadow: var(--pi-shadow);
}

.pi-shape-inspector {
  top: 96px;
  padding: 12px;
}

.pi-shape-warnings {
  left: 10px;
  right: auto;
  bottom: 10px;
  padding: 9px 10px;
  color: #9a5b12;
  font-size: 12px;
  font-weight: 800;
}

.pi-shape-editor {
  display: grid;
  gap: 10px;
}

.pi-shape-editor-title {
  font-size: 15px;
  font-weight: 950;
  color: var(--pi-ink);
}

.pi-shape-state {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.pi-shape-state.is-included {
  background: rgba(255, 240, 204, 0.96);
  color: #b54708;
}

.pi-shape-state.is-excluded {
  background: #f2f4f7;
  color: #667085;
}

.pi-shape-state.is-selected {
  background: rgba(29, 79, 115, 0.12);
  color: #1d4f73;
}

.pi-shape-state.is-existing {
  background: rgba(29, 79, 115, 0.12);
  color: #1d4f73;
}

.pi-existing-paddock-label {
  border: 1px solid rgba(0, 109, 143, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #004c63;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.pi-shape-editor .mi-label-field,
.pi-shape-editor .mi-field-label {
  display: grid;
  gap: 4px;
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 850;
}

.pi-shape-editor input,
.pi-shape-editor select,
.pi-shape-review-card input,
.pi-shape-review-card select {
  min-height: 34px;
  width: 100%;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  padding: 0 8px;
  background: #fff;
  color: var(--pi-ink);
  font: inherit;
  font-size: 13px;
}

.pi-shape-editor .button,
.pi-shape-editor .mm-btn {
  width: 100%;
}

.pi-shape-review-card {
  display: grid;
  grid-template-columns: 24px 74px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: auto;
  text-align: left;
  cursor: default;
}

.pi-shape-review-card.is-included {
  border-color: rgba(247, 144, 9, 0.45);
}

.pi-shape-review-card.is-excluded {
  border-color: rgba(102, 112, 133, 0.26);
  background: #f9fafb;
  color: #667085;
}

.pi-shape-review-card .mi-row-topline,
.pi-shape-review-card .mm-fields,
.pi-shape-review-card .mi-field-row {
  display: grid;
  gap: 7px;
}

.pi-shape-review-card .mi-row-topline {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.pi-shape-swatch {
  width: 74px;
  height: 74px;
  border: 1px solid rgba(247, 144, 9, 0.36);
  border-radius: 8px;
  background: rgba(255, 250, 235, 0.96);
}

.pi-shape-swatch polygon {
  fill: rgba(253, 176, 34, 0.36);
  stroke: #f79009;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.pi-shape-swatch-empty {
  display: grid;
  place-items: center;
  color: var(--pi-muted);
  font-size: 11px;
  font-weight: 900;
}

.pi-row-map-btn {
  --f7-button-height: 26px;
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.pi-shape-review-card .mm-fields-2 {
  grid-template-columns: minmax(220px, 1.5fr) minmax(0, 200px);
}

.pi-shape-review-card [data-pi-title] {
  min-height: 42px;
  font-size: 16px;
  font-weight: 850;
}

.mi-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 850;
}

.mi-summary-chip.is-warn {
  background: rgba(255, 233, 196, 0.96);
  color: #9a5b12;
}

.mi-warn {
  color: #9a5b12;
  font-size: 12px;
  font-weight: 800;
}

.mi-chk {
  width: 18px;
  height: 18px;
  accent-color: var(--pi-green);
}

.pi-offscreen-badge {
  top: 112px;
  right: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: #1d4f73;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(21, 34, 26, 0.22);
  cursor: pointer;
}

.pi-bulk-panel {
  left: auto;
  right: 10px;
  bottom: 106px;
  width: min(288px, calc(100% - 20px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(47, 107, 69, 0.24);
  border-radius: var(--pi-radius);
  background: var(--pi-panel-bg);
  box-shadow: var(--pi-shadow);
}

.pi-bulk-controls {
  display: contents;
}

.pi-bulk-copy,
.pi-bulk-selectors {
  min-width: 0;
}

.pi-bulk-copy {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.pi-bulk-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-bulk-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pi-bulk-controls .button {
  width: 100%;
  min-width: 0;
}

.pi-bulk-controls select {
  min-height: 30px;
  width: 100%;
  max-width: none;
  border: 1px solid var(--pi-line);
  border-radius: var(--pi-radius);
  padding: 0 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.pi-bulk-close {
  min-width: 0 !important;
  padding: 0 10px;
  border-color: rgba(163, 58, 42, 0.4) !important;
  background: #fff2ef !important;
  color: #a33a2a !important;
}

#piBulkAiToggle.is-ai-on {
  border-color: rgba(47, 107, 69, 0.36);
  background: var(--pi-green);
  color: #fff;
}

#piBulkAiToggle.is-ai-off {
  color: var(--pi-muted);
}

.pi-icon-action {
  border: 1px solid rgba(47, 107, 69, 0.24);
  background: #fff;
  color: var(--pi-green);
}

.pi-no-gps-tray {
  left: 10px;
  right: 92px;
  bottom: 10px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(47, 107, 69, 0.22);
  border-radius: var(--pi-radius);
  background: var(--pi-panel-bg);
  box-shadow: var(--pi-shadow);
}

.pi-no-gps-label {
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pi-no-gps-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pi-tray-thumb,
.pi-trash-item {
  width: var(--pi-thumb-size);
  height: var(--pi-thumb-size);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 8px;
  background: #e5eee5;
  color: var(--pi-muted);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pi-tray-thumb.is-selected,
.pi-photo-pin.is-selected {
  border-color: #ff8a00;
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(255, 138, 0, 0.95), 0 0 22px rgba(255, 138, 0, 0.38);
}

.pi-tray-thumb img,
.pi-trash-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-trash-drop {
  right: 10px;
  bottom: 10px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(131, 41, 32, 0.5);
  border-radius: var(--pi-radius);
  background: rgba(255, 255, 255, 0.96);
  color: #832920;
  font-size: 0;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(21, 34, 26, 0.18);
}

.pi-trash-drop::before {
  content: "🗑";
  font-size: 34px;
  line-height: 1;
}

.pi-trash-drawer {
  right: 10px;
  bottom: 90px;
  width: min(340px, calc(100% - 20px));
  max-height: min(420px, 70%);
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(21, 34, 26, 0.24);
}

.pi-trash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pi-trash-head button {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(163, 58, 42, 0.4);
  border-radius: 6px;
  background: #fff2ef;
  color: #a33a2a;
  min-height: 32px;
  padding: 0;
  font-weight: 900;
}

.pi-trash-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pi-trash-item {
  width: 76px;
  height: 92px;
  grid-template-rows: 58px 1fr;
  cursor: pointer;
}

.pi-trash-item small {
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.pi-progress {
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(21, 34, 26, 0.18);
}

.pi-muted {
  color: var(--pi-muted);
  font-size: 12px;
}

.pi-place-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 92px;
  z-index: 520;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(21, 34, 26, 0.9);
  color: #fff;
  font-weight: 800;
}

.pi-photo-marker-shell,
.pi-asset-marker-shell {
  border: 0;
  background: transparent;
}

.pi-photo-pin {
  position: relative;
  width: var(--pi-thumb-size);
  min-width: var(--pi-thumb-size);
  border: 2px solid #fff;
  border-radius: var(--pi-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.34);
}

.pi-photo-pin__img {
  width: 100%;
  height: var(--pi-thumb-size);
  display: grid;
  place-items: center;
  background: #e5eee5;
  color: var(--pi-muted);
}

.pi-photo-pin--csv .pi-photo-pin__img {
  background: linear-gradient(145deg, #123b2a, #1ed7a6);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.pi-csv-point {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 1px;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #123b2a;
  color: #1ed7a6;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

.pi-csv-point.is-selected {
  border-color: #ff8a00;
  box-shadow: 0 0 0 2px rgba(255, 138, 0, 0.95), 0 2px 7px rgba(0, 0, 0, 0.28);
}

.pi-csv-point.is-excluded {
  opacity: 0.42;
  filter: grayscale(0.7);
}

.pi-dmha-group-marker {
  min-width: 74px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 5px 8px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: rgba(21, 34, 26, 0.92);
  color: #1ed7a6;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.pi-dmha-group-marker small {
  color: #fff;
  font-size: 9px;
  font-weight: 850;
}

.pi-photo-pin__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-photo-pin__meta {
  height: 22px;
  display: grid;
  grid-template-columns: 28px 1fr;
  background: #fff;
}

.pi-photo-pin.is-tiny .pi-photo-pin__meta {
  height: 40px;
  grid-template-columns: 1fr;
  grid-template-rows: 20px 20px;
}

.pi-photo-pin__ai,
.pi-photo-pin__type {
  min-width: 0;
  border: 0;
  border-left: 1px solid rgba(34, 55, 42, 0.12);
  background: #fff;
  color: var(--pi-ink);
  font-size: 9px;
  font-weight: 900;
}

[data-pi-font-scale="small"] .pi-photo-pin__ai,
[data-pi-font-scale="small"] .pi-photo-pin__type {
  font-size: 8px;
}

[data-pi-font-scale="large"] .pi-photo-pin__ai,
[data-pi-font-scale="large"] .pi-photo-pin__type {
  font-size: 10px;
}

.pi-photo-pin__ai.is-on {
  background: #1d4f73;
  color: #fff;
}

.pi-photo-pin__ai.is-off {
  background: #eef2ec;
  color: var(--pi-muted);
  opacity: 1;
}

.pi-photo-pin__type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 3px;
}

.pi-photo-pin__status {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -3px;
  right: -3px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pi-green);
}

.pi-photo-pin__status--warn {
  background: var(--pi-gold);
}

.pi-photo-pin__status--muted {
  background: var(--pi-muted);
}

.pi-photo-pin.is-type-flashing .pi-photo-pin__type {
  animation: piTypeFlash 1.2s ease-out;
}

.pi-photo-pin.is-assignment-flashing {
  animation: piAssignFlash 1.4s ease-out;
}

.pi-photo-pin__assigned {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 999px;
  background: #1d4f73;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(21, 34, 26, 0.26);
}

@keyframes piTypeFlash {
  0% { box-shadow: inset 0 0 0 0 rgba(255, 138, 0, 0); }
  20% { box-shadow: inset 0 0 0 4px rgba(255, 138, 0, 0.95); }
  100% { box-shadow: inset 0 0 0 0 rgba(255, 138, 0, 0); }
}

@keyframes piAssignFlash {
  0% { box-shadow: 0 0 0 0 rgba(29, 79, 115, 0), 0 4px 16px rgba(0, 0, 0, 0.34); }
  22% { box-shadow: 0 0 0 8px rgba(29, 79, 115, 0.38), 0 4px 16px rgba(0, 0, 0, 0.34); }
  100% { box-shadow: 0 0 0 0 rgba(29, 79, 115, 0), 0 4px 16px rgba(0, 0, 0, 0.34); }
}

.pi-asset-marker {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 7px;
  padding: 0 3px;
  background: #1d4f73;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}

.pi-review-panel {
  position: absolute;
  inset: 0;
  z-index: 560;
  overflow: auto;
  background: #f7f9f5;
}

.pi-review-shell {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}

.pi-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pi-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pi-import-rollback {
  border-color: rgba(163, 58, 42, 0.38);
  color: #a33a2a;
}

.pi-review-head h2 {
  margin: 0;
  color: var(--pi-green);
  font-size: 24px;
}

.pi-review-head p {
  margin: 4px 0 0;
  color: var(--pi-muted);
  font-size: 13px;
  font-weight: 800;
}

.pi-review-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.pi-review-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--pi-line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--pi-ink);
  text-align: left;
  cursor: pointer;
}

.pi-review-card:disabled {
  cursor: default;
  opacity: 1;
}

.pi-review-thumb {
  width: 70px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #e4ebe3;
  color: var(--pi-muted);
  font-size: 11px;
}

.pi-review-thumb--metric {
  background: linear-gradient(145deg, #123b2a, #1ed7a6);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.pi-review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-review-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.pi-review-copy strong,
.pi-review-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-review-copy small {
  color: var(--pi-muted);
  font-size: 12px;
  font-weight: 800;
}

.pi-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 0 4px 4px 0;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf2ed;
  color: var(--pi-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.pi-status-pill--ready {
  background: #dceedd;
  color: var(--pi-green);
}

.pi-status-pill--warn {
  background: #fff2d9;
  color: #9a5b12;
}

.pi-status-pill--ai {
  background: #e2edf5;
  color: #1d4f73;
}

.pi-status-pill--no-ai {
  position: relative;
  background: #edf2ed;
  color: var(--pi-muted);
}

.pi-status-pill--no-ai::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-22deg);
  opacity: 0.85;
}

.pi-status-pill--muted {
  color: var(--pi-muted);
}

.pi-final-import {
  width: auto;
  min-width: min(180px, 100%);
  justify-self: center;
  min-height: 48px;
}

.pi-empty-state {
  border: 1px dashed var(--pi-line);
  border-radius: 8px;
  padding: 18px;
  color: var(--pi-muted);
  background: #fff;
  font-weight: 800;
}

.pi-detail-sheet {
  height: min(720px, 88vh);
  height: min(720px, 88dvh);
  min-height: 360px;
  resize: vertical;
  overflow: auto;
}

.pi-detail-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.pi-detail-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pi-detail-top-actions .button {
  --f7-button-height: 30px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.pi-detail-grip {
  width: 84px;
  height: 5px;
  margin: 8px auto 4px;
  border-radius: 999px;
  background: rgba(102, 115, 107, 0.42);
}

.pi-detail-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.pi-detail-preview {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #e4ebe3;
  color: var(--pi-muted);
  font-size: 12px;
}

.pi-detail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-detail-target-title {
  font-size: 18px;
  font-weight: 900;
}

.pi-detail-target-sub {
  color: var(--pi-muted);
  font-size: 13px;
  text-transform: capitalize;
}

.pi-detail-actions {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.pi-detail-field-help {
  margin-top: 4px;
  color: var(--pi-muted);
  font-size: 11px;
  font-weight: 700;
}

.pi-toggle-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

[data-pi-font-scale="small"] .pi-photo-pin__type,
[data-pi-font-scale="small"] .pi-status,
[data-pi-font-scale="small"] .pi-review-copy small {
  font-size: 10px;
}

[data-pi-font-scale="large"] .pi-status,
[data-pi-font-scale="large"] .pi-review-copy small {
  font-size: 14px;
}

[data-pi-icon-scale="large"] .pi-asset-marker {
  min-width: 32px;
  height: 32px;
  font-size: 18px;
}

[data-pi-icon-scale="extra_large"] .pi-asset-marker {
  min-width: 38px;
  height: 38px;
  font-size: 22px;
}

[data-pi-theme="future"] {
  --pi-green: #1ed7a6;
  --pi-ink: #e8fff8;
  --pi-muted: #a9d8ce;
  --pi-line: rgba(30, 215, 166, 0.28);
  --pi-surface: #061412;
  --pi-blue: #45a7ff;
  --pi-gold: #f5d76e;
  --pi-panel-bg: rgba(5, 18, 20, 0.78);
  --pi-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), 0 0 28px rgba(30, 215, 166, 0.12);
}

[data-pi-theme="future"] .pi-page .navbar,
[data-pi-theme="future"] .pi-page .navbar-inner,
[data-pi-theme="future"] .pi-page .navbar-bg {
  background: #071816;
  color: var(--pi-ink);
}

[data-pi-theme="future"] .pi-navbar-title,
[data-pi-theme="future"] .pi-page .navbar .brand-lockup {
  color: var(--pi-ink);
}

[data-pi-theme="future"] .pi-page .navbar .brand-lockup {
  --brand-lockup-ag: #6bf29b;
  --brand-lockup-rhythm: #7fb4ff;
}

[data-pi-theme="future"] .pi-pane-splitter {
  border-color: rgba(30, 215, 166, 0.28);
  background: linear-gradient(180deg, #071816, #0e302c);
  box-shadow: inset 0 0 22px rgba(30, 215, 166, 0.12);
}

[data-pi-theme="future"] .pi-pane-splitter::before {
  background: linear-gradient(90deg, #16c79a, #45a7ff);
  box-shadow: 0 0 18px rgba(30, 215, 166, 0.42);
}

[data-pi-theme="future"] .pi-control-band,
[data-pi-theme="future"] .pi-review-panel,
[data-pi-theme="future"] .pi-auth-card {
  background: #071816;
  color: var(--pi-ink);
}

[data-pi-theme="future"] .pi-wizard-step,
[data-pi-theme="future"] .pi-settings-disclosure,
[data-pi-theme="future"] .pi-settings-toggle,
[data-pi-theme="future"] .pi-field input,
[data-pi-theme="future"] .pi-field select,
[data-pi-theme="future"] .pi-bulk-controls select,
[data-pi-theme="future"] .pi-review-card,
[data-pi-theme="future"] .pi-photo-pin,
[data-pi-theme="future"] .pi-photo-pin__meta,
[data-pi-theme="future"] .pi-photo-pin__ai,
[data-pi-theme="future"] .pi-photo-pin__type,
[data-pi-theme="future"] .pi-icon-action {
  background: rgba(8, 28, 30, 0.92);
  color: var(--pi-ink);
  border-color: rgba(30, 215, 166, 0.26);
}

[data-pi-theme="future"] .pi-wizard-step span {
  background: rgba(232, 255, 248, 0.92);
  color: #061412;
  border: 1px solid rgba(30, 215, 166, 0.36);
  box-shadow: 0 0 14px rgba(30, 215, 166, 0.16);
}

[data-pi-theme="future"] .pi-wizard-step.is-active span {
  background: #f5d76e;
  color: #061412;
  border-color: rgba(245, 215, 110, 0.68);
}

[data-pi-theme="future"] .pi-wizard-step.is-done span {
  background: #1ed7a6;
  color: #031312;
  border-color: rgba(30, 215, 166, 0.7);
}

[data-pi-theme="future"] .pi-map-toolbar,
[data-pi-theme="future"] .pi-bulk-panel,
[data-pi-theme="future"] .pi-no-gps-tray,
[data-pi-theme="future"] .pi-status,
[data-pi-theme="future"] .pi-readiness-pill {
  backdrop-filter: blur(14px);
}

[data-pi-theme="future"] .pi-readiness-pill--ready {
  background: rgba(8, 28, 30, 0.86);
  border-color: rgba(30, 215, 166, 0.42);
  color: #1ed7a6;
  box-shadow: 0 0 22px rgba(30, 215, 166, 0.16);
}

[data-pi-theme="future"] .pi-readiness-pill--warn {
  background: rgba(37, 28, 9, 0.88);
  border-color: rgba(245, 215, 110, 0.42);
  color: #f5d76e;
}

[data-pi-theme="future"] .pi-file-pick,
[data-pi-theme="future"] .button-fill,
[data-pi-theme="future"] .pi-asset-marker {
  background: linear-gradient(135deg, #16c79a, #45a7ff);
  color: #031312;
  box-shadow: 0 0 22px rgba(30, 215, 166, 0.28);
}

[data-pi-theme="future"] .pi-agv3-link {
  background: rgba(8, 28, 30, 0.92);
  border-color: rgba(30, 215, 166, 0.28);
}

[data-pi-theme="future"] .pi-photo-pin__ai.is-on {
  background: linear-gradient(135deg, #16c79a, #45a7ff);
  color: #031312;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 0 12px rgba(30, 215, 166, 0.42);
}

[data-pi-theme="future"] .pi-photo-pin__ai.is-off {
  background: rgba(245, 215, 110, 0.15);
  color: #f5d76e;
  box-shadow: inset 0 0 0 1px rgba(245, 215, 110, 0.35);
  opacity: 1;
}

[data-pi-theme="future"] #piBulkAiToggle.is-ai-on {
  background: linear-gradient(135deg, #16c79a, #45a7ff);
  color: #031312;
  box-shadow: 0 0 16px rgba(30, 215, 166, 0.3);
}

[data-pi-theme="future"] #piBulkAiToggle.is-ai-off {
  color: #f5d76e;
  box-shadow: inset 0 0 0 1px rgba(245, 215, 110, 0.28);
}

.pi-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5000;
  pointer-events: none;
  opacity: 0.86;
  transform-origin: left top;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

@media (max-width: 760px) {
  :root {
    --pi-navbar-height: 38px;
    --pi-splitter-size: 0px;
  }

  .pi-page-content {
    --pi-control-split: auto;
    grid-template-rows: minmax(0, auto) 0 minmax(260px, 1fr);
  }

  .pi-page .navbar .brand-lockup {
    transform: scale(0.74);
  }

  .pi-agv3-link .brand-lockup {
    transform: none;
    font-size: 13px;
  }

  .pi-navbar-title {
    max-width: calc(100% - 104px);
    gap: 4px;
  }

  .pi-navbar-title > span {
    display: none;
  }

  .pi-agv3-link {
    min-height: 30px;
    margin-right: 6px;
    padding: 0 9px;
    font-size: 11px;
  }

  .pi-settings-toggle {
    min-width: 30px;
    min-height: 30px;
    margin-right: 4px;
    font-size: 15px;
  }

  .pi-shape-app .pi-settings-toggle {
    width: 30px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .pi-shape-app .pi-settings-toggle::before {
    content: "⚙";
    color: var(--pi-green);
  }

  .pi-shape-inspector {
    top: auto;
    right: 10px;
    bottom: 10px;
    max-height: 42vh;
    overflow: auto;
  }

  .pi-shape-warnings {
    display: none;
  }

  .pi-shape-review-card .mm-fields-2 {
    grid-template-columns: 1fr;
  }

  .pi-shape-review-card {
    grid-template-columns: 24px 54px minmax(0, 1fr);
    gap: 8px;
  }

  .pi-shape-swatch {
    width: 54px;
    height: 54px;
  }

  .pi-control-band {
    max-height: min(48vh, 360px);
    max-height: min(48dvh, 360px);
    gap: 6px;
    overflow: auto;
    padding: 8px;
    overscroll-behavior-x: none;
  }

  .pi-control-band--overlay-open {
    overflow: auto;
  }

  .pi-pane-splitter::before {
    width: 118px;
    height: 7px;
    margin: 9px auto;
  }

  .pi-wizard-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .pi-wizard-step {
    min-width: 0;
    min-height: 34px;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
  }

  .pi-wizard-step span {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .pi-wizard-step b {
    max-width: 100%;
    font-size: 10px;
  }

  .pi-intake-row {
    align-items: center;
    flex-direction: row;
    gap: 6px;
  }

  .pi-csv-intake,
  .pi-source-switch {
    width: 100%;
  }

  .pi-csv-intake select,
  .pi-csv-intake input[type="text"] {
    flex: 1 1 132px;
    min-width: 0;
    max-width: none;
  }

  .pi-csv-mapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .pi-csv-mapper .pi-csv-aliases {
    grid-column: 1 / -1;
  }

  .pi-csv-alias-panel {
    top: calc(var(--pi-navbar-height) + 8px);
    width: calc(100vw - 16px);
    max-height: calc(100vh - var(--pi-navbar-height) - 20px);
    max-height: calc(100dvh - var(--pi-navbar-height) - 20px);
    padding: 8px;
  }

  .pi-file-pick {
    width: auto;
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .pi-intake-hint {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .pi-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 8px 8px;
  }

  .pi-field {
    font-size: 10px;
  }

  .pi-field select,
  .pi-field input {
    min-height: 30px;
    padding: 0 7px;
    font-size: 12px;
  }

  .pi-settings-disclosure summary {
    min-height: 32px;
    padding: 0 9px;
  }

  .pi-map-hud {
    align-items: flex-start;
    flex-direction: column;
  }

  .pi-status {
    max-width: 100%;
    text-align: left;
  }

  .pi-readiness-pill {
    min-height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .pi-map-toolbar {
    top: 8px;
    right: 8px;
    bottom: auto;
    padding: 4px;
  }

  .pi-map-toolbar .button,
  .pi-bulk-controls .button,
  .pi-icon-action {
    --f7-button-height: 26px;
    min-height: 26px;
    min-width: 44px;
    padding: 0 7px;
    font-size: 11px;
  }

  .pi-bulk-panel {
    left: auto;
    right: 8px;
    bottom: auto;
    top: 44px;
    width: min(256px, calc(100% - 16px));
    gap: 4px;
    padding: 5px;
  }

  .pi-bulk-copy strong {
    font-size: 11px;
    white-space: nowrap;
  }

  .pi-bulk-controls select {
    width: 100%;
    max-width: none;
    min-height: 26px;
    padding: 0 5px;
    font-size: 11px;
  }

  .pi-bulk-close {
    min-width: 0 !important;
    padding: 0 6px;
  }

  .pi-no-gps-tray {
    right: 72px;
    padding: 5px;
    z-index: 530;
  }

  .pi-trash-drop {
    width: 50px;
    height: 50px;
    z-index: 540;
  }

  .pi-trash-drop::before {
    font-size: 30px;
  }

  .pi-map .leaflet-top.leaflet-left {
    bottom: 92px;
  }

  .pi-review-list {
    grid-template-columns: 1fr;
  }

  .pi-detail-hero {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .pi-detail-preview {
    width: 86px;
  }
}

@media (max-width: 430px) {
  .pi-csv-mapper {
    grid-template-columns: 1fr;
  }

  .pi-control-grid {
    grid-template-columns: 1fr;
  }

  .pi-no-gps-tray {
    grid-template-columns: 1fr;
  }

  .pi-no-gps-label {
    white-space: normal;
  }
}

.pi-mapwiz-app .pi-intake-row input[type="date"],
.pi-mapwiz-app .pi-intake-row input[type="text"] {
  min-height: 40px;
}

.pi-mapwiz-toolbar {
  gap: 6px;
}

.pi-mapwiz-overlay-tools {
  align-items: center;
  gap: 10px;
  left: 12px;
  right: auto;
  width: min(560px, calc(100% - 24px));
}

.pi-mapwiz-overlay-tools .pi-field {
  margin: 0;
  min-width: 150px;
}

.pi-mapwiz-overlay-tools .pi-field b {
  font-variant-numeric: tabular-nums;
}

.pi-mapwiz-fine-panel {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 10px;
}

.pi-mapwiz-rotate-pad,
.pi-mapwiz-scale-pad {
  display: grid;
  grid-template-columns: repeat(2, minmax(42px, auto));
  gap: 5px;
}

.pi-mapwiz-compass-pad {
  display: grid;
  grid-template-columns: 32px 32px 32px;
  grid-template-rows: 32px 32px 32px;
  gap: 4px;
  align-items: center;
  justify-items: center;
}

.pi-mapwiz-compass-pad .pi-icon-action {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
}

.pi-mapwiz-compass-n {
  grid-column: 2;
  grid-row: 1;
}

.pi-mapwiz-compass-w {
  grid-column: 1;
  grid-row: 2;
}

.pi-mapwiz-compass-e {
  grid-column: 3;
  grid-row: 2;
}

.pi-mapwiz-compass-s {
  grid-column: 2;
  grid-row: 3;
}

.pi-mapwiz-corner {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid #fff;
  background: #2f6b45;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.pi-mapwiz-version-list {
  padding: 14px;
}
