/* ==========================================================================
   Polish layer — loaded after style.css.
   One design language over the whole app: tokens, glass surfaces, depth,
   motion and the small details (focus rings, pressed states, filled sliders,
   custom checkboxes). Layout and behaviour stay in style.css; this file only
   refines how things look and feel. Remove the <link> to switch it all off.
   ========================================================================== */

:root {
  /* Surfaces: deep navy, lifted in steps. */
  --p-bg: #070d1a;
  --p-surface-0: rgba(10, 17, 33, 0.78);   /* bars (glass) */
  --p-surface-1: rgba(17, 26, 46, 0.86);   /* windows (glass) */
  --p-surface-2: #131d33;                  /* cards inside windows */
  --p-surface-3: #1a2641;                  /* controls */
  --p-surface-4: #22304f;                  /* controls: hover */
  --p-line: rgba(148, 163, 184, 0.14);
  --p-line-strong: rgba(148, 163, 184, 0.24);
  --p-hi: inset 0 1px 0 rgba(255, 255, 255, 0.06);   /* top highlight on raised things */
  --p-text: #e8eef8;
  --p-text-2: #a9b6cc;
  --p-text-3: #71809a;
  /* Accents. */
  --p-accent: #3b82f6;
  --p-accent-2: #6366f1;
  --p-accent-soft: rgba(59, 130, 246, 0.16);
  --p-ring: 0 0 0 3px rgba(59, 130, 246, 0.42);
  --p-green: #22c55e;
  --p-green-2: #10b981;
  --p-red: #ef4444;
  --p-red-2: #dc2626;
  --p-amber: #f59e0b;
  /* Shape, depth, motion. */
  --p-r-sm: 8px;
  --p-r: 12px;
  --p-r-lg: 18px;
  --p-r-xl: 22px;
  --p-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.22);
  --p-shadow-2: 0 4px 14px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.4);
  --p-shadow-3: 0 24px 60px rgba(0, 0, 0, 0.55), 0 8px 20px rgba(0, 0, 0, 0.35);
  --p-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --p-fast: 140ms;
  --p-med: 220ms;
  --p-blur: saturate(160%) blur(18px);
  color-scheme: dark;
}

/* ---------- Type ---------- */
html, body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--p-bg);
  color: var(--p-text);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, .modal-card h2 { letter-spacing: -0.015em; }
.hud-stat .v, .hud-stat .value, .kv-v, .spot-stats span, .hl-grid b, .hl-big b, #spotHeightVal, #spotSpeedVal,
#spotSpacingVal, #spotLapsVal, #spotPassesVal, #sc-spotHeightVal, #sc-spotSpeedVal, #sc-spotSpacingVal, #sc-spotLapsVal,
#sc-spotPassesVal { font-variant-numeric: tabular-nums; }   /* (sc-: the schedule's copy, 1.158.923) */
::selection { background: rgba(59, 130, 246, 0.35); }

/* ---------- Focus: a clear ring for keyboards, nothing for taps ---------- */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--p-ring) !important; }

/* ---------- Scrollbars: hidden ---------- */
/* No scrollbars anywhere: everything still scrolls by finger, wheel or trackpad. */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ==========================================================================
   Header
   ========================================================================== */
#hud {
  background: linear-gradient(180deg, rgba(13, 21, 40, 0.96), rgba(9, 15, 30, 0.94));
  border-bottom: 1px solid var(--p-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: var(--p-blur);
  backdrop-filter: var(--p-blur);
  position: relative;
  z-index: 1100;
}
#schedulesBtn, .hud-stat, #settingsBtn {
  background: linear-gradient(180deg, rgba(34, 48, 79, 0.9), rgba(24, 35, 60, 0.9));
  border: 1px solid var(--p-line-strong);
  border-radius: var(--p-r);
  box-shadow: var(--p-hi), var(--p-shadow-1);
  color: var(--p-text);
  transition: background var(--p-fast) var(--p-ease), transform var(--p-fast) var(--p-ease),
    border-color var(--p-fast) var(--p-ease), box-shadow var(--p-fast) var(--p-ease);
}
#schedulesBtn:hover, .hud-stat:hover, #settingsBtn:hover {
  background: linear-gradient(180deg, rgba(44, 61, 99, 0.95), rgba(31, 45, 76, 0.95));
  border-color: rgba(148, 163, 184, 0.36);
}
#schedulesBtn:active, .hud-stat:active, #settingsBtn:active { transform: scale(0.96); }
.hud-stat .hud-sub { color: var(--p-text-3); }
.hud-stat .ic, #schedulesBtn .ic, #settingsBtn .ic { opacity: 0.92; }
#settingsBtn .ic { transition: transform 0.5s var(--p-ease); }
#settingsBtn:hover .ic { transform: rotate(60deg); }

/* The state chip: a live dot that breathes while it mows or charges. */
#stateBtn { position: relative; }
#stateBtn .value { letter-spacing: -0.01em; }
#stateBtn.state-mowing, #stateBtn.state-charging { border-color: rgba(96, 165, 250, 0.35); }
#stateBtn.state-mowing { border-color: rgba(74, 222, 128, 0.4); box-shadow: var(--p-hi), 0 0 0 1px rgba(74, 222, 128, 0.08), 0 0 18px rgba(34, 197, 94, 0.18); }
#stateBtn.state-error { border-color: rgba(248, 113, 113, 0.45); }
/* (1.158.7) The marks that never stop - this one, the charging bolt, the red dot, the Ai badge, the turning blade,
   the battery's flow, the mower's treads - change a few times a second, in steps, not on every display frame. A
   smooth one, however small, makes the browser put the whole page (the map, the blurred panels over it) together
   again 60-120 times a second for as long as it shows: measured on the docked, charging mower, the 13 px bolt
   alone held the browser's graphics process at 34% of a core against 8% with it still, and 10% in steps (owner,
   2026-10-12: Brave "so laggy all of a sudden" with LuLuMate open). Spinners and other short-lived ones stay smooth. */
#stateBtn.state-mowing .ic, #stateBtn.state-charging .ic { animation: p-breathe 2.4s steps(4) infinite; }
/* (1.158.8) Under an open window nothing moves. A window's backdrop blurs the whole screen behind it and its card
   blurs that again, and the browser redoes both for every frame in which anything behind them changes - so these
   marks stand still while one is open (and map.js draws the mower twice a second there, not 30 times). The mow
   start sheet has no backdrop, the map stays in view under it: not counted.
   (1.158.9) Never a window itself or what is in it: the map layers window lives inside the stage, and with its
   fade-in held at its first frame it opened invisible (owner: "the map layers no longer work"). */
body:has(.modal:not(.hidden)) :is(#hud, #stage, #controls) *:not(.modal, .modal *, #busyPill, #busyPill *),
body:has(.modal:not(.hidden)) :is(#hud, #stage, #controls) *:not(.modal, .modal *, #busyPill, #busyPill *)::before,
body:has(.modal:not(.hidden)) :is(#hud, #stage, #controls) *:not(.modal, .modal *, #busyPill, #busyPill *)::after { animation-play-state: paused !important; }
@keyframes p-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.activity-dot { box-shadow: 0 0 0 2px #0b1224, 0 0 10px rgba(239, 68, 68, 0.7); animation: p-dot 1.8s steps(3) infinite; }
@keyframes p-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.8); } }
#connBtn.connected .ic { filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.45)); }

/* ==========================================================================
   Footer command bar
   ========================================================================== */
#controls {
  background: linear-gradient(0deg, rgba(9, 15, 30, 0.97), rgba(13, 21, 40, 0.94));
  border-top: 1px solid var(--p-line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: var(--p-blur);
  backdrop-filter: var(--p-blur);
  position: relative;
  z-index: 1100;
}
#controls button {
  min-height: 42px;
  border-radius: var(--p-r);
  background: linear-gradient(180deg, rgba(34, 48, 79, 0.95), rgba(24, 35, 60, 0.95));
  border: 1px solid var(--p-line-strong);
  box-shadow: var(--p-hi), var(--p-shadow-1);
  color: var(--p-text);
  letter-spacing: -0.005em;
  transition: background var(--p-fast) var(--p-ease), transform var(--p-fast) var(--p-ease),
    opacity var(--p-med) var(--p-ease), box-shadow var(--p-fast) var(--p-ease), color var(--p-fast);
}
#controls button:hover:not(:disabled) { background: linear-gradient(180deg, rgba(46, 64, 104, 0.98), rgba(32, 47, 80, 0.98)); }
#controls button:active:not(:disabled) { transform: scale(0.965); box-shadow: var(--p-hi); }
#controls button .ic { opacity: 0.9; }
/* The one thing to press stands out: Start green, Stop red — when they apply. */
#controls button[data-cmd="main"]:not(:disabled) {
  background: linear-gradient(180deg, #2fbf64, #16a34a);
  border-color: rgba(134, 239, 172, 0.45);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(22, 163, 74, 0.35);
}
#controls button[data-cmd="stop"]:not(:disabled), #controls button.stop-btn:not(:disabled) {
  background: linear-gradient(180deg, #f05252, #d62f2f);
  border-color: rgba(252, 165, 165, 0.45);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 18px rgba(220, 38, 38, 0.35);
}
/* Unavailable: quiet and flat — never a muddy half-tint of its colour. */
#controls button:disabled, #controls button.stop-btn:disabled {
  background: rgba(30, 41, 66, 0.55);
  border-color: rgba(148, 163, 184, 0.1);
  color: rgba(169, 182, 204, 0.42);
  box-shadow: none;
  opacity: 1;
}

/* ==========================================================================
   Map chrome
   ========================================================================== */
#mapControls { gap: 8px; }
#mapControls button, .leaflet-control-zoom a {
  background: rgba(13, 21, 40, 0.82);
  -webkit-backdrop-filter: var(--p-blur);
  backdrop-filter: var(--p-blur);
  border: 1px solid var(--p-line-strong);
  box-shadow: var(--p-hi), var(--p-shadow-2);
  color: var(--p-text);
  transition: background var(--p-fast) var(--p-ease), transform var(--p-fast) var(--p-ease), border-color var(--p-fast), color var(--p-fast);
}
#mapControls button { width: 40px; height: 40px; border-radius: var(--p-r); }
#mapControls button:hover { background: rgba(34, 48, 79, 0.95); border-color: rgba(148, 163, 184, 0.4); }
#mapControls button:active { transform: scale(0.94); }
#mapControls button.active { color: #93c5fd; border-color: rgba(96, 165, 250, 0.55); box-shadow: var(--p-hi), 0 0 0 1px rgba(59, 130, 246, 0.25), var(--p-shadow-2); }
#mapControls #lockMapBtn.locked { color: #fcd34d; border-color: rgba(252, 211, 77, 0.5); box-shadow: var(--p-hi), 0 0 14px rgba(245, 158, 11, 0.22), var(--p-shadow-2); }
/* Zoom: the same glass as the other map buttons, as one stacked pill. */
.leaflet-bar { border: 0 !important; box-shadow: var(--p-shadow-2) !important; border-radius: var(--p-r) !important; overflow: hidden; }
.leaflet-control-zoom a {
  width: 40px !important; height: 40px !important; line-height: 38px !important;
  font: 500 20px/38px -apple-system, system-ui, sans-serif !important;
  border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important;
}
.leaflet-control-zoom-in { border-top-left-radius: var(--p-r) !important; border-top-right-radius: var(--p-r) !important; border-top: 0 !important; }
.leaflet-control-zoom-out { border-bottom-left-radius: var(--p-r) !important; border-bottom-right-radius: var(--p-r) !important; border-bottom: 0 !important; }
.leaflet-control-zoom a:hover { background: rgba(34, 48, 79, 0.95) !important; }
.leaflet-control-zoom a.leaflet-disabled { color: rgba(169, 182, 204, 0.35) !important; background: rgba(13, 21, 40, 0.7) !important; }
/* The ruler (1.159.9): see-through glass - numbered steps over a two-tone bar. (1.159.22, owner: "i think this should be
   placed at top left as it's obstructing status messages") At the top left, under the mowing chip while it shows: the
   bars and alerts at the foot of the map are clear of it. */
.leaflet-top.leaflet-left .map-ruler { margin: 10px 0 0 10px; }
.map-ruler { --mr-ink: #f1f5f9; --mr-soft: rgba(241, 245, 249, 0.55); --mr-faint: rgba(241, 245, 249, 0.16);
  padding: 5px 9px 7px; border-radius: 10px; background: rgba(13, 21, 40, 0.34);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.16);
  color: var(--mr-ink); pointer-events: none !important; -webkit-user-select: none; user-select: none; }
.map-ruler[hidden] { display: none; }
/* (1.159.91, owner: "only show the scale ruler when actively zooming on a map and after for about 2 seconds then hide
   it") Hidden until a zoom by hand: map.js MapRuler adds mr-show from the zoom's start to 2 s after its end. It fades in
   quickly and out gently. */
.map-ruler { opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s linear 0.35s; }
.map-ruler.mr-show { opacity: 1; visibility: visible; transition: opacity 0.12s ease, visibility 0s linear 0s; }
@media (prefers-reduced-motion: reduce) { .map-ruler, .map-ruler.mr-show { transition: none; } }
.map-ruler .mr-in { position: relative; height: 22px; }
.map-ruler .mr-nums { position: absolute; left: 0; right: 0; top: 0; height: 12px;
  font: 600 10.5px/12px -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-variant-numeric: tabular-nums;
  letter-spacing: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.map-ruler .mr-nums span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.map-ruler .mr-nums em { position: absolute; left: 100%; top: 0; margin-left: 3px; font-style: normal; font-weight: 500; opacity: 0.85; }
.map-ruler .mr-ticks b { position: absolute; bottom: 0; width: 1px; height: 8px; margin-left: -0.5px; background: var(--mr-soft); }
.map-ruler .mr-ticks b:first-child, .map-ruler .mr-ticks b:last-child { background: var(--mr-ink); }
.map-ruler .mr-track { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-radius: 2.5px; overflow: hidden;
  background: var(--mr-faint); box-shadow: inset 0 0 0 1px var(--mr-soft); }
.map-ruler .mr-track i { position: absolute; top: 0; bottom: 0; background: var(--mr-ink); }
/* Zoom (1.159.9): + and - at the foot of the map's icon column; a phone pinches instead. (1.159.10, owner: "make the + and
   - icons look the same as the rest, just joined") two of the column's own buttons (map.js), one on the other: the
   corners where they meet are square, one line between them (the lower one's top edge lies over the upper one's
   bottom edge), and one shadow for the pair - the upper one's own would fall on the lower one. */
#mapControls .zoom-pair { display: flex; flex-direction: column; flex: none; border-radius: var(--p-r); box-shadow: var(--p-shadow-2); }
#mapControls .zoom-pair button { box-shadow: var(--p-hi); }
#mapControls .zoom-pair button:first-child { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
#mapControls .zoom-pair button:last-child { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: -1px; box-shadow: none; }
#mapControls .zoom-pair button:disabled { cursor: default; }
#mapControls .zoom-pair button:disabled .ic { opacity: 0.35; }
@media (max-width: 700px) { #mapControls .zoom-pair { display: none !important; } }
/* Zone names: crisp white with a soft halo that reads on any tile. */
.area-label {
  color: #fff;
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 0.01em;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.75), 0 0 10px rgba(0, 0, 0, 0.35);
}
/* (1.159.92, owner: "Next to the area name can you show the size of the area on the map") the size after the name, a step
   quieter, with a dot between so a name ending in a number stays apart from it: "Area 5 · 245 m²". */
.area-label .al-size { font-weight: 500; opacity: 0.88; font-variant-numeric: tabular-nums; }
.area-label .al-size::before { content: '\00B7'; margin: 0 5px; opacity: 0.8; }
/* Popups and tooltips on the map. */
.leaflet-popup-content-wrapper, .leaflet-tooltip:not(.area-label) {
  background: var(--p-surface-1) !important;
  -webkit-backdrop-filter: var(--p-blur); backdrop-filter: var(--p-blur);
  color: var(--p-text) !important;
  border: 1px solid var(--p-line-strong) !important;
  border-radius: var(--p-r) !important;
  box-shadow: var(--p-shadow-2) !important;
}
.leaflet-tooltip:not(.area-label) { font-size: 12px; padding: 5px 9px; }
.leaflet-popup-tip { background: var(--p-surface-1) !important; box-shadow: none !important; }
.leaflet-tooltip-top::before { border-top-color: rgba(17, 26, 46, 0.86) !important; }
.leaflet-container a.leaflet-popup-close-button { color: var(--p-text-2); }
.obst-pop span { color: var(--p-text-2); }

/* Floating badges over the map. */
.pos-badge, .calib-badge, .rec-banner, #notice {
  -webkit-backdrop-filter: var(--p-blur); backdrop-filter: var(--p-blur);
  box-shadow: var(--p-shadow-2);
  border-radius: 999px;
}
/* Two rows: a rounded panel, not a pill. */
.calib-badge { border-radius: var(--p-r-lg); box-shadow: var(--p-hi), var(--p-shadow-2); }

/* ==========================================================================
   Windows (modals), panels, cards
   ========================================================================== */
.modal {
  background: rgba(3, 7, 18, 0.55);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  animation: p-fade var(--p-med) var(--p-ease);
}
.modal-card, .spot-panel, .learn-panel, .camera-panel, .layers-menu {
  background: linear-gradient(180deg, rgba(22, 32, 56, 0.94), rgba(14, 22, 40, 0.95));
  -webkit-backdrop-filter: var(--p-blur); backdrop-filter: var(--p-blur);
  border: 1px solid var(--p-line-strong);
  box-shadow: var(--p-hi), var(--p-shadow-3);
}
/* No blur behind the camera window: it's 95% opaque (the blur barely shows), and with it every
   video frame made the browser redo the blur of the whole window - the GPU at 100% (2026-10-08) */
.camera-panel { -webkit-backdrop-filter: none; backdrop-filter: none; }
.modal-card { border-radius: var(--p-r-xl); animation: p-rise var(--p-med) var(--p-ease); }
.spot-panel, .learn-panel, .layers-menu { border-radius: var(--p-r-lg); }
.layers-menu { animation: p-rise var(--p-fast) var(--p-ease); }
@keyframes p-fade { from { opacity: 0; } }
@keyframes p-rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.modal-card h2, .spot-head h2 { font-size: 20px; font-weight: 700; color: #fff; }
/* Cards inside windows. */
.set-card, .kv-card, .info-card, .spot-saved {
  background: linear-gradient(180deg, rgba(26, 38, 65, 0.55), rgba(19, 29, 51, 0.55));
  border: 1px solid var(--p-line);
  border-radius: var(--p-r-lg);
  box-shadow: var(--p-hi);
}
.set-card h3 { font-size: 13px; font-weight: 650; letter-spacing: 0.01em; color: #fff; }
.set-list .item, .spot-saved-list .row { background: rgba(34, 48, 79, 0.45); border: 1px solid var(--p-line); border-radius: var(--p-r); }
.hl-grid div { background: rgba(34, 48, 79, 0.45); border: 1px solid var(--p-line); border-radius: var(--p-r); }
.hl-battery { background: rgba(8, 14, 28, 0.6); border: 1px solid var(--p-line); border-radius: var(--p-r); }
.hl-bar { background: rgba(8, 14, 28, 0.7); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.hl-bar div { background: linear-gradient(90deg, #16a34a, #4ade80); box-shadow: 0 0 10px rgba(74, 222, 128, 0.35); }
.hl-bar div.due { background: linear-gradient(90deg, #dc2626, #f87171); }

/* Tabs: a segmented control. */
.tabs { background: rgba(8, 14, 28, 0.7); border: 1px solid var(--p-line); border-radius: 14px; padding: 4px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35); }
.tabs .tab { border-radius: 10px; color: var(--p-text-2); transition: color var(--p-fast), background var(--p-fast) var(--p-ease), box-shadow var(--p-fast); }
.tabs .tab:hover { color: #fff; }
.tabs .tab.active {
  background: linear-gradient(180deg, #2b3d66, #223253);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.spot-modes { background: rgba(8, 14, 28, 0.7); border: 1px solid var(--p-line); border-radius: 12px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35); }
.spot-modes button { border-radius: 9px; transition: background var(--p-fast), color var(--p-fast); }
.spot-modes button[aria-checked="true"] { background: linear-gradient(180deg, #2b3d66, #223253); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.35); }
/* Pattern cards. */
.spot-patterns button {
  background: rgba(19, 29, 51, 0.7); border: 1px solid var(--p-line); border-radius: 14px;
  transition: transform var(--p-fast) var(--p-ease), border-color var(--p-fast), background var(--p-fast), box-shadow var(--p-fast);
}
.spot-patterns button:hover:not(:disabled) { border-color: rgba(148, 163, 184, 0.35); transform: translateY(-1px); }
.spot-patterns button:active:not(:disabled) { transform: scale(0.97); }
.spot-patterns button[aria-checked="true"] {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.32), rgba(37, 99, 235, 0.18));
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25), 0 6px 18px rgba(37, 99, 235, 0.22);
}
.spot-stats span { background: rgba(34, 48, 79, 0.6); border: 1px solid var(--p-line); border-radius: 999px; padding: 4px 11px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn, .modal-actions button, .spot-saved-list .row button, .layers-menu button, #recBannerStop {
  border-radius: var(--p-r);
  transition: background var(--p-fast) var(--p-ease), transform var(--p-fast) var(--p-ease),
    box-shadow var(--p-fast) var(--p-ease), filter var(--p-fast), opacity var(--p-fast);
}
.modal-actions button { min-height: 46px; font-weight: 650; letter-spacing: -0.005em; }
/* Primary: blue with depth. */
.modal-actions button:not(.secondary):not(.danger), .btn-primary {
  background: linear-gradient(180deg, #4a8df8, #2563eb) !important;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 20px rgba(37, 99, 235, 0.32);
}
/* Danger: for starting the blades and deleting. */
.modal-actions button.danger, .btn.danger {
  background: linear-gradient(180deg, #f05252, #d62f2f) !important;
  border: 1px solid rgba(252, 165, 165, 0.4) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 20px rgba(220, 38, 38, 0.3);
}
/* Secondary / Close: quiet glass. */
.modal-actions button.secondary, .btn-ghost,
.btn:not(.btn-primary):not(.danger):not(.btn-danger):not(.dock-btn):not(.nogo-btn):not(.live-btn):not(.danger-btn) {
  background: linear-gradient(180deg, rgba(40, 55, 90, 0.85), rgba(28, 40, 68, 0.85));
  border: 1px solid var(--p-line-strong);
  color: var(--p-text);
  box-shadow: var(--p-hi), var(--p-shadow-1);
}
.btn:hover:not(:disabled), .modal-actions button:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled), .modal-actions button:active:not(:disabled), .spot-saved-list .row button:active,
.layers-menu button:active { transform: scale(0.97); }
.btn:disabled, .modal-actions button:disabled { opacity: 0.45; box-shadow: none; filter: grayscale(0.3); cursor: not-allowed; }

/* ==========================================================================
   Form fields
   ========================================================================== */
.modal-card input:not([type=checkbox]):not([type=range]):not([type=radio]),
.modal-card select, .modal-card textarea, .spot-panel input[type=text], .spot-panel input[type=time],
.learn-panel textarea, .learn-panel input[type=text] {
  background: rgba(6, 11, 24, 0.7);
  border: 1px solid var(--p-line-strong);
  border-radius: 10px;
  color: var(--p-text);
  padding: 10px 12px;
  transition: border-color var(--p-fast), box-shadow var(--p-fast), background var(--p-fast);
}
.modal-card input:not([type=checkbox]):not([type=range]):focus, .modal-card select:focus, .modal-card textarea:focus,
.spot-panel input[type=text]:focus, .learn-panel textarea:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: var(--p-ring);
  background: rgba(6, 11, 24, 0.9);
}
.modal-card input::placeholder, .spot-panel input::placeholder, textarea::placeholder { color: var(--p-text-3); }

/* Checkboxes: rounded squares with a drawn tick. */
.modal-card input[type=checkbox]:not(.pl-zone):not([role=switch]), .spot-panel input[type=checkbox]:not([role=switch]),
.layers-menu input[type=checkbox] {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; flex: none; margin: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(148, 163, 184, 0.5);
  background: rgba(6, 11, 24, 0.6);
  display: inline-grid; place-content: center;
  cursor: pointer;
  transition: background var(--p-fast), border-color var(--p-fast), box-shadow var(--p-fast);
}
.modal-card input[type=checkbox]:not(.pl-zone):not([role=switch])::after, .spot-panel input[type=checkbox]:not([role=switch])::after,
.layers-menu input[type=checkbox]::after {
  content: ""; width: 11px; height: 11px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transform: scale(0); transition: transform var(--p-fast) var(--p-ease);
}
.modal-card input[type=checkbox]:not(.pl-zone):not([role=switch]):checked, .spot-panel input[type=checkbox]:not([role=switch]):checked,
.layers-menu input[type=checkbox]:checked {
  background: linear-gradient(180deg, #4a8df8, #2563eb); border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.modal-card input[type=checkbox]:checked::after, .spot-panel input[type=checkbox]:not([role=switch]):checked::after,
.layers-menu input[type=checkbox]:checked::after { transform: scale(1); }
/* The day pickers use hidden checkboxes inside pills — leave those alone. */
.sq-days input, .day-pill input, .chip-row input { display: none !important; }

/* Switches (spot mow "Return to dock"). */
.spot-switch .knob { background: rgba(6, 11, 24, 0.7); border-color: rgba(148, 163, 184, 0.35); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); }
.spot-switch .knob::after { background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); transition: transform var(--p-med) var(--p-ease); }
.spot-switch input:checked + .knob { background: linear-gradient(180deg, #34d27a, #16a34a); border-color: rgba(134, 239, 172, 0.5); }

/* Sliders: a slim track that fills to the value (--pct set by polish.js). */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 22px; background: transparent; cursor: pointer; --pct: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 5px;
  background: linear-gradient(90deg, #3b82f6 0, #60a5fa var(--pct), rgba(148, 163, 184, 0.22) var(--pct));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
input[type=range]::-moz-range-track { height: 5px; border-radius: 5px; background: rgba(148, 163, 184, 0.22); }
input[type=range]::-moz-range-progress { height: 5px; border-radius: 5px; background: linear-gradient(90deg, #3b82f6, #60a5fa); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -7.5px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, #e2e8f0);
  border: 0; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35), 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: box-shadow var(--p-fast), transform var(--p-fast) var(--p-ease);
}
input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; border: 0; background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35), 0 2px 6px rgba(0, 0, 0, 0.45);
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(59, 130, 246, 0.3), 0 2px 8px rgba(0, 0, 0, 0.5); }
input[type=range]:disabled { cursor: not-allowed; opacity: 0.5; }

/* ==========================================================================
   Toasts and banners
   ========================================================================== */
.toast, .push-banner {
  background: linear-gradient(180deg, rgba(24, 35, 60, 0.94), rgba(15, 23, 42, 0.94));
  -webkit-backdrop-filter: var(--p-blur); backdrop-filter: var(--p-blur);
  border: 1px solid var(--p-line-strong);
  border-radius: 14px;
  box-shadow: var(--p-hi), var(--p-shadow-3);
  animation: p-drop var(--p-med) var(--p-ease);
}
@keyframes p-drop { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }
.toast.error { border-color: rgba(248, 113, 113, 0.45); box-shadow: var(--p-hi), 0 0 0 1px rgba(239, 68, 68, 0.12), var(--p-shadow-3); }
.toast.warn { border-color: rgba(251, 191, 36, 0.4); }
.toast .lvl { box-shadow: 0 0 8px currentColor; }
.lvl.ok { background: var(--p-green); color: var(--p-green); }
.lvl.info { background: var(--p-accent); color: var(--p-accent); }
.lvl.warn { background: var(--p-amber); color: var(--p-amber); }
.lvl.error { background: var(--p-red); color: var(--p-red); }
.push-banner { border-color: rgba(96, 165, 250, 0.5); }

/* ==========================================================================
   Motion off for people who ask for it.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- Map: dark street tiles, decluttered zone names ---------- */
/* Dark street map: colour drained first (so the tan buildings can't turn
   brown), inverted, then a faint cool slate tint. */
.tiles-dark { filter: grayscale(1) brightness(0.36) contrast(1.45) sepia(0.35) hue-rotate(180deg) saturate(1.6); }
.leaflet-container.dark-base { background: #121822; }
/* Zone names that would overlap a bigger zone's name fade out until there's room. */
.area-label { transition: opacity var(--p-med) var(--p-ease); }
.area-label.label-hidden { opacity: 0 !important; }
/* The line between + and −. */
.leaflet-control-zoom-in { border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important; }
/* The lawn glows softly; a picked area glows yellow. */
path.lawn-area { filter: drop-shadow(0 0 3px rgba(74, 222, 128, 0.45)); transition: fill-opacity var(--p-fast); }
path.lawn-area:hover { fill-opacity: 0.3; }
path.lawn-area.picked { filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.55)); }
/* (1.159.37) No glow while the map zooms: Android's WebView keeps the filtered drawing of a path that
   Leaflet is scaling for the zoom, so an area came out as a part of itself (cut off in a straight line)
   with a piece of its old colour left beside it. The class goes on for the zoom and off when it ends. */
.leaflet-container.zooming path.lawn-area { filter: none; transition: none; }
/* Zoom: one solid glass pill (the buttons inside are clear). */
.leaflet-control-zoom.leaflet-bar { background: rgba(13, 21, 40, 0.82); -webkit-backdrop-filter: var(--p-blur); backdrop-filter: var(--p-blur); border: 1px solid var(--p-line-strong) !important; }
.leaflet-control-zoom a { background: transparent !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.leaflet-control-zoom a.leaflet-control-zoom-in { border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important; }
.leaflet-control-zoom a:hover { background: rgba(255, 255, 255, 0.06) !important; }

/* ---------- Settings fixes ---------- */
.settings-sheet .tabs { flex: none; }
.set-row .inline, .modal-card .set-row label.inline { flex-direction: row !important; align-items: center; gap: 8px; }
.set-row .inline input { width: 76px !important; text-align: center; }
/* (1.158.859) Weather station: its two fields side by side, one above the other on a phone. */
.wx-st-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.wx-st-fields .chg-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.wx-st-fields .chg-field > span { font-size: 0.85em; opacity: 0.75; }
.wx-st-fields input { width: 100%; box-sizing: border-box; }
#wx-st-card .set-row { flex-wrap: nowrap; }
#wx-st-card .set-row > .btn { flex: 1 1 0; width: auto; min-width: 0; margin: 0; }
/* (1.158.858) A time or date needs more room than a number, or its minutes and AM/PM are cut off. */
.set-row .inline input[type="time"] { width: auto !important; min-width: 124px; }
.set-row .inline input[type="date"] { width: auto !important; min-width: 150px; }
.set-row > .btn, .set-row > a.btn { flex: 0 0 auto; }
.set-toggle, .set-checks label { flex-direction: row !important; }
/* The tab bar scrolls: fade the edge so it's clear there's more. */
.settings-sheet .tabs { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); scroll-padding: 0 30px; }
/* Backups: date and size, a Download button. */
.bk-item { align-items: center; }
.bk-item b { display: block; color: var(--p-text); font-weight: 600; }
.bk-item .when { font-size: 12px; }
.bk-dl { padding: 7px 12px !important; font-size: 12.5px !important; text-decoration: none; flex: none; }
/* Tab bars inside any window keep their height (the list below scrolls). */
.modal-card > .tabs, .modal-card > .sheet-head, .modal-card > h2, .modal-card > .win-title { flex: none; }
#wx-now { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }

/* Coloured action buttons (AI Training labels etc.) keep their colour, with depth. */
.dock-btn { background: linear-gradient(180deg, #22a05a, #15803d) !important; border: 1px solid rgba(134, 239, 172, 0.4) !important; color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px rgba(21, 128, 61, 0.35); }
.nogo-btn { background: linear-gradient(180deg, #f08a2c, #c2570c) !important; border: 1px solid rgba(253, 186, 116, 0.45) !important; color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px rgba(194, 87, 12, 0.35); }
.live-btn { background: linear-gradient(180deg, #4a8df8, #2563eb) !important; border: 1px solid rgba(147, 197, 253, 0.4) !important; color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px rgba(37, 99, 235, 0.35); }
.danger-btn, .btn-danger { background: linear-gradient(180deg, #e04848, #b91c1c) !important; border: 1px solid rgba(252, 165, 165, 0.45) !important; color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 16px rgba(185, 28, 28, 0.3); }
.learn-chips button.on { box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.5), 0 4px 12px rgba(245, 158, 11, 0.35); }
.learn-tabs button.on { background: linear-gradient(180deg, #2f5ad8, #1e3a8a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(30, 58, 138, 0.4); }

.theme-seg { grid-template-columns: repeat(4, 1fr); }
.style-seg { grid-template-columns: 1fr 1fr; }
.style-seg button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 9px 10px; }
.style-seg .sw { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.45); }
#darkStyleSeg, #lightStyleSeg { margin-bottom: 4px; }
.set-card h3 + .style-seg { margin-top: 8px; }
.set-card .hint + h3 { margin-top: 16px; }
/* Spot schedules: its own section under the saved spots, header button right. */
.sq-sched { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--p-line); }
.sq-head { justify-content: space-between; min-height: 34px; }
.sq-head button { flex: none; }
#spotSchedNew .ic { margin-right: 3px; }
/* Map backups: a list of backups, then one backup's areas to tick. */
.spot-backupview { display: flex; flex-direction: column; gap: 8px; }
.spot-backupview[hidden] { display: none; }
#bkNow .ic, #spotBackupsOpen .ic { margin-right: 3px; }
.bk-list, .bk-areas { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.bk-list[hidden], .bk-detail[hidden] { display: none; }
.bk-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-surface-2);
  color: var(--p-text); cursor: pointer; }
.bk-item:hover:not(:disabled) { background: var(--p-surface-3); border-color: var(--p-line-strong); }
.bk-item:disabled { opacity: 0.55; cursor: default; }
.bk-item .bk-kind { font-size: 12px; color: var(--p-text-2); }
.bk-item .sub, .bk-area .sub { display: block; font-size: 12px; color: var(--p-text-3); }
.bk-area { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: var(--p-surface-2); border: 1px solid var(--p-line); cursor: pointer; }
.bk-area input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: #f59e0b; }
.bk-area:has(input:checked) { border-color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.bk-detail { display: flex; flex-direction: column; gap: 8px; }
/* Movable windows (camera, AI Training, Spot Mow): one look and feel.
   Grip line on top, grab cursor on the title bar, "grabbing" while moving. */
.movable::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px; background: var(--muted); opacity: 0.5; z-index: 6; pointer-events: none; }
.drag-handle { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag-handle button, .drag-handle select, .drag-handle input, .drag-handle a { cursor: pointer; }
.movable.dragging, .movable.dragging .drag-handle, .movable.dragging .drag-handle * { cursor: grabbing; user-select: none; }
.spot-panel.placed, .learn-panel.placed { transform: none; bottom: auto; right: auto; }
.learn-panel.maximized { z-index: 1460; }
.camera-panel .camera-head { padding-top: 10px; }
/* The AI Training resize corner looks like the camera's. */
.learn-resize { right: 0; bottom: 0; width: 18px; height: 18px; background: none; z-index: 5; }
.learn-resize::before { content: ""; position: absolute; right: 3px; bottom: 3px; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); border-radius: 0 0 2px 0; opacity: 0.7; }
/* Full-screen camera on a phone can't be moved: no grip there. */
@media (orientation: landscape) and (pointer: coarse) { .camera-panel:not(.hidden)::before { display: none; } }
/* Camera window buttons: one hover for all of them — including the ones that
   are switched on (headlamp, overlays, mini map), whose colour rules would
   otherwise hide the hover. Brighter in the dark looks, a touch darker in light. */
.camera-icon-btn { transition: background var(--p-fast), filter var(--p-fast), opacity var(--p-fast), box-shadow var(--p-fast), transform 0.1s; }
.camera-icon-btn:hover:not(:disabled) { filter: brightness(1.18); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.3); }
.camera-icon-btn:active:not(:disabled) { transform: scale(0.94); }
.overlay-toggle:hover { opacity: 0.9; }
.overlay-toggle.active:hover { opacity: 1; }
html.theme-light .camera-icon-btn:hover:not(:disabled) { filter: brightness(0.94); box-shadow: 0 0 0 1px var(--lt-line-strong), 0 2px 6px rgba(0, 0, 0, 0.1); }
/* The mower's camera puts a short black dash on the top pixel row of every
   frame (x 285–359 of 640). Zoom the camera window's picture ~1% from its
   bottom edge so that row sits just outside the window. (Not the AI Training
   picture: taps there map to exact pixels.) */
.camera-stage { overflow: hidden; }
#cameraVideo, #cameraCanvas, #cameraMjpeg { transform: scale(1.012); transform-origin: 50% 100%; }
/* The vector street map (pale "positron") turned dark for the Navy look;
   the charcoal/graphite/black styles set their own in static/themes/. */
.leaflet-gl-layer.tiles-dark { filter: invert(1) grayscale(1) brightness(1.6) contrast(0.8) sepia(0.4) hue-rotate(180deg) saturate(1.8); }
html.theme-light .leaflet-gl-layer.tiles-dark { filter: none; }
/* The state pill has the same outline as the other header boxes; the state
   shows in its text and icon colour. */
#stateBtn.state-mowing, #stateBtn.state-charging, #stateBtn.state-error, #stateBtn.state-paused {
  border-color: var(--p-line-strong); box-shadow: var(--p-hi), var(--p-shadow-1); }
.map-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.map-row input { flex: 1 1 180px; min-width: 0; }
.map-sub { margin-top: 18px !important; }
/* A button with an icon always has a gap between icon and label. */
.btn:has(> svg.ic) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
/* Resize grips (camera, AI Training): two short diagonal lines tucked inside
   the rounded corner — faint until the window is hovered, stronger on the grip.
   Over the camera picture they are white with a soft shadow. */
.camera-resize, .learn-resize { width: 22px; height: 22px; background: none !important; }
.camera-resize::before, .learn-resize::before {
  content: ""; position: absolute; right: 6px; bottom: 6px; left: auto; width: 11px; height: 11px;
  border: 0 !important; border-radius: 0; opacity: 0.35; transition: opacity var(--p-fast);
  background: linear-gradient(135deg, transparent 0 46%, var(--grip) 46% 56%, transparent 56% 72%, var(--grip) 72% 82%, transparent 82%);
}
.learn-resize { --grip: var(--p-text-3, #888); }
.camera-resize { --grip: #fff; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.7)); }
.learn-resize.left { right: auto; left: 0; cursor: nesw-resize; }
.camera-resize.left::before, .learn-resize.left::before { right: auto; left: 6px;
  background: linear-gradient(225deg, transparent 0 46%, var(--grip) 46% 56%, transparent 56% 72%, var(--grip) 72% 82%, transparent 82%); }
@media (hover: hover) {
  .camera-resize::before, .learn-resize::before { opacity: 0; }
  .camera-panel:hover .camera-resize::before, .learn-panel:hover .learn-resize::before { opacity: 0.45; }
  .camera-resize:hover::before, .learn-resize:hover::before { opacity: 0.95; }
}
/* Charging: the state icon is a bolt that gently pulses (green glow). */
@keyframes p-charge { 0%, 100% { opacity: 0.55; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.08); } }
#stateBtn.state-charging .ic { color: #22c55e; animation: p-charge 1.8s steps(4) infinite !important;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.55)); transform-origin: 50% 50%; }
html.theme-light #stateBtn.state-charging .ic { color: #16a34a !important; }
@media (prefers-reduced-motion: reduce) { #stateBtn.state-charging .ic { animation: none !important; } }
/* The "new problems in the Log" dot: a ring in the bar's own colour. */
html.theme-light .activity-dot { box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(239, 68, 68, 0.5); }
/* Battery: always upright (terminal on top), including while charging; the
   bolt is turned back upright inside it. The fill drains/fills smoothly. */
#batteryBtn .ic, #batteryBtn.charging .ic { transform: rotate(-90deg) !important; }
#batteryBtn .ic .bat-fill { transform-box: fill-box; transform-origin: 0 50%; transition: transform 2.5s ease-in-out; }
#batteryBtn .ic .bat-bolt { transform-box: fill-box; transform-origin: 50% 50%; transform: rotate(90deg); }
/* ---- Header alerts (desktop): cards like the "Applied"/"Saved" pills ---- */
.hud-alerts { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden;
  padding: 2px 4px; }
.hud-alerts:empty { visibility: hidden; }
.hud-alert { flex: none; max-width: 340px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--p-surface-2, #131d33); border: 1px solid var(--p-line-strong); color: var(--p-text);
  font: 600 12.5px/1.3 inherit; box-shadow: var(--p-shadow-1); animation: hud-alert-in .22s var(--p-ease, ease-out); }
.hud-alert[hidden] { display: none; }
.hud-alert .hud-alert-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal; overflow-wrap: anywhere; }
.hud-alert .lvl { flex: none; width: 8px; height: 8px; border-radius: 50%; margin: 0; box-shadow: none; }
.hud-alert.ok { border-color: rgba(34, 197, 94, 0.45); }
.hud-alert.ok .hud-alert-text { color: #4ade80; }
.hud-alert.warn { border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.1); }
.hud-alert.error { border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.12); }
.hud-alert:hover { filter: brightness(1.12); }
.hud-alert.out { opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
@keyframes hud-alert-in { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }
html.theme-light .hud-alert { background: #fff; color: var(--lt-text); border-color: var(--lt-line-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
html.theme-light .hud-alert.ok .hud-alert-text { color: #15803d; }
html.theme-light .hud-alert.warn { background: #fff7e6; border-color: #f5b041; color: #7a4b00; }
html.theme-light .hud-alert.error { background: #fdecec; border-color: #ef8a8a; color: #8f1d1d; }
html.theme-light .hud-alert:hover { filter: brightness(0.97); }
/* Desktop: the old single alert chip is replaced by the cards. */
@media (min-width: 701px) { #hudMsg { display: none !important; } }
/* Phone: every alert in one stack at the bottom, newest nearest the thumb. */
.hud-alerts.phone { position: fixed; left: 12px; right: 12px; z-index: 1520; flex-direction: column-reverse;
  align-items: stretch; gap: 6px; overflow: visible; padding: 0; pointer-events: none; }
.hud-alerts.phone .hud-alert { pointer-events: auto; max-width: none; width: 100%; padding: 10px 14px; font-size: 14px;
  border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
#hudMsg { display: none !important; }
/* Alert card colours beat the themes' generic header-button rule. */
#hud .hud-alert { background: var(--dk-card, var(--p-surface-2, #131d33)) !important; border: 1px solid var(--dk-line-strong, var(--p-line-strong)) !important; }
#hud .hud-alert.ok { border-color: rgba(34, 197, 94, 0.5) !important; }
#hud .hud-alert.warn { background: rgba(245, 158, 11, 0.14) !important; border-color: rgba(245, 158, 11, 0.6) !important; color: #fcd34d !important; }
#hud .hud-alert.error { background: rgba(239, 68, 68, 0.16) !important; border-color: rgba(239, 68, 68, 0.65) !important; color: #fca5a5 !important; }
html.theme-light #hud .hud-alert { background: #fff !important; border-color: var(--lt-line-strong) !important; }
html.theme-light #hud .hud-alert.ok { border-color: #86d5a3 !important; }
html.theme-light #hud .hud-alert.warn { background: #fff7e6 !important; border-color: #f5b041 !important; color: #7a4b00 !important; }
html.theme-light #hud .hud-alert.error { background: #fdecec !important; border-color: #ef8a8a !important; color: #8f1d1d !important; }
/* Phone alert: the same card look as the desktop header alerts. */
#hudMsg { text-align: left; justify-content: flex-start; font-weight: 600; border-radius: 14px; }
#hudMsg .lvl.ok { background: #22c55e; } #hudMsg .lvl.info { background: #3b82f6; }
#hudMsg .lvl.warn { background: #f59e0b; } #hudMsg .lvl.error { background: #ef4444; }
#hudMsg.warn { background: #3a2a0c !important; border-color: rgba(245, 158, 11, 0.6) !important; color: #fcd34d !important; }
#hudMsg.error { background: #3a1416 !important; border-color: rgba(239, 68, 68, 0.65) !important; color: #fca5a5 !important; }
#hudMsg.ok { border-color: rgba(34, 197, 94, 0.5) !important; }
html.theme-light #hudMsg { background: #fff !important; color: var(--lt-text) !important; border-color: var(--lt-line-strong) !important; }
html.theme-light #hudMsg.warn { background: #fff7e6 !important; border-color: #f5b041 !important; color: #7a4b00 !important; }
html.theme-light #hudMsg.error { background: #fdecec !important; border-color: #ef8a8a !important; color: #8f1d1d !important; }
/* Alerts are one line; a long one scrolls slowly back and forth
   (pauses at each end, and while you hover it). */
.hud-alert .hud-alert-text, #hudMsg .hud-msg-text { display: block !important; -webkit-line-clamp: unset !important;
  white-space: nowrap !important; overflow: hidden; min-width: 0; text-overflow: clip !important; }
.hud-alert .hud-alert-text > span, #hudMsg .hud-msg-text > span { display: inline-block; white-space: nowrap; }
.hud-alert.long .hud-alert-text > span, #hudMsg.long .hud-msg-text > span {
  animation: alert-scroll 8s ease-in-out infinite alternate; }
.hud-alert.long:hover .hud-alert-text > span { animation-play-state: paused; }
.hud-alert.long .hud-alert-text, #hudMsg.long .hud-msg-text {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent); }
@keyframes alert-scroll { 0%, 18% { transform: translateX(0); } 82%, 100% { transform: translateX(var(--d, 0)); } }
@media (prefers-reduced-motion: reduce) { .hud-alert.long .hud-alert-text > span, #hudMsg.long .hud-msg-text > span { animation: none; } }
.hud-alert { max-width: 380px; }
#hudMsg { min-height: 40px; }
/* Desktop: the position warning is shown as a header card instead. */
#posBadge.on-header { display: none !important; }
#notice.on-header { display: none !important; }
/* ---- Buttons that are switched on: the style's main colour (headlamp: yellow). ---- */
html:not(.theme-light) #mapControls button.active, html:not(.theme-light) .camera-icon-btn.active,
html:not(.theme-light) #controls button.active, html:not(.theme-light) #hud button.active {
  background: var(--dk-primary, #3f7fe0) !important; color: var(--dk-on-accent, #fff) !important;
  border-color: transparent !important; opacity: 1; box-shadow: 0 2px 10px rgba(var(--dk-accent-rgb, 63, 127, 224), 0.35) !important; }
html.theme-light #mapControls button.active, html.theme-light .camera-icon-btn.active,
html.theme-light #controls button.active, html.theme-light #hud button.active {
  background: var(--lt-primary, #16a34a) !important; color: #fff !important; border-color: transparent !important; opacity: 1;
  box-shadow: 0 2px 8px rgba(var(--lt-accent-rgb, 22, 163, 74), 0.3) !important; }
html #lightBtn.active, html .camera-actions #lightBtn.active {
  background: #fbbf24 !important; color: #1a1300 !important; border-color: #f59e0b !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45) !important; }
/* Unread problems: a small red count badge (not a bare dot). */
#stateBtn .activity-dot { width: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  font: 700 11px/1 inherit; color: #fff; background: #ef4444; animation: none; box-shadow: none; }
#stateBtn .activity-dot[hidden] { display: none; }
/* Hovering a switched-on button keeps its colour (just a little brighter). */
html:not(.theme-light) #mapControls button.active:hover, html:not(.theme-light) .camera-icon-btn.active:hover,
html:not(.theme-light) #controls button.active:hover:not(:disabled), html:not(.theme-light) #hud button.active:hover {
  background: var(--dk-primary, #3f7fe0) !important; color: var(--dk-on-accent, #fff) !important; filter: brightness(1.15) !important; }
html.theme-light #mapControls button.active:hover, html.theme-light .camera-icon-btn.active:hover,
html.theme-light #controls button.active:hover:not(:disabled), html.theme-light #hud button.active:hover {
  background: var(--lt-primary, #16a34a) !important; color: #fff !important; filter: brightness(1.1) !important; }
html #lightBtn.active:hover, html .camera-actions #lightBtn.active:hover {
  background: #fbbf24 !important; color: #1a1300 !important; filter: brightness(1.08) !important; }
/* Map-side buttons: "on" (camera open, map locked, a window open, a mode
   running) uses the same style colour as every other switched-on button. */
html:not(.theme-light) #mapControls button.on,
html:not(.theme-light) #mapControls button.on:hover:hover {
  background: var(--dk-primary, #3f7fe0) !important; color: var(--dk-on-accent, #fff) !important; border-color: transparent !important;
  box-shadow: 0 2px 10px rgba(var(--dk-accent-rgb, 63, 127, 224), 0.35) !important; }
html.theme-light #mapControls button.on,
html.theme-light #mapControls button.on:hover:hover {
  background: var(--lt-primary, #16a34a) !important; color: #fff !important; border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(var(--lt-accent-rgb, 22, 163, 74), 0.3) !important; }
#mapControls button.on:hover { filter: brightness(1.12) !important; }
#mapControls button.active .ic, #mapControls button.on .ic, #mapControls #lockMapBtn.locked .ic { color: inherit !important; }
/* The alignment lock is locked normally: a plain button (no amber). */
#mapControls #lockMapBtn.locked:not(.on) { color: inherit; border-color: inherit; box-shadow: inherit; }
html:not(.theme-light) #mapControls #lockMapBtn.locked:not(.on) { color: var(--dk-text) !important; border-color: var(--dk-line-strong) !important; }
html.theme-light #mapControls #lockMapBtn.locked:not(.on) { color: var(--lt-text) !important; border-color: var(--lt-line-strong) !important; }
/* Spot schedule form: day pills, a full-width time box, the Dock switch. */
.sq-form { gap: 12px !important; padding: 12px !important; }
.sq-days { display: grid !important; grid-template-columns: repeat(7, 1fr); gap: 5px !important; }
.sq-days label { min-width: 0; text-align: center; padding: 7px 0 !important; border-radius: 9px !important;
  font-weight: 600; font-size: 13px !important; user-select: none; transition: background .15s, color .15s, border-color .15s; }
html:not(.theme-light) .sq-days label { background: var(--dk-raised); border: 1px solid var(--dk-line-strong) !important; color: var(--dk-text-2); }
html:not(.theme-light) .sq-days label:has(input:checked) { background: var(--dk-primary) !important; border-color: transparent !important; color: var(--dk-on-accent, #fff) !important; }
html.theme-light .sq-days label { background: var(--lt-raised); border: 1px solid var(--lt-line-strong) !important; color: var(--lt-text-2); }
html.theme-light .sq-days label:has(input:checked) { background: var(--lt-primary) !important; border-color: transparent !important; color: #fff !important; }
.sq-when { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sq-time { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-size: 13.5px; white-space: nowrap; }
.sq-time input[type=time] { width: 124px !important; min-width: 124px; padding: 8px 10px !important; font-size: 15px !important;
  font-variant-numeric: tabular-nums; }
/* "Dock after": the same tick box as the spot list above (.set-checks). */
.sq-form label.sq-dock { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; margin: 0;
  font-size: 13.5px; cursor: pointer; }
.sq-form label.sq-dock input { width: 18px; height: 18px; margin: 0; flex: none; }
/* Switches that are on: the style's colour (the themes' knob colour was
   hiding the "on" state in the light look). */
html:not(.theme-light) .spot-switch input:checked + .knob { background: var(--dk-primary) !important; border-color: transparent !important; }
html.theme-light .spot-switch input:checked + .knob { background: var(--lt-primary) !important; border-color: transparent !important; }
/* Ticked boxes: the style's colour. */
html:not(.theme-light) input[type=checkbox]:checked:not([role=switch]) { accent-color: var(--dk-primary);
  background: var(--dk-primary) !important; border-color: transparent !important; }
html.theme-light input[type=checkbox]:checked:not([role=switch]) { accent-color: var(--lt-primary);
  background: var(--lt-primary) !important; border-color: transparent !important; }
/* Phone: the cards sit over the map, so they're solid. */
html:not(.theme-light) #hud .hud-alert, html:not(.theme-light) .hud-alerts.phone .hud-alert { background: var(--dk-card, #1f2937) !important; }
html:not(.theme-light) .hud-alerts.phone .hud-alert.warn { background: #3a2c10 !important; }
html:not(.theme-light) .hud-alerts.phone .hud-alert.error { background: #3d1719 !important; }
html:not(.theme-light) .hud-alerts.phone .hud-alert.warn, html:not(.theme-light) .hud-alerts.phone .hud-alert.error { color: #fde2e2 !important; }
html:not(.theme-light) .hud-alerts.phone .hud-alert.warn { color: #fde68a !important; }
html:not(.theme-light) .hud-alerts.phone .hud-alert.warn { border-color: rgba(245, 158, 11, 0.7) !important; }
html:not(.theme-light) .hud-alerts.phone .hud-alert.error { border-color: rgba(239, 68, 68, 0.75) !important; }
.hud-alerts.phone .hud-alert { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* Phone: the header's (desktop) alert slot takes no room, so the status
   button stays on the left. */
@media (max-width: 700px) { #hud .hud-alerts { display: none !important; } }
/* Phone: the joystick sits above the alert stack (which is right above the buttons). */
@media (max-width: 700px) { #joystick { translate: 0 calc(-1 * var(--alerts-h, 0px)); transition: translate .25s ease; } }
/* Ai Training progress card: the style's colours in every look. */
html:not(.theme-light) .learn-train { background: var(--dk-card) !important; border: 1px solid rgba(var(--dk-accent-rgb), 0.55) !important; }
html:not(.theme-light) .learn-train .lt-top, html:not(.theme-light) .learn-train .lt-top b { color: var(--dk-text) !important; }
html:not(.theme-light) .learn-train .lt-sub { color: var(--dk-text-2) !important; }
html:not(.theme-light) .learn-train .lt-bar { background: var(--dk-well) !important; }
html:not(.theme-light) .learn-train .lt-bar i { background-color: var(--dk-accent) !important; }
html:not(.theme-light) .learn-train .lt-spin { border-color: rgba(var(--dk-accent-rgb), 0.3) !important; border-top-color: var(--dk-accent) !important; }
html.theme-light .learn-train { background: var(--lt-accent-soft) !important; border: 1px solid rgba(var(--lt-accent-rgb), 0.45) !important; box-shadow: none !important; }
html.theme-light .learn-train .lt-top, html.theme-light .learn-train .lt-top b { color: var(--lt-text) !important; }
html.theme-light .learn-train .lt-sub { color: var(--lt-text-2) !important; }
html.theme-light .learn-train .lt-bar { background: var(--lt-well) !important; }
html.theme-light .learn-train .lt-bar i { background-color: var(--lt-accent) !important; }
html.theme-light .learn-train .lt-spin { border-color: rgba(var(--lt-accent-rgb), 0.3) !important; border-top-color: var(--lt-accent) !important; }
/* Finished: green in every look. */
html .learn-train.done { border-color: #22c55e !important; }
html:not(.theme-light) .learn-train.done { background: #0f2a1a !important; }
html.theme-light .learn-train.done { background: #e8f7ee !important; }
html .learn-train.done .lt-bar i { background: #22c55e !important; }
html:not(.theme-light) .learn-train .lt-bar i { background: repeating-linear-gradient(45deg, var(--dk-accent) 0 10px, rgba(var(--dk-accent-rgb), 0.6) 10px 20px) !important; background-size: 28px 28px !important; }
html.theme-light .learn-train .lt-bar i { background: repeating-linear-gradient(45deg, var(--lt-accent) 0 10px, rgba(var(--lt-accent-rgb), 0.6) 10px 20px) !important; background-size: 28px 28px !important; }
html .learn-train.done .lt-bar i { background: #22c55e !important; }
/* Ai Training: the lines above the buttons never change height, so a press
   right after typing can't be lost to the buttons moving. (1.158.922) Room for two lines, and a longer message
   shows in full rather than cut short ("Saved — Ai Recover follows these first whenever the mower is at a view like this"). */
.learn-note-state { min-height: 32px; line-height: 16px; margin: -4px 0 0; overflow-wrap: anywhere; }
.learn-panel.busy .modal-actions, .learn-panel.busy .learn-fix-actions { cursor: progress; }
/* A button that's working: a spinner in place of its icon; it stays in its
   colour (not greyed like the other, locked buttons). */
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn.is-busy, .btn.is-busy:disabled { opacity: 1 !important; filter: none !important; cursor: progress !important; }
.btn.is-busy > svg.ic { display: none; }
/* (the bottom bar's Mow and the Mow window's Mow while a mow starts: "Starting…" with a spinner, still green) */
#controls button.is-busy, #controls button.is-busy:disabled, .go-btn.is-busy, .go-btn.is-busy:disabled {
  opacity: 1 !important; filter: none !important; cursor: progress !important; }
#controls button.is-busy > svg.ic, .go-btn.is-busy > svg.ic { display: none; }
html #controls button[data-cmd="main"].is-busy, html #controls button[data-cmd="main"].is-busy:disabled {
  background: linear-gradient(180deg, #2fbf64, #16a34a) !important; border-color: rgba(134, 239, 172, 0.45) !important;
  color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(22, 163, 74, 0.35) !important; }
.btn-spinner { display: inline-block; flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: btn-spin .7s linear infinite; }
/* Ai Training → Drive (teach by driving). */
.learn-panel.drive-tab #learnSave, .learn-panel.drive-tab #learnAsk { display: none; }
.drive-live { position: relative; aspect-ratio: 4 / 3; max-height: 34vh; border-radius: 12px; overflow: hidden; background: #000; }
.drive-live img { width: 100%; height: 100%; object-fit: contain; display: block; }
.drive-rec { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(220, 38, 38, 0.9);
  color: #fff; font: 700 12px/1.2 inherit; animation: p-breathe 1.4s ease-in-out infinite; }
.drive-status { font-size: 13px; color: var(--p-text-2); margin: 8px 0; }
.drive-actions { display: flex; gap: 8px; }
.drive-actions .btn { flex: 1; }
.drive-h { margin: 14px 0 6px; font-size: 14px; }
.drive-list { display: flex; flex-direction: column; gap: 6px; }
.drive-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; border: 1px solid var(--p-line); }
.drive-row img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.drive-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.drive-info .sub { font-size: 12px; color: var(--p-text-3); }
.drive-badge { align-self: flex-start; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(128,128,128,.18); }
.drive-badge.ok { background: rgba(34, 197, 94, 0.18); color: #16a34a; }
.drive-badge.warn { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.drive-badge.bad { background: rgba(239, 68, 68, 0.18); color: #dc2626; }
.drive-del { flex: none; }
.learn-panel .drive-live { flex: none; height: 30vh; min-height: 150px; max-height: 300px; aspect-ratio: auto; }
.learn-panel.placed .drive-live { height: 40%; max-height: none; }
/* Settings → Mower network card. */
.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; margin-top: 10px; }
.kv-grid span { color: var(--p-text-3); }
.kv-grid b { font-weight: 600; overflow-wrap: anywhere; }
#spotModes { grid-template-columns: repeat(4, 1fr); }
/* Map layers window. */
.layers-card { width: min(440px, 94vw); gap: 12px; }
.layers-card .set-card { display: flex; flex-direction: column; gap: 10px; }
.layers-card label.ly-row { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; }
.layers-card .ly-text { display: flex; flex-direction: column; gap: 2px; }
.layers-card .ly-text .sub { font-size: 12.5px; color: var(--p-text-3); font-weight: 400; }
.layers-card .ly-days { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.layers-card .legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: var(--p-text-2); }
.layers-card .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.layers-card #ly-add-pin { align-self: flex-start; }
.layers-card label.ly-days { flex-direction: row !important; align-items: center !important; justify-content: space-between !important; text-align: left; }
.layers-card label.ly-days select { width: auto !important; min-width: 120px; }
.layers-card .ly-text b { color: var(--p-text); }
/* Map layers cards: switch on the left, everything else in one column beside it. */
.layers-card .ly-card { display: flex; flex-direction: column; gap: 12px; }
.layers-card label.spot-switch.ly-row { display: grid !important; grid-template-columns: 40px 1fr; column-gap: 14px;
  align-items: start !important; text-align: left !important; margin: 0; }
.layers-card .ly-row .knob { margin-top: 1px; }
.layers-card .ly-body { margin-left: 54px; display: flex; flex-direction: column; gap: 12px; }
.layers-card .ly-field { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; color: var(--p-text-2); }
.layers-card .ly-field select { width: auto !important; min-width: 124px; margin: 0; }
.layers-card .ly-field .btn { flex: none; }
.layers-card .legend { margin: 0; justify-content: flex-start; }
.layers-card .legend { gap: 6px 10px; font-size: 11.5px; flex-wrap: nowrap; white-space: nowrap; }
.layers-card .legend i { width: 9px; height: 9px; margin-right: 4px; }
.layers-card .ly-field select, .layers-card .ly-field .btn { width: 136px !important; min-width: 136px; height: 38px;
  box-sizing: border-box; justify-content: center; }
/* Never wider than the screen: the colour keys wrap (each key stays whole), the
   label beside a button takes what's left, and the Close bar stays in view at
   the bottom while the cards scroll. Phones: the controls use the full width
   under the switch. */
.layers-card { overflow-x: hidden; }
.layers-card .legend { flex-wrap: wrap; white-space: normal; }
.layers-card .legend > span { white-space: nowrap; }
.layers-card .ly-field > span { flex: 1 1 auto; min-width: 0; }
.layers-card .modal-actions { position: sticky; bottom: -20px; margin: 0 -24px -20px; padding: 12px 24px 20px;
  background: inherit; border-top: 1px solid var(--p-line); z-index: 1; }
@media (max-width: 520px) {
  .layers-card .ly-body { margin-left: 0; }
}
/* Coloured buttons keep their colour on hover in every look — only a little
   brighter (the generic hover background used to replace it). */
html #controls button[data-cmd="main"]:not(:disabled):hover { background: linear-gradient(180deg, #2fbf64, #16a34a) !important; color: #fff !important; filter: brightness(1.08) !important; }
html #controls button[data-cmd="stop"]:not(:disabled):hover, html #controls button.stop-btn:not(:disabled):hover {
  background: linear-gradient(180deg, #f05252, #d62f2f) !important; color: #fff !important; filter: brightness(1.08) !important; }
html .dock-btn:not(:disabled):hover { background: #1f9d55 !important; color: #fff !important; filter: brightness(1.08) !important; }
html .nogo-btn:not(:disabled):hover { background: #d9690f !important; color: #fff !important; filter: brightness(1.08) !important; }
html .danger-btn:not(:disabled):hover, html .btn-danger:not(:disabled):hover, html .btn.danger:not(:disabled):hover,
html .modal-actions button.danger:not(:disabled):hover { background: #d13434 !important; color: #fff !important; filter: brightness(1.08) !important; }
html:not(.theme-light) .btn-primary:not(:disabled):hover, html:not(.theme-light) .live-btn:not(:disabled):hover,
html:not(.theme-light) .modal-actions button:not(.secondary):not(.danger):not(:disabled):hover {
  background: var(--dk-primary, #3f7fe0) !important; color: var(--dk-on-accent, #fff) !important; filter: brightness(1.1) !important; }
html.theme-light .btn-primary:not(:disabled):hover, html.theme-light .live-btn:not(:disabled):hover,
html.theme-light .modal-actions button:not(.secondary):not(.danger):not(:disabled):hover {
  background: var(--lt-primary, #16a34a) !important; color: #fff !important; filter: brightness(1.08) !important; }
/* Spot Mow rolls up while it mows: title, stats, progress and Stop only.
   Each group of the other parts slides by its real height (grid rows 1fr → 0fr). */
.spot-more { display: grid; grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows .7s cubic-bezier(.4, 0, .2, 1), opacity .55s ease .1s, margin .7s cubic-bezier(.4, 0, .2, 1); }
.spot-more-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  /* room either side so nothing at the edges (slider knobs, focus rings, shadows)
     is clipped by the roll-up — the content itself doesn't move */
  padding: 0 12px; margin: 0 -12px; }
.spot-panel.rolled .spot-more { grid-template-rows: 0fr; opacity: 0; margin-top: -10px; pointer-events: none;
  transition: grid-template-rows .7s cubic-bezier(.4, 0, .2, 1), opacity .35s ease, margin .7s cubic-bezier(.4, 0, .2, 1); }
.spot-roll { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: -2px 0 -4px;
  padding: 4px 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--p-text-3); font: 600 12.5px/1.2 inherit; }
.spot-roll:hover { color: var(--p-text); background: rgba(128, 128, 128, 0.12); }
.spot-roll .ic { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
.spot-panel.rolled .spot-roll .ic { transform: rotate(-90deg); }
/* (1.158.536, owner: "can you animate that arrow") a small double nudge the way it points - up while the settings
   show, down once folded - every few seconds; on `translate`, so the turn on a tap (transform) runs as before. */
.spot-roll .ic { --roll-dir: -1; animation: spot-roll-nudge 3.2s ease-in-out infinite; }
.spot-panel.rolled .spot-roll .ic { --roll-dir: 1; }
.spot-roll:hover .ic, .spot-roll:focus-visible .ic { animation-duration: 1.4s; }
@keyframes spot-roll-nudge {
  0%, 62%, 100% { translate: 0 0; }
  70%, 86% { translate: 0 calc(var(--roll-dir) * 3px); }
  78% { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) { .spot-roll .ic { animation: none; } }
.spot-head .modal-msg:empty { display: none; }
/* Settings → About & Help */
.ab-news { max-height: 320px; overflow: auto; font-size: 13.5px; }
.ab-news ul { margin: 4px 0 10px; padding-left: 20px; }
.ab-news li { margin: 3px 0; color: var(--p-text-2); }
.ab-news .ab-sec { display: block; margin-top: 8px; }
[data-panel="about"] a.btn { align-self: flex-start; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Icons on every button (app.js giveIcon) ---------- */
:where(button, a.btn):has(> svg.auto-ic) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
svg.ic.auto-ic { width: 16px; height: 16px; flex: none; }
.tab > svg.auto-ic, .spot-modes > button > svg.auto-ic, .learn-tabs svg.auto-ic { width: 15px; height: 15px; }
.tab:has(> svg.auto-ic) { gap: 6px; }
.spot-modes > button:has(> svg.auto-ic) { white-space: nowrap; gap: 5px; padding-left: 6px; padding-right: 6px; }
.spot-modes > button > svg.auto-ic { width: 14px; height: 14px; }

/* ---------- Icon + label buttons: one even gap everywhere ----------
   Whether the icon was written into the page or added by giveIcon (app.js):
   the same 7 px between icon and words, and no stray icon margins.
   (Not the header's status chips, which are readouts, not labels.) */
:is(button, a.btn):has(> svg.ic):not(.hud-stat):not(.hud-alert):not(.hud-msg) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px !important;
}
:is(button, a.btn):has(> svg.ic):not(.hud-stat):not(.hud-alert):not(.hud-msg) > svg.ic {
  margin-left: 0 !important; margin-right: 0 !important; flex: none;
}

/* ---------- Schedule editor: the theme's accent, not the old fixed blue ---------- */
:root { --acc: var(--p-accent); }
html:not(.theme-light) { --acc: var(--dk-accent, var(--p-accent)); }
html.theme-light { --acc: var(--lt-accent, var(--p-accent)); }
.plans-form .form-section { color: var(--acc) !important; }
.chip-row label:has(input:checked) { background: var(--acc) !important; border-color: var(--acc) !important; color: #fff !important; }
.chip-row input { accent-color: var(--acc); }
.chip-row label:has(input:focus-visible) { outline-color: var(--acc); }
.day-pill:has(input:checked) { background: var(--acc) !important; border-color: var(--acc) !important; color: #fff !important; }
.plans-form input:focus, .plans-form select:focus { border-color: var(--acc) !important; }
.plan-actions .plan-edit:hover { background: var(--acc) !important; border-color: var(--acc) !important; color: #fff !important; }

/* ---------- Schedule editor in the Spot Mow panel's style ---------- */
.sched-form { display: flex; flex-direction: column; gap: 10px; }
.sched-form .form-section { margin: 10px 0 0; }
.sched-form .form-section:first-of-type { margin-top: 4px; }
.sched-form .sched-grid { grid-template-columns: 1fr 1fr; }
.sched-form .spot-slider i { font-style: normal; }
.sched-form input[type=range] { height: auto !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; accent-color: var(--acc); }
.sched-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--p-text-2, #94a3b8); min-width: 0; }
.sched-field input { width: 100%; }
.sched-field select { width: 100%; min-height: 40px; }   /* (1.158.716) Start, and its time from sunrise / sunset */
.sched-label { font-size: 12.5px; color: var(--p-text-2, #94a3b8); margin-bottom: -4px; }
.sched-seg { display: grid; }
/* (1.158.922) a choice too long for its button goes onto two lines - never cut short with "…" */
.sched-seg button { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.sched-seg > button:has(> svg.auto-ic) { white-space: normal; }   /* (its own rule: a browser without :has still gets the one above) */
.sched-tiles { grid-column: auto; }
.sched-tiles button span { font-size: 12px; text-align: center; line-height: 1.2; }
/* "More options": a full-width row that opens like the other sections. */
.sched-more { border-radius: 14px; overflow: hidden; margin-top: 6px; }
html:not(.theme-light) .sched-more { background: var(--dk-card, #2a2e35); border: 1px solid var(--dk-line, rgba(255,255,255,.07)); }
html.theme-light .sched-more { background: var(--lt-card, #f7f7f1); border: 1px solid var(--lt-line, rgba(0,0,0,.09)); }
.sched-more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; cursor: pointer; font-size: 14px; font-weight: 650; user-select: none; }
.sched-more > summary::-webkit-details-marker { display: none; }
.sched-more > summary::marker { content: ""; }
.sched-more > summary .sched-chev { width: 16px; height: 16px; opacity: .7; transition: transform .2s ease; }
.sched-more[open] > summary .sched-chev { transform: rotate(90deg); }
.sched-more-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 14px 14px; }
.sched-form .week-row { gap: 6px; }
.sched-form .week-row .day-pill { flex: 1 1 0; justify-content: center; min-width: 40px; }
/* The form scrolls; its parts never shrink to fit (that crushed More options). */
.sched-form > * { flex-shrink: 0; }

/* ---------- Theft protection ---------- */
.th-seg { grid-template-columns: repeat(3, 1fr) !important; margin: 4px 0 6px; }
/* In Settings its switches follow at the same distance as every other switch (the switch brings its own 8 px). */
#theftCard .th-seg { margin-bottom: 0; }
#th-sound { grid-template-columns: repeat(5, 1fr) !important; margin-top: 2px; }   /* (1.158.185) four siren sounds + Test */
/* (1.158.189) recording the off-code: the count as each press arrives */
.th-learn-panel { margin: 8px 0 4px; padding: 12px; border-radius: 12px; background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.35); }
.th-learn-count { font-size: 17px; font-weight: 650; margin: 0 0 4px; }
.th-learn-dots { font-size: 22px; letter-spacing: 6px; color: #16a34a; min-height: 28px; }
.th-learn-panel .set-row { margin-top: 12px; }   /* (the Cancel button clear of the note above it) */
.th-learn-panel .set-note { margin-bottom: 0; }
.thm-reason { font-size: 17px; font-weight: 650; margin: 0 0 6px; }
.thm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.thm-photos img { width: 100%; border-radius: 12px; display: block; }
#theftModal .modal-actions .danger { flex: 1; }

/* ---------- Home Assistant card ---------- */
.ha-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin: 6px 0; }
.ha-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.ha-grid input { width: 100%; }
@media (max-width: 520px) { .ha-grid { grid-template-columns: 1fr; } }

/* ---- First-run setup guide */
.su-sheet { display: flex; flex-direction: column; }
.su-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; }
.su-page { display: flex; flex-direction: column; gap: 12px; }
.su-page[hidden] { display: none; }
.su-page .set-card > * { flex-shrink: 0; }
.su-dots { display: flex; gap: 6px; margin: 2px 0 12px; }
.su-dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--p-line, #1e293b); transition: background var(--p-fast, .15s); }
.su-dots i.done { background: color-mix(in srgb, var(--acc) 55%, transparent); }
.su-dots i.on { background: var(--acc); }
/* Setup guide, Connecting: enable the mower here (owner, 2026-10-18: "very cramped up, can you open it up a bit") -
   set apart from the waiting line, big numbered steps, roomy download buttons. */
#su-install { margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--p-line); }
#su-install .su-in-lead { margin: 0 0 18px; font-size: 15px; }
.su-steps { list-style: none; counter-reset: su; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.su-steps > li { counter-increment: su; position: relative; padding-left: 44px; min-height: 30px; font-size: 15px; line-height: 1.55; }
.su-steps > li::before { content: counter(su); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, transparent); }
#su-install .su-dl { margin-top: 14px; gap: 12px; flex-wrap: wrap; }
#su-install .su-dl .btn { text-decoration: none; padding-left: 20px; padding-right: 20px; }
#su-install .su-dl-help { margin: 10px 0 0; }
#su-install .su-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
#su-install .su-in-done { margin: 22px 0 0; }
.su-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
.su-choices { display: flex; flex-direction: column; gap: 7px; }
.su-choices:empty { display: none; }
.su-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 12px; text-align: left;
  font-size: 15px; font-weight: 600; border: 1px solid var(--p-line, #1e293b); background: rgba(255, 255, 255, 0.03); color: inherit; }
.su-choice svg.ic { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.8; }
.su-choice.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 18%, transparent); }
.su-sheet .modal-actions { margin-top: 0; padding-top: 12px; }
.su-sheet select, .su-sheet input[type=text], .su-sheet input[type=email], .su-sheet input[type=password] { width: 100%; }

/* Users: the avatar and the Admin badge follow the style's accent (they were always blue). */
.avatar, .u-role.admin, .user-row .u-role.admin { background: var(--acc) !important; color: #fff !important; }

/* The whole-area mow's settings live in the Mow window (1.158.41): they take the list's place, and the
   stripe preview shows on the map beside it as each setting changes. */
.spot-listview.starting > :not(#mowStartView) { display: none !important; }
.mow-start { display: flex; flex-direction: column; gap: 12px; }
.mow-start[hidden] { display: none; }
.mow-start h3 { margin: 0; font-size: 16px; }
.mow-start .ask-text { margin: 0; }
/* Its Start Mowing and Back sit in the window's own button row; Back takes Close's place meanwhile. */
.spot-panel .ms-btn { display: none !important; }
.spot-panel.mow-starting .ms-btn { display: flex !important; align-items: center; justify-content: center; }
.spot-panel.mow-starting #spotClose { display: none !important; }

/* Licence activation: the code to confirm on the website. */
.lic-activate { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 6px 0 4px; }
.lic-activate[hidden] { display: none; }
.lic-code { font: 700 28px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em;
  padding: 10px 16px; border-radius: var(--p-r, 10px); border: 1px dashed var(--p-line, #cbd5e1); }
#licBanner.hidden { display: none; }

/* Limited mode (not activated): only what the Mammotion app does — no camera,
   driving by hand, spot mowing or Ai — and a lock screen once its minutes are up. */
body.lic-limited #joystick, body.lic-limited #spotBtn, body.lic-limited #mapCamBtn, body.lic-limited #learnBtn,
body.lic-limited #findDockBtn, body.lic-limited #cameraBtn, body.lic-limited #cameraPanel,
body.lic-limited #undockManual, body.lic-limited #bladeBtn { display: none !important; }
#licLock { z-index: 6000; }
#licLock .modal-card { max-width: 480px; }
#licLock .modal-actions { flex-wrap: wrap; }
#licLock .modal-actions > button { flex: 1 1 0; min-width: 0; }
#licLock .modal-actions > #licLockGo { flex: 1 1 100%; }

/* Object detection boxes on the camera (people, animals, vehicles, objects). */
.cam-objects { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.cam-obj { position: absolute; border: 2px solid var(--obj, #a855f7); border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); transition: left .15s linear, top .15s linear, width .15s linear, height .15s linear; }
.cam-obj[hidden] { display: none; }
.cam-obj.missed { opacity: 0.55; }      /* missed by the last look: a moment's grace, not a blink */
.cam-obj span { pointer-events: auto; cursor: pointer; }     /* tap a label: "Not a …?" → Wrong */
/* The ✕ says it can be tapped (owner: "i never did see the box … asking if it was wrong"). */
.cam-obj span::after { content: '✕'; margin-left: 6px; padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, 0.45); }
.cam-obj.ignored { opacity: 0.45; border-style: dashed; }
.cam-obj.stale { opacity: 0.55; transition: opacity 0.8s; }          /* not seen for a moment: lingering, fading */
/* "Seen by the Ai": the last things it saw, with their pictures and Wrong */
#camSeenBtn { position: relative; }
.cam-seen-n { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #ef4444; color: #fff; font: 700 10.5px/17px system-ui, sans-serif; text-align: center; box-sizing: border-box; }
.cam-seen-n[hidden] { display: none; }
.cam-seen { position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(320px, calc(100% - 16px)); z-index: 8;
  display: flex; flex-direction: column; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 18, 22, 0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #eef0f3;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); overflow: hidden; }
.cam-seen[hidden] { display: none; }
.cam-seen-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 14px; flex-wrap: wrap; }
.cam-seen-head b { font-size: 14.5px; }
.cam-seen-head .sub { flex: 1 1 100%; order: 3; font-size: 12px; color: #a9b0bb; margin-top: -4px; }
.cam-seen-head button { margin-left: auto; }
.cam-seen-list { flex: 1 1 auto; overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.cs-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.cs-row img { width: 92px; height: 62px; object-fit: cover; border-radius: 7px; flex: none; background: #000; cursor: zoom-in; }
/* the picture enlarged over the whole screen, centred (a click or a tap); a click on it closes it */
.cam-seen-zoom { position: fixed; z-index: 3000; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(480px, 92vw); height: auto; max-height: 80vh; object-fit: contain; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25); background: #000; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
  cursor: zoom-out; }
.cam-seen-zoom[hidden] { display: none; }

.cs-txt { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.3; }
.cs-txt b { overflow-wrap: anywhere; }
.cs-txt .sub { display: block; font-size: 11.5px; color: #a9b0bb; overflow-wrap: anywhere; }
.cs-wrong { flex: none; min-height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 650; }
.cs-done { display: block; font-size: 11.5px; color: #6fd497; font-weight: 650; white-space: nowrap; }
.cs-undo { flex: none; min-height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 650; }
/* Settings → Ai: the Wrong marks it remembers */
.ai-ignored { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.ai-ignored-list { display: flex; flex-direction: column; gap: 6px; }
.ai-ign-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; background: rgba(127, 127, 127, 0.08); }
.ai-ign-row img, .ai-ign-nopic { width: 72px; height: 48px; object-fit: cover; border-radius: 7px; flex: none; background: rgba(0, 0, 0, 0.35); }
.ai-ign-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-ign-txt .sub { font-size: 12px; opacity: 0.75; overflow-wrap: anywhere; }
.cs-empty { font-size: 13px; color: #a9b0bb; padding: 10px 4px; }
.cam-obj.ignored span { cursor: default; }
.cam-obj.ignored span::after { content: none; }
.cam-obj span { position: absolute; left: -2px; top: -20px; padding: 1px 6px; font: 600 11px/16px system-ui, sans-serif;
  color: #fff; background: var(--obj, #a855f7); border-radius: 4px 4px 4px 0; white-space: nowrap; }
.cam-obj.label-in span { top: 0; }      /* at the top of the window: the label inside the box */
.cam-obj.label-right span { left: auto; right: -2px; }
.cam-obj.g-person { --obj: #ef4444; }
.cam-obj.g-animal { --obj: #f59e0b; }
.cam-obj.g-vehicle { --obj: #3b82f6; }
.cam-obj.g-object { --obj: #a3a3a3; }
.cam-obj.near { border-width: 3px; }

/* Go (green): Start and Continue - on the bottom bar's one Stop/Pause/Continue
   button and in the Spot Mow window. Stop, Pause and Cancel stay red. */
html #controls button[data-cmd="main"].go:not(:disabled),
html #controls button[data-cmd="stop"].go:not(:disabled), html #controls button.stop-btn.go:not(:disabled) {
  background: linear-gradient(180deg, #2fbf64, #16a34a) !important; border-color: rgba(134, 239, 172, 0.45) !important;
  color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(22, 163, 74, 0.35) !important; }
html #controls button[data-cmd="main"].go:not(:disabled):hover, html #controls button.stop-btn.go:not(:disabled):hover {
  background: linear-gradient(180deg, #2fbf64, #16a34a) !important; filter: brightness(1.08) !important; }
.modal-actions button.go-btn, button.go-btn {
  background: linear-gradient(180deg, #2fbf64, #16a34a) !important; border: 1px solid rgba(134, 239, 172, 0.45) !important;
  color: #fff !important; }
html button.go-btn:not(:disabled):hover { background: linear-gradient(180deg, #2fbf64, #16a34a) !important; filter: brightness(1.08) !important; }
button.go-btn:disabled { opacity: 0.45; }

/* Pause (yellow): the bottom bar's one button while mowing, and the Spot Mow window. */
html #controls button[data-cmd="main"].hold:not(:disabled), html #controls button[data-cmd="main"].hold:not(:disabled):hover,
html #controls button[data-cmd="stop"].hold:not(:disabled), html #controls button.stop-btn.hold:not(:disabled),
html #controls button.stop-btn.hold:not(:disabled):hover, .modal-actions button.hold-btn, button.hold-btn,
html:not(.theme-light) .modal-actions button.hold-btn, html #spotStart.hold-btn {
  background: linear-gradient(180deg, #ddb14a, #c99a2e) !important; border: 1px solid rgba(240, 210, 140, 0.4) !important;
  color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(201, 154, 46, 0.22) !important; }
html #controls button.stop-btn.hold:not(:disabled):hover, html button.hold-btn:not(:disabled):hover,
html:not(.theme-light) .modal-actions button.hold-btn:not(:disabled):hover, html #spotStart.hold-btn:not(:disabled):hover {
  background: linear-gradient(180deg, #ddb14a, #c99a2e) !important; filter: brightness(1.06) !important; }

/* Blade height / speed change animation (changeFx). */
.change-fx { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.9); z-index: 1500;
  min-width: 190px; padding: 14px 22px 16px; border-radius: 18px; text-align: center; pointer-events: none;
  background: rgba(17, 24, 39, 0.88); color: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease, transform .25s ease; }
.change-fx.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.change-fx .fx-title { font: 600 12px/1 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.change-fx .fx-value { font: 700 30px/1.1 system-ui, sans-serif; margin-top: 6px; }
.change-fx .fx-from { font: 500 12px/1.2 system-ui, sans-serif; opacity: .6; margin-top: 2px; }
.change-fx .fx-blade { position: relative; height: 54px; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.change-fx .fx-blade .ic { width: 40px; height: 40px; color: #4ade80; animation: fx-spin .6s linear infinite; }
.change-fx .fx-blade b { font-size: 18px; color: #4ade80; }
.change-fx.show .fx-blade.up { animation: fx-rise 1s ease-out both; }
.change-fx.show .fx-blade.down { animation: fx-drop 1s ease-out both; }
@keyframes fx-rise { from { transform: translateY(16px); } to { transform: translateY(-4px); } }
@keyframes fx-drop { from { transform: translateY(-16px); } to { transform: translateY(4px); } }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.change-fx .fx-gauge { width: 130px; height: 76px; margin-top: 6px; }
.change-fx .fx-arc { fill: none; stroke: rgba(255, 255, 255, 0.25); stroke-width: 8; stroke-linecap: round; }
.change-fx .fx-needle { stroke: #fbbf24; stroke-width: 4; stroke-linecap: round; transform-origin: 60px 64px;
  transform: rotate(var(--from)); }
.change-fx.show .fx-needle.fx-js { animation: none; }
.change-fx.show .fx-needle:not(.fx-js) { animation: fx-needle .9s cubic-bezier(.3, 1.4, .5, 1) .1s both; }
@keyframes fx-needle { from { transform: rotate(var(--from)); } to { transform: rotate(var(--to)); } }
.change-fx .fx-hub { fill: #fbbf24; }
@media (prefers-reduced-motion: reduce) { .change-fx * { animation: none !important; } }

/* Apply in Mow Settings: the change animated (adjustFx). */
.change-fx .fx-parts { display: flex; gap: 22px; justify-content: center; }
.change-fx .fx-status { margin-top: 10px; font: 600 13px/1.35 system-ui, sans-serif; max-width: 260px; margin-left: auto; margin-right: auto; }
/* (as wide as what is in it, not half the screen: centred at left 50 % it was squeezed to half a phone's width) */
.change-fx { width: max-content; max-width: min(92vw, 420px); box-sizing: border-box; }
.change-fx .fx-status.busy { color: #fbbf24; }
.change-fx .fx-status.busy::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 8px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fx-spin .8s linear infinite; vertical-align: -1px; }
.change-fx .fx-status.ok { color: #4ade80; }
.change-fx .fx-status.err { color: #f87171; max-width: 320px; margin-left: auto; margin-right: auto; }

/* Blade height (adjustFx): a lawn whose cut line - the spinning blade - moves on a mm scale. */
.change-fx .fx-hrow { display: flex; align-items: center; gap: 44px; margin-top: 10px; }
.change-fx .fx-lawn { position: relative; width: 74px; height: 120px; border-radius: 12px; overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.change-fx .fx-scale { position: absolute; inset: 0; }
.change-fx .fx-scale i { position: absolute; left: -6px; right: -6px; height: 0; border-top: 1px dashed rgba(255, 255, 255, 0.18); }
.change-fx .fx-scale s { position: absolute; right: -30px; top: -7px; font: 600 10px/1 system-ui, sans-serif; text-decoration: none; color: rgba(255, 255, 255, 0.55); }
.change-fx .fx-cut { position: absolute; left: 6px; right: 6px; bottom: 0; border-radius: 0 0 9px 9px; }
.change-fx .fx-grass { position: absolute; inset: 0; border-radius: 0 0 9px 9px;
  background: repeating-linear-gradient(90deg, #22c55e 0 4px, #16a34a 4px 7px);
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 6px); mask: linear-gradient(180deg, transparent 0, #000 6px); }
.change-fx .fx-disc { position: absolute; left: -8px; right: -8px; top: -9px; height: 16px; }
.change-fx .fx-disc svg { width: 100%; height: 100%; overflow: visible; }
.change-fx .fx-disc-e { fill: rgba(203, 213, 225, 0.92); stroke: #f8fafc; stroke-width: 1.5; }
.change-fx .fx-disc-side { fill: #64748b; }
.change-fx .fx-disc-hub { fill: #94a3b8; stroke: #e2e8f0; stroke-width: 1.5; }
.change-fx .fx-razor { fill: #e2e8f0; stroke: #64748b; stroke-width: 0.8; }
.change-fx .fx-razor-edge { fill: #f8fafc; }
.change-fx .fx-pivot { fill: #334155; stroke: #cbd5e1; stroke-width: 0.8; }
.change-fx .fx-rotor { transform-origin: 0 0; animation: fx-rotor .45s linear infinite; }
@keyframes fx-rotor { to { transform: rotate(360deg); } }
.change-fx .fx-target { position: absolute; left: -10px; right: -10px; height: 0; border-top: 2px dashed #fbbf24; }
.change-fx .fx-hnum { text-align: left; min-width: 92px; }
.change-fx .fx-hnum b { font: 800 44px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.change-fx .fx-hnum span { font: 600 16px/1 system-ui, sans-serif; opacity: .7; margin-left: 4px; }
.change-fx .fx-to { margin-top: 6px; font: 600 13px/1 system-ui, sans-serif; color: #fbbf24; }
.change-fx.fail .fx-rotor { animation: none; }

/* Cancel buttons: red everywhere (tagged by their label, giveIcon). */
html body button.cancel-red:not(#_lbl), html body a.btn.cancel-red:not(#_lbl) {
  background: #d13434 !important; color: #fff !important; border: 1px solid rgba(252, 165, 165, 0.35) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important; }
html body button.cancel-red:not(#_lbl):hover:not(:disabled) { background: #d13434 !important; filter: brightness(1.08) !important; }

/* RTK map on a dark background (night map, aerial, dark lawn-only): multiply
   only darkens, so there it all but vanished — it lightens instead (screen),
   with stronger stripes. map.js setViewMode sets .rtk-on-dark. */
.rtk-on-dark .leaflet-rtk-pane { mix-blend-mode: screen !important; }
.rtk-on-dark .leaflet-rtk-pane pattern rect { fill-opacity: 0.6; width: 0.5px; }
.rtk-on-dark .leaflet-rtk-pane path { stroke-opacity: 0.45; }

/* Go buttons (Start…, Continue, Resume, Apply): green everywhere, and Pause
   yellow — tagged by their label in giveIcon (app.js), like .cancel-red. */
html body button.lbl-go:not(#_lbl), html body a.btn.lbl-go:not(#_lbl) {
  background: linear-gradient(180deg, #2fbf64, #16a34a) !important; color: #fff !important;
  border: 1px solid rgba(134, 239, 172, 0.45) !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important; }
html body button.lbl-go:not(#_lbl):hover:not(:disabled) { background: linear-gradient(180deg, #2fbf64, #16a34a) !important; filter: brightness(1.08) !important; }
html body button.lbl-hold:not(#_lbl) {
  background: linear-gradient(180deg, #ddb14a, #c99a2e) !important; color: #fff !important;
  border: 1px solid rgba(240, 210, 140, 0.4) !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important; }
html body button.lbl-hold:not(#_lbl):hover:not(:disabled) { background: linear-gradient(180deg, #ddb14a, #c99a2e) !important; filter: brightness(1.06) !important; }
html body button.lbl-go:not(#_lbl):disabled, html body button.lbl-hold:not(#_lbl):disabled, html body button.cancel-red:not(#_lbl):disabled { opacity: 0.45 !important; filter: none !important; box-shadow: none !important; }

/* ==========================================================================
   In-app "My Mowers" (tenant): list the account's mowers and switch on tap.
   Matches the app's other sheets (Settings) and its theme tokens; no hex.
   ========================================================================== */
.mowers-sheet { width: min(480px, 94vw); max-height: min(720px, 90vh); box-sizing: border-box; }
.mowers-sheet .sheet-head { flex: 0 0 auto; }
.mowers-list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 2px;
}
.mower-card {
  padding: 14px 16px;
  background: var(--p-surface-2);
  border: 1px solid var(--p-line);
  border-radius: var(--p-r-lg);
  box-shadow: var(--p-hi);
  transition: border-color var(--p-fast) var(--p-ease), background var(--p-fast) var(--p-ease);
}
.mower-card.current {
  border-color: var(--p-accent);
  box-shadow: var(--p-hi), 0 0 0 1px var(--p-accent-soft);
  background: linear-gradient(180deg, var(--p-accent-soft), var(--p-surface-2));
}
.mower-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mower-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; color: var(--p-text); }
.mower-card .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--p-text-2); }
.mower-card .small { font-size: 12.5px; line-height: 1.5; color: var(--p-text-2); }
.mower-card .muted { color: var(--p-text-3); }
.mower-card p { margin: 6px 0 0; }
.mower-actions { margin-top: 12px; }
.mower-actions .btn { width: 100%; justify-content: center; }
.mower-card .badge.amber { background: var(--amber); }
.mower-card .badge.neutral { background: var(--p-text-3); }
.mower-card .badge.cur { background: var(--p-accent); }

/* Sliders: no focus box round the whole slider while it's dragged (Safari shows one) - a soft
   ring on the knob marks keyboard focus instead. */
input[type=range]:focus, input[type=range]:focus-visible { outline: none !important; box-shadow: none !important; }
/* (1.158.31) No box round any slider (owner, 2026-10-13: "remove the boxes around all sliders"): a slider is an
   <input>, and the look every text field gets - a border, a tinted background, padding - drew a rounded frame
   round the track. Only the track and the knob show, everywhere. */
html input[type=range], html.theme-light input[type=range], html:not(.theme-light) input[type=range] {
  padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(91, 122, 31, 0.28), 0 1px 3px rgba(0, 0, 0, 0.3); }
input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(91, 122, 31, 0.28), 0 1px 3px rgba(0, 0, 0, 0.3); }

/* The Spot Mow header: title and state never wrap. A message sits beside them when it fits there on one line, else on
   a line of its own under them, in full (1.158.922, .long - it used to be cut short with "…"). */
.spot-head h2, .spot-head .spot-state { white-space: nowrap; flex: none; }
.spot-head .modal-msg { min-width: 0; white-space: nowrap; overflow: hidden; }

/* Spot Mow: the blades chip (the blade spins, green, while they run) and the finish time in the header. */
.blade-chip { display: inline-flex; align-items: center; gap: 6px; }
.blade-chip .ic { width: 16px; height: 16px; color: #9ca3af; }
.blade-chip.on .ic { color: #16a34a; animation: spot-blade-spin 0.9s steps(9) infinite; transform-origin: 50% 50%; }
@keyframes spot-blade-spin { to { transform: rotate(360deg); } }
/* (1.158.48, owner: "when the blades are spinning i want the blades icon to spin") Every blade icon - Mow
   Settings, Stop / Start Blades, the Mow Settings window's title - turns while the mower reports its blades on. */
body.blades-on svg.ic:has(> use[href="#ic-blade"]) { animation: spot-blade-spin 0.9s steps(9) infinite; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { body.blades-on svg.ic:has(> use[href="#ic-blade"]) { animation-duration: 2s; } }
/* (owner 2026-11-02: "change the colour of the blades to green when they are spinning") the Mow Settings button's
   and window title's blade turns green too (the red Stop / Start Blades buttons keep theirs white) */
body.blades-on #cuttingBtn svg.ic, body.blades-on #cuttingModal .win-ic svg.ic { color: #22c55e; }
html.theme-light body.blades-on #cuttingBtn svg.ic, html.theme-light body.blades-on #cuttingModal .win-ic svg.ic { color: #16a34a; }
@media (prefers-reduced-motion: reduce) { .blade-chip.on .ic { animation-duration: 2s; } }
.spot-head .spot-eta { flex: none; white-space: nowrap; font-size: 13px; font-weight: 600; opacity: 0.75; }
.spot-head .spot-eta:empty { display: none; }



/* "Ai" in the FPV header while Ai object detection watches the camera: a blue-to-cyan gem
   with a soft breathing glow, a twinkling spark and a sheen sweeping across it. */
.ai-badge { position: relative; display: inline-flex; align-items: center; gap: 3px; margin-left: 8px;
  padding: 1px 8px 1px 6px; border-radius: 999px; overflow: hidden; vertical-align: middle;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.5; color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 45%, #22d3ee 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 10px rgba(59, 130, 246, 0.55);
  animation: ai-glow 2.4s steps(4) infinite; }
.ai-badge[hidden] { display: none; }
.ai-badge::before { content: "✦"; font-size: 9px; animation: ai-twinkle 1.6s steps(4) infinite; }
.ai-badge::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  transform: translateX(-130%); animation: ai-sheen 3.2s steps(8) infinite; }
@keyframes ai-glow { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 8px rgba(59, 130, 246, 0.45); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 2px 16px rgba(34, 211, 238, 0.75); } }
@keyframes ai-twinkle { 0%, 100% { opacity: 0.55; transform: scale(0.8) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@keyframes ai-sheen { 0%, 55% { transform: translateX(-130%); } 85%, 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .ai-badge, .ai-badge::before, .ai-badge::after { animation: none; } }

/* Spot mow, adding: a bar over the map says what the next tap adds (shapes + cancel). */
.spot-addbar { position: absolute; z-index: 1460; left: 50%; top: 12px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); box-sizing: border-box;
  padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(15, 23, 42, 0.94); color: #e2e8f0;
  border: 1px solid rgba(59, 130, 246, 0.55); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(59, 130, 246, 0.14);
  font-size: 14px; font-weight: 600; animation: sab-in .22s cubic-bezier(.2, .8, .2, 1); }
.spot-addbar[hidden] { display: none; }
.spot-addbar.nogo { border-color: rgba(239, 68, 68, 0.6); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(239, 68, 68, 0.14); }
@keyframes sab-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sab-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #3b82f6; animation: sab-pulse 1.4s ease-in-out infinite; }
.spot-addbar.nogo .sab-dot { background: #ef4444; }
@keyframes sab-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); } }
.sab-text { min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }   /* (1.158.922) in full, on two lines if need be */
.sab-shapes { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(128, 128, 128, 0.16); }
.sab-shapes[hidden] { display: none; }
.sab-shapes button, .sab-cancel { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.sab-shapes svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; opacity: .7; }
.sab-shapes button[aria-checked="true"] { background: #3b82f6; color: #fff; }
.spot-addbar.nogo .sab-shapes button[aria-checked="true"] { background: #ef4444; }
.sab-shapes button[aria-checked="true"] svg { opacity: 1; }
.sab-cancel { background: rgba(128, 128, 128, 0.2); }
.sab-cancel .ic { width: 16px; height: 16px; }
.sab-cancel:hover, .sab-shapes button:hover:not([aria-checked="true"]) { background: rgba(128, 128, 128, 0.3); }
html.theme-light .spot-addbar { background: var(--lt-win); color: var(--lt-text); }
/* The mode being added: a soft pulse round its tile. */
.spot-modes button.adding { animation: sab-tile 1.4s ease-in-out infinite; }
@keyframes sab-tile { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); } 50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0); } }
.leaflet-container.spot-adding { cursor: crosshair; }
.sab-btn { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(128, 128, 128, 0.2); color: inherit; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sab-btn[hidden], .sab-cancel[hidden] { display: none; }
.sab-btn .ic { width: 15px; height: 15px; }
.sab-btn.sab-icon { width: 34px; padding: 0; justify-content: center; }
.sab-btn:disabled { opacity: .4; }
.sab-btn.sab-done { background: #16a34a; color: #fff; }
.spot-addbar:not(.adding) .sab-dot { animation: none; background: #94a3b8; }
.spot-addbar:not(.adding) { border-color: var(--p-line, rgba(128, 128, 128, 0.4)); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3); }
/* Desktop: in the panel, above the hint. */
.spot-addbar.in-panel { position: static; transform: none; max-width: none; width: 100%; padding: 4px 4px 4px 14px;
  border-radius: 12px; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); background: rgba(59, 130, 246, 0.08); animation: none; }
.spot-addbar.in-panel.nogo { background: rgba(239, 68, 68, 0.08); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
.spot-addbar.in-panel .sab-cancel { margin-left: auto; }
html.theme-light .spot-addbar.in-panel { background: rgba(59, 130, 246, 0.07); }
html.theme-light .spot-addbar.in-panel.nogo { background: rgba(239, 68, 68, 0.07); }
/* A phone: the sheet tucks away while shapes are added / adjusted; the bar sits at the bottom. */
.spot-panel.tucked { display: none; }
@media (max-width: 700px) {
  .spot-addbar { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; gap: 6px; }
  .sab-shapes button, .sab-cancel { width: 32px; height: 32px; flex-basis: 32px; }
}
@media (prefers-reduced-motion: reduce) { .spot-addbar, .sab-dot, .spot-modes button.adding { animation: none; } }
.layers-card .ly-btns { display: inline-flex; gap: 8px; flex: none; }
/* An icon-only button beside a full one (missed patches: clear + Mow Them), same height, square. */
.layers-card .ly-field .btn.ly-icon-btn { width: 38px !important; min-width: 38px; padding: 0; }
.layers-card .ly-btns .btn:not(.ly-icon-btn) { width: auto !important; min-width: 0; padding: 0 16px; }
.layers-card .ly-field > span:first-child { min-width: 0; }
.layers-card .ly-field .btn.ly-icon-btn .ic { width: 17px; height: 17px; margin: 0; }

/* A phone: the Spot Mow window is fixed to the screen (no dragging) and scrolls inside;
   double-tapping its title rolls it up to just the title at the top. */
@media (max-width: 700px) {
  .spot-panel, .spot-panel.placed { left: 10px; right: 10px; top: 10px; bottom: 10px; width: auto; max-height: none; transform: none; }
  /* (its grip shows on a phone too - it moves up and down there, like the camera's; owner, 2026-10-06) */
  .spot-panel .spot-head.drag-handle { cursor: default; }
  .spot-panel > .modal-actions { margin-top: auto; position: sticky; bottom: -14px; z-index: 2;
    margin-bottom: -14px; padding: 10px 0 14px; background: inherit; }
  .spot-panel.collapsed { bottom: auto; overflow: hidden; }
  .spot-panel.collapsed > :not(.spot-head) { display: none; }
  .spot-panel.collapsed .spot-head { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
  .spot-panel.collapsed .spot-head::after { content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .5; }
}
#mapControls button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* ===== Ai Training, easier to use ===== */
/* Tabs: icon + word, the count as a small badge (never wraps). */
.learn-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; min-width: 0; }
.learn-tabs button .ic { width: 15px; height: 15px; flex: none; }
.lt-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; background: rgba(128, 128, 128, 0.22); }
.lt-badge:empty { display: none; }
/* Train: Yours / From Ai Recover, and "Needs a label". */
.learn-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.learn-src { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(128, 128, 128, 0.14); }
.learn-src button, .learn-todo { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; opacity: .75; }
.learn-src button.on { background: var(--p-accent, #3b82f6); color: #fff; opacity: 1; }
.learn-todo { margin-left: auto; border: 1px solid rgba(128, 128, 128, 0.35); border-radius: 999px; padding: 6px 10px; }
.learn-todo.on { background: #f59e0b; border-color: #f59e0b; color: #1f1300; opacity: 1; }
html.theme-light .learn-src button.on { background: var(--lt-accent, #4d7c0f); }
/* The thumbnails under the picture. */
.learn-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 1px 4px; scrollbar-width: none; flex: none; }
.learn-strip::-webkit-scrollbar { display: none; }
.learn-strip[hidden] { display: none; }
.ls-thumb { position: relative; flex: none; width: 60px; height: 45px; padding: 0; border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; background: #000; cursor: pointer; }
.ls-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.ls-thumb.sel { border-color: var(--p-accent, #3b82f6); }
.ls-thumb.sel img { opacity: 1; }
.ls-thumb i { position: absolute; right: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.ls-dock i { background: #22c55e; }
.ls-avoid i { background: #ef4444; }
.ls-none i { background: #94a3b8; }
.ls-todo i { background: transparent; }
/* The picture: touch is ours (the magnifier while placing a mark); no callout, drag or selection. */
#learnShotBox { position: relative; overflow: hidden; touch-action: none; border-radius: 8px; }
#learnShot, #learnShotBox { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.learn-loupe { position: fixed; z-index: 4000; width: 120px; height: 120px; border-radius: 50%; pointer-events: none;
  border: 3px solid #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); background-color: #000; background-repeat: no-repeat; }
.learn-loupe[hidden] { display: none; }
.learn-loupe::before, .learn-loupe::after { content: ""; position: absolute; left: 50%; top: 50%; background: #f59e0b; }
.learn-loupe::before { width: 22px; height: 2px; margin: -1px 0 0 -11px; }
.learn-loupe::after { width: 2px; height: 22px; margin: -11px 0 0 -1px; }
/* After a tap: what is it? */
.lc-driven { display: none !important; }
.learn-choice { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px; box-sizing: border-box;
  border-radius: 16px 16px var(--p-r-lg, 14px) var(--p-r-lg, 14px); background: inherit;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28); border-top: 1px solid rgba(128, 128, 128, 0.25); animation: lc-up .2s ease-out; }
html:not(.theme-light) .learn-choice { background: var(--dk-win, #1e293b); }
html.theme-light .learn-choice { background: var(--lt-win, #fff); }
.learn-choice[hidden] { display: none; }
@keyframes lc-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.lc-step { display: flex; flex-direction: column; gap: 10px; }
.lc-step[hidden] { display: none; }
.lc-head { display: flex; align-items: center; gap: 8px; }
.lc-head b { flex: 1; font-size: 15px; }
.lc-x { width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(128, 128, 128, 0.18); color: inherit; cursor: pointer; }
.lc-x .ic { width: 16px; height: 16px; }
.lc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lc-big { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 12px; border: 2px solid transparent;
  color: #fff; font: inherit; text-align: left; cursor: pointer; }
.lc-big .ic { width: 22px; height: 22px; flex: none; }
.lc-big span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-big b { font-size: 15px; }
.lc-big small { font-size: 12px; opacity: .85; line-height: 1.25; }
.lc-dock { background: #16a34a; }
.lc-avoid { background: #ea580c; }
.lc-big:active { transform: scale(.98); }
/* Which way the dock faces: a compass round the dock, as seen in the picture (down = toward the camera). */
.learn-choice #learnFront { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 52px); gap: 8px;
  justify-content: center; grid-template-areas: "away_left away away_right" "left dock right" "toward_left toward_camera toward_right"; }
.learn-choice #learnFront button { width: auto; height: auto; padding: 0; margin: 0; font-size: 0; display: grid; place-items: center; }
.learn-choice #learnFront [data-front="away_left"] { grid-area: away_left; }
.learn-choice #learnFront [data-front="away"] { grid-area: away; }
.learn-choice #learnFront [data-front="away_right"] { grid-area: away_right; }
.learn-choice #learnFront [data-front="left"] { grid-area: left; }
.learn-choice #learnFront [data-front="right"] { grid-area: right; }
.learn-choice #learnFront [data-front="toward_left"] { grid-area: toward_left; }
.learn-choice #learnFront [data-front="toward_camera"] { grid-area: toward_camera; }
.learn-choice #learnFront [data-front="toward_right"] { grid-area: toward_right; }
.lf-dock { grid-area: dock; display: grid; place-items: center; border-radius: 10px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; background: rgba(128, 128, 128, 0.18); opacity: .8; }
.learn-choice #learnFront .ic { width: 22px; height: 22px; }
.lc-names { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-names button { padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(128, 128, 128, 0.35); background: transparent;
  color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; }
.lc-names button:hover { background: rgba(128, 128, 128, 0.15); }
.lc-namerow { display: flex; gap: 8px; }
.lc-namerow input { flex: 1; min-width: 0; margin: 0; }
.lc-save { flex: none; background: #ea580c !important; border-color: #ea580c !important; color: #fff !important; }
/* ⋯ More: Clear Mark / Delete Picture. */
.learn-more { position: relative; flex: none; display: flex; }
.learn-pic-actions #learnMoreBtn { width: 46px; flex: none; padding: 0; display: grid; place-items: center; align-self: stretch; }
.learn-more-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 25; display: flex; flex-direction: column; gap: 6px;
  min-width: 190px; padding: 8px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); border: 1px solid rgba(128, 128, 128, 0.3); }
html:not(.theme-light) .learn-more-menu { background: var(--dk-win, #1e293b); }
html.theme-light .learn-more-menu { background: var(--lt-win, #fff); }
.learn-more-menu[hidden] { display: none; }
.learn-more-menu .btn { justify-content: flex-start; width: 100%; }
.learn-pic-actions .learn-more ~ #learnClose2 { flex: 0 0 auto; padding-left: 14px; padding-right: 14px; }
/* Quick steps for the note. */
.learn-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12px; }
.learn-quick > span { opacity: .7; margin-right: 2px; }
.learn-quick button { padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(128, 128, 128, 0.35); background: transparent;
  color: inherit; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.learn-quick button:hover { background: rgba(128, 128, 128, 0.15); }
/* Live: the shutter over the picture, and a first-time guide. */
.learn-live { position: relative; }
.learn-shutter { position: absolute; left: 50%; bottom: 12px; width: 62px; height: 62px; margin-left: -31px; z-index: 4; padding: 0;
  border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, 0.25); cursor: pointer; display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.learn-shutter i { position: absolute; inset: 5px; border-radius: 50%; background: #fff; transition: transform .1s; }
.learn-shutter:active i { transform: scale(.88); }
.learn-live.on .learn-shutter { display: block; }
.learn-firstrun { margin: 0; padding: 10px 12px 10px 30px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  background: var(--p-accent-soft, rgba(59, 130, 246, 0.14)); border: 1px solid rgba(59, 130, 246, 0.35); flex: none; }
html.theme-light .learn-firstrun { background: var(--lt-accent-soft, #eef5e4); border-color: rgba(var(--lt-accent-rgb, 77, 124, 15), 0.35); }
.learn-firstrun[hidden] { display: none; }
.learn-firstrun li + li { margin-top: 2px; }
.learn-guide#learnNotes { flex: none; }
.learn-guide#learnNotes[open] { display: flex; flex-direction: column; gap: 8px; }
#learnPicEmpty #learnGoLive { margin-top: 6px; }

/* Every size: the pages scroll, so the picture to mark is full width (not squeezed to fit). */
.learn-panel > .learn-page { overflow-y: auto !important; overscroll-behavior: contain; scrollbar-width: none; }
.learn-panel #learnPicBody { overflow: visible !important; flex: none !important; }
.learn-panel #learnPicBody > .learn-shot, .learn-panel #learnShotBox { flex: none !important; aspect-ratio: 4 / 3; width: 100%; min-height: 0; }
.learn-panel #learnPicAi { max-height: none !important; }

/* A phone: fixed to the screen, the pages scroll, a big picture; double-tap the title to roll it up. */
@media (max-width: 700px) {
  .learn-panel, .learn-panel.placed, .learn-panel.maximized { left: 10px !important; right: 10px !important; top: 10px !important;
    bottom: 10px !important; width: auto !important; height: auto !important; max-height: none !important; transform: none !important; }
  .learn-panel.movable::before, .learn-panel .learn-resize { display: none; }
  .learn-panel .learn-drag { cursor: default; touch-action: manipulation; }
  .learn-panel > .learn-page { overflow-y: auto !important; overscroll-behavior: contain; }
  .learn-panel .learn-live { flex: none !important; aspect-ratio: 4 / 3; min-height: 0; }
  #learnPicBody { overflow: visible !important; flex: none !important; }
  #learnPicBody > .learn-shot, #learnShotBox { flex: none !important; aspect-ratio: 4 / 3; width: 100%; min-height: 0; }
  #learnAi { max-height: none !important; }
  #learnPicAi { max-height: none !important; }
  .learn-panel:not(.pics-tab):not(.drive-tab) #learnSave { display: none; }     /* the round shutter takes the picture */
  .learn-tabs button { padding-left: 6px; padding-right: 6px; }
  .learn-panel.collapsed { bottom: auto !important; }
  .learn-panel.collapsed > :not(.title-row) { display: none !important; }
  .learn-panel.collapsed > .title-row { border-bottom: 0 !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }
  .learn-panel.collapsed > .title-row::after { content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .5; }
  .learn-quick > span { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .learn-choice { animation: none; } }

/* ===== Joystick: a small Drive button until pressed, then the full pad (back when you let go) =====
   The pad keeps its full size in the layout (the drive speeds come from it, see setStick); `scale`
   shrinks what's shown (and what can be pressed) to a ~56 px button. Its centre stays put, so a
   press lands in the middle of the pad: no jump. (`translate` moves it above the phone alerts.) */
#joystick { left: 14px; bottom: 14px; width: 132px; height: 132px; scale: .42; cursor: grab; color: #fff;
  background: rgba(15, 23, 42, 0.62); border: 3px solid rgba(255, 255, 255, 0.6); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: scale .16s cubic-bezier(.2, .8, .2, 1), translate .25s ease, background-color .16s, border-color .16s; }
#joystick:hover:not(.engaged) { scale: .46; }
#joystick .joy-ic { position: absolute; left: 22%; top: 22%; width: 56%; height: 56%; transition: opacity .12s; pointer-events: none; }
#joystick #stick { opacity: 0; transition: opacity .12s; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 4px 12px rgba(0, 0, 0, 0.4); }
#joystick.engaged { scale: 1; cursor: grabbing; background: rgba(15, 23, 42, 0.32); border-width: 2px; border-color: rgba(255, 255, 255, 0.45); }
#joystick.engaged .joy-ic { opacity: 0; }
#joystick.engaged #stick { opacity: 1; }
/* The pad's rings while driving: where full speed is. */
#joystick::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.35);
  opacity: 0; transition: opacity .12s; pointer-events: none; }
#joystick.engaged::after { opacity: 1; }
@media (display-mode: standalone) {
  #joystick { width: 132px; height: 132px; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  #joystick #stick { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
}
@media (prefers-reduced-motion: reduce) { #joystick { transition: none; } }

/* A phone: Ai Training covers the whole screen (header, map and button bar), clear of the notch and
   home bar. On Live and Drive the joystick's drive button floats over its bottom-left corner (you
   drive to the spots you teach); on Train it's hidden (the buttons need the room). */
@media (max-width: 700px) {
  .learn-panel, .learn-panel.placed, .learn-panel.maximized {
    position: fixed !important; inset: 0 !important; z-index: 1590;
    border-radius: 0 !important; border: 0 !important;
    padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: calc(14px + env(safe-area-inset-left, 0px)) !important;
    padding-right: calc(14px + env(safe-area-inset-right, 0px)) !important; }
  .learn-panel.collapsed { bottom: auto !important; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
  .learn-panel .learn-choice { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 16px 16px 0 0; }
  body:has(.learn-panel:not(.hidden):not(.collapsed):not(.pics-tab)) #joystick {
    position: fixed; z-index: 1595; translate: none !important; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  body:has(.learn-panel.pics-tab:not(.hidden):not(.collapsed)) #joystick { display: none; }
  /* Room under the Live / Drive pages for the drive button. */
  .learn-panel:not(.pics-tab) > .modal-actions { padding-left: 72px; }
}
/* A phone, Live / Drive: room at the end of the page so the drive button never covers text. */
@media (max-width: 700px) {
  .learn-panel:not(.pics-tab) > .learn-page { padding-bottom: 64px; }
}

/* Train: what it has learned (tap one to see those pictures). */
.learn-status { flex-direction: column; align-items: stretch !important; gap: 8px; }
.learn-status-row { display: flex; align-items: center; gap: 8px; }
.learn-status-row #learnStatusText { flex: 1; min-width: 0; font-size: 12px; opacity: .8; }
.learn-sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.learn-sum button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; border-radius: 10px;
  border: 1px solid rgba(128, 128, 128, 0.28); background: transparent; color: inherit; font: inherit; cursor: pointer; position: relative; min-width: 0; }
.learn-sum button:hover { background: rgba(128, 128, 128, 0.12); }
.learn-sum button.on { border-color: var(--p-accent, #3b82f6); box-shadow: 0 0 0 1px var(--p-accent, #3b82f6) inset; }
html.theme-light .learn-sum button.on { border-color: var(--lt-accent, #4d7c0f); box-shadow: 0 0 0 1px var(--lt-accent, #4d7c0f) inset; }
.learn-sum b { font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.learn-sum span { font-size: 11px; opacity: .75; white-space: nowrap; }
.learn-sum i { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; }
.sd-dock { background: #22c55e; } .sd-avoid { background: #ef4444; } .sd-note { background: #3b82f6; }
.sd-drive { background: #a855f7; } .sd-ground { background: #a3a3a3; }
/* The filter menu. */
.learn-filter-sel { margin: 0 0 0 auto !important; width: auto !important; padding: 6px 28px 6px 10px !important; border-radius: 999px !important;
  font-size: 12.5px !important; font-weight: 600; min-height: 0 !important; height: auto !important; }
.learn-filter-sel.on { border-color: #f59e0b !important; box-shadow: 0 0 0 1px #f59e0b inset; }
/* Strip: a note dot (blue), alone or beside another kind. */
.ls-note i { background: #3b82f6; }
.ls-thumb u { display: none; position: absolute; right: 15px; top: 3px; width: 10px; height: 10px; border-radius: 50%;
  background: #3b82f6; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.ls-thumb.ls-has-note u { display: block; }
/* "A spot where it gets stuck": a full-width third choice. */
.lc-btns .lc-stuck { grid-column: 1 / -1; background: #2563eb; padding: 11px 12px; }
#learnNote.flash { animation: note-flash 1.6s ease-out; }
@keyframes note-flash { 0%, 60% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.6); } 100% { box-shadow: none; } }
.learn-status .learn-sum span { flex: none; }
.learn-status.busy .learn-sum span::before { content: none; display: none; }
/* Joystick, see-through: the map shows through the button and the pad (a white outline and a
   soft shadow keep it visible on bright lawn). */
#joystick { background: rgba(15, 23, 42, 0.18); backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.85); }
#joystick .joy-ic { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
#joystick.engaged { background: rgba(15, 23, 42, 0.08); border-color: rgba(255, 255, 255, 0.7); }
#joystick.engaged #stick { background: rgba(37, 99, 235, 0.55); }
/* The note on what to do from a view: room for a few steps (taller on a phone). */
#learnNote { min-height: 84px; resize: vertical; }
@media (max-width: 700px) { #learnNote { min-height: 112px; font-size: 16px; } }   /* 16 px: iOS doesn't zoom in on focus */
/* "Not the dock": a quieter fourth choice under the big ones. */
.lc-not { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(128, 128, 128, 0.35); background: transparent; color: inherit; font: inherit; font-size: 13.5px; text-align: left; }
.lc-not:hover { background: rgba(128, 128, 128, 0.12); }
.lc-not .ic { width: 20px; height: 20px; flex: none; opacity: .8; }
.lc-not:disabled { opacity: .5; }
/* Bottom row: Clear Mark, Delete, Close (and Live after a picture from Live). */
.learn-pic-actions #learnClose2 { flex: 0 0 auto; padding-left: 14px; padding-right: 14px; }

/* Names on LuLuMate's own areas / no-go zones and missed patches (they don't take taps). */
.leaflet-tooltip.zone-name { background: rgba(255, 255, 255, 0.78); border: 0; box-shadow: none; padding: 1px 6px; border-radius: 6px;
  font-size: 11px; font-weight: 600; color: #166534; pointer-events: none; white-space: nowrap; }
.leaflet-tooltip.zone-name::before { display: none; }
.leaflet-tooltip.zone-name.nogo { color: #b91c1c; }
.leaflet-tooltip.zone-name.patch { color: #7e22ce; }

/* A less important choice in a question: a text link under the message, not a third button. */
.ask-link { display: inline-block; background: none; border: 0; padding: 4px 0; margin: -4px 0 6px;
  color: var(--p-text-2, #94a3b8); font-size: 14px; font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; box-shadow: none; min-height: 0; }
.ask-link[hidden] { display: none; }
.ask-link.danger-link { color: #f87171; }

/* "Not connected yet — sign in…": a link to Set Up. */
#notice.setup-link { cursor: pointer; }

/* ---- Spot Mow: the list of saved spot mows and the editor (1.80.0) ---- */
.spot-state:empty { display: none; }
.spot-listview, .spot-editview { display: flex; flex-direction: column; gap: 10px; }
.spot-listview[hidden], .spot-editview[hidden] { display: none; }
.spot-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px;
  border: 1.5px dashed rgba(59, 130, 246, 0.6); border-radius: 12px; background: rgba(59, 130, 246, 0.1); color: #bfdbfe;
  font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.spot-new:hover { background: rgba(59, 130, 246, 0.18); }
.spot-new .ic { width: 17px; height: 17px; }
.spot-empty { margin: 0; font-size: 13px; line-height: 1.45; color: var(--p-text-3, #94a3b8); }
.spot-saved-list .spot-row { flex-wrap: wrap; padding: 6px 6px 6px 4px; gap: 6px; }
.spot-saved-list .spot-row.on { border-color: rgba(245, 158, 11, 0.7); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18); }
.spot-saved-list .spot-row .name { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 4px 6px !important; border: 0 !important; background: transparent !important; text-align: left; white-space: normal;
  color: inherit; font: inherit; cursor: pointer; box-shadow: none !important; }
.spot-saved-list .spot-row .name b { font-size: 14px; }
.spot-saved-list .spot-row button { min-height: 34px; display: inline-flex; align-items: center; gap: 5px; }
.spot-saved-list .spot-row button .ic { width: 13px; height: 13px; }
.spot-saved-list .spot-row button.more { width: 34px; justify-content: center; padding: 0; font-size: 16px; letter-spacing: 1px; }
.spot-row-more { flex-basis: 100%; display: flex; gap: 6px; justify-content: flex-end; padding: 2px 0 2px; }
.spot-row-more[hidden] { display: none; }
.spot-saved-list .row button.del { border-color: #7f1d1d; color: #fff; background: #b91c1c; }
/* The editor: the name, what to add, the selected part. */
.spot-edname { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 2px 4px; border: 0; background: none;
  color: inherit; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.spot-edname .ic { width: 14px; height: 14px; opacity: 0.55; }
.spot-edname.unsaved::after { content: "unsaved"; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px;
  background: rgba(234, 179, 8, 0.2); color: #facc15; }
/* A run sheet (Mow from the list): the name is a label, not a rename button, and the add tools are gone. */
.spot-edname.run-sheet { cursor: default; }
.spot-edname.run-sheet .ic { display: none; }
/* A run sheet (a Mow) keeps the NoGo add-tool (a no-go zone for this mow only); the shape buttons live in
   the settings box now and show while adding an area or a no-go here too (owner, 2026-10-20: the "nogo shapes"
   had "disappeared" - they were force-hidden in a run sheet). The per-part toolbar (spotSel) shows only for a
   session no-go so it can be removed. */
.spot-addkinds { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }   /* the add tools that are shown fill the row (owner, 2026-10-20: "spread these icons out to fill the space") */
.spot-addkinds button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px !important;
  font-size: 12px !important; white-space: nowrap; }
.spot-addkinds button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.spot-addkinds button[data-kind="area"] svg { color: #f59e0b; }
.spot-addkinds button[data-kind="line"] svg { color: #a855f7; }   /* Line: violet, not Area's amber (owner, 2026-10-07) */
.spot-addkinds button[data-kind="whole"] svg { color: #22c55e; }
.spot-addkinds button.k-nogo svg { color: #ef4444; }
.spot-addkinds button[aria-pressed="true"] { background: #2563eb !important; color: #fff !important; }
.spot-addkinds button.k-nogo[aria-pressed="true"] { background: #dc2626 !important; }
.spot-addkinds button[aria-pressed="true"] svg { color: #fff; }
.spot-addkinds button.adding { animation: sab-tile 1.4s ease-in-out infinite; }
.spot-shapes[hidden] { display: none; }
/* The shape buttons (1.155.0): an area's square, hexagon and triangle have round corners and are drawn so; a no-go
   zone keeps its sharp ones (a round corner would let the mower into it), so its buttons show them sharp. */
.spot-shapes .sh-sharp, .spot-shapes.nogo .sh-round { display: none; }
.spot-shapes.nogo .sh-sharp { display: inline; }
/* (1.158.408) Ring: a fifth shape for a spot (a NoGo has no ring: four shapes there) */
#spotShapes { grid-template-columns: repeat(5, 1fr); gap: 6px; }
#spotShapes.nogo { grid-template-columns: repeat(4, 1fr); gap: 8px; }
#spotShapes.nogo button[data-shape="ring"] { display: none; }
.spot-shapes .sh-trunk { stroke: #ef4444; fill: rgba(239, 68, 68, 0.3); }
.spot-shapes.nogo button[aria-checked="true"] { border-color: #ef4444 !important; background: rgba(239, 68, 68, 0.25) !important; box-shadow: none !important; }
.spot-sel { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px;
  background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); }
.spot-sel[hidden] { display: none; }
.spot-sel b { flex: 1; font-size: 13.5px; }
.spot-sel-dot { width: 10px; height: 10px; border-radius: 3px; background: #f59e0b; flex: none; }
.spot-sel.k-whole { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); }
.spot-sel.k-whole .spot-sel-dot { background: #22c55e; }
.spot-sel.k-line .spot-sel-dot { background: #a855f7; }
.spot-sel.k-nogo, .spot-sel.k-nogoline { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.4); }
.spot-sel.k-nogo .spot-sel-dot, .spot-sel.k-nogoline .spot-sel-dot { background: #ef4444; }
.spot-sel .btn { display: inline-flex; align-items: center; gap: 4px; }
.spot-sel .btn .ic { width: 13px; height: 13px; }
/* One set of settings for the whole spot mow, folded away. */
.spot-setbox { border: 1px solid var(--p-line, #1e293b); border-radius: 12px; padding: 0 12px; }
.spot-setbox[hidden] { display: none; }
.spot-setbox > summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; font-size: 13.5px; font-weight: 600; list-style: none; }
.spot-setbox > summary::-webkit-details-marker { display: none; }
.spot-setbox > summary::after { content: "›"; margin-left: 4px; font-size: 18px; line-height: 1; transition: transform 0.2s; opacity: 0.7; }
.spot-setbox[open] > summary::after { transform: rotate(90deg); }
.spot-setsum { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--p-text-3, #94a3b8); white-space: nowrap;
  min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.spot-setsum::-webkit-scrollbar { display: none; }
.spot-settitle { flex: none; white-space: nowrap; }      /* "Settings" never wraps */
.spot-statsbox[hidden] { display: none; }
.spot-statsbox > summary { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--p-text-2, #cbd5e1); }
.spot-statsbox > summary::-webkit-details-marker { display: none; }
.spot-statsbox > summary::after { content: "›"; margin-left: auto; font-size: 18px; line-height: 1; transition: transform 0.2s; opacity: 0.7; }
.spot-statsbox[open] > summary::after { transform: rotate(90deg); }
.spot-statssum { min-width: 0; overflow-wrap: anywhere; }
.spot-statsbox[open] .spot-statssum { visibility: hidden; }   /* open: the chips say it */
.spot-statsbox > .spot-stats { padding-top: 4px; }
/* More than fits: it scrolls sideways (spotSumFit); the side with more to see fades out. */
.spot-setsum.more { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 18px), transparent); }
.spot-setsum.more.at-start { -webkit-mask-image: linear-gradient(90deg, #000, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, #000, #000 calc(100% - 18px), transparent); }
.spot-setsum.more.at-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000); }
.spot-setbox[open] { padding-bottom: 12px; }
/* (1.158.474) the mower's own job's settings: a word list under the height and speed sliders */
.job-setlist { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 13px; }
.job-setlist dt { color: var(--p-text-3, #94a3b8); }
.job-setlist dd { margin: 0; font-weight: 600; text-align: right; }
.job-setbox .set-note { grid-column: 1 / -1; margin: 6px 0 0; }
/* No mowable area on the map yet (owner 2026-10-20): the settings mean nothing — greyed and unclickable
   until a shape is placed (spotSettingsFit toggles "no-area"). The shape picker is the exception: picking Spot or
   NoGo lights it so a shape can be chosen first (owner, 2026-10-20: "when you click on spot is should enable the
   shapes and so for nogo too"). */
.spot-setbox.no-area > summary { opacity: 0.6; }
.spot-setbox.no-area #spotSettings > :not(#spotShapes) { opacity: 0.45; pointer-events: none; filter: saturate(0.5); }
.leaflet-container .spot-other.nogo { stroke-dasharray: none; }
html.theme-light .spot-new { color: #1d4ed8; }
/* A phone: the Spot Mow window is a sheet at the top, sized to what it holds, so the map stays in view
   below it (spotPhoneFit places it); rolled up / minimised it's a strip at the top. */
@media (max-width: 700px) {
  .spot-panel, .spot-panel.placed, .spot-panel.editing, .spot-panel.listing { bottom: auto; }
  /* moved up or down by its title (owner, 2026-10-06: "movable in the mobile view … only up and down"; app.js
     spotPhoneFit places it) */
  .spot-panel .spot-head { touch-action: none; }
  .spot-panel.dragging { transition: none !important; }
  .spot-panel.editing, .spot-panel.editing.placed { max-height: 52vh; }
  .spot-panel.listing, .spot-panel.listing.placed { max-height: 62vh; }
  .spot-panel.editing .spot-head h2 { font-size: 15px; }
  .spot-addkinds button { font-size: 11px !important; }
}
/* The Spot Mow buttons stay in view at the bottom while the window scrolls (desktop too). */
.spot-panel > .modal-actions { position: sticky; bottom: -14px; z-index: 2; margin-bottom: -14px; padding: 10px 0 14px; background: inherit; }
/* The scrolling box between a window's header and its buttons (winScroll in app.js): the window holds still,
   the box scrolls. */
.has-win-scroll { overflow: hidden !important; }
.win-scroll { flex: 1 1 auto !important; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  display: flex; flex-direction: column; scrollbar-width: none; }
.win-scroll::-webkit-scrollbar { display: none; }
.spot-panel > .win-scroll { gap: 10px; }
.spot-panel > .win-scroll > * { flex-shrink: 0; }
.layers-card > .win-scroll { gap: 12px; }
/* The licence banner (free trial / limited mode) sits in the map's bottom-right corner, out of the way of
   Ai Recover's bar and the alerts across the top (owner: it covered them) - and steps aside while
   Ai Recover's bar, or on a phone the alert above the button bar, is showing. */
#licBanner { top: auto; bottom: 14px; left: auto; right: 14px; transform: none; max-width: min(380px, calc(100% - 28px)); }
body:has(#recBanner:not(.hidden)) #licBanner { display: none; }
@media (max-width: 700px) {
  #licBanner { bottom: 10px; right: 10px; max-width: calc(100% - 20px); }
  body:has(#hudMsg:not([hidden])) #licBanner { display: none; }
}
/* Health → Battery: the chart (extras.js drawBattery). */
.bat-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 2px 0 10px; }
.bat-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: 12px;
  background: rgba(128, 128, 128, 0.08); border: 1px solid var(--p-line, rgba(148, 163, 184, 0.2)); }
.bat-tile b { font-size: 18px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.bat-tile span { font-size: 11.5px; color: var(--p-text-3, #94a3b8); }
.bat-chart { position: relative; border-radius: 14px; overflow: hidden; padding: 6px 4px 0;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.05), rgba(128, 128, 128, 0.03)); border: 1px solid var(--p-line, rgba(148, 163, 184, 0.2)); }
.bat-svg { display: block; width: 100%; height: 190px; touch-action: pan-y; }
.bat-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bat-band { fill: rgba(250, 204, 21, 0.14); }   /* (1.158.225) charging = amber, apart from the green line */
.bat-bolt { fill: #facc15; opacity: 0.9; }
.bat-grid { stroke: var(--p-line, rgba(148, 163, 184, 0.22)); stroke-width: 1; }
.bat-grid.day { stroke-dasharray: 2 4; opacity: 0.7; }
.bat-axis { fill: var(--p-text-3, #94a3b8); font-size: 10.5px; font-family: inherit; }
.bat-empty { fill: var(--p-text-3, #94a3b8); font-size: 14px; }
.bat-dot { stroke: #fff; stroke-width: 2; }
.bat-pulse { fill: #22c55e; opacity: 0.25; transform-box: fill-box; transform-origin: center; animation: bat-pulse 1.8s steps(6) infinite; }
@keyframes bat-pulse { 0% { transform: scale(0.5); opacity: 0.45; } 100% { transform: scale(1.8); opacity: 0; } }
.bat-cross { stroke: var(--p-text-3, #94a3b8); stroke-width: 1; stroke-dasharray: 3 3; }
.bat-hover { stroke: #fff; stroke-width: 2; }
.bat-tip { position: absolute; pointer-events: none; padding: 6px 9px; border-radius: 10px; font-size: 12px; line-height: 1.35; white-space: nowrap;
  background: rgba(13, 21, 40, 0.92); color: #e2e8f0; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.bat-tip[hidden] { display: none; }
.bat-tip b { font-size: 14px; }
.bat-tip .chg { color: #4ade80; font-weight: 600; }
.bat-tip span { color: #94a3b8; }
.bat-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bat-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-left: 6px; }
.bat-key.chg { background: rgba(250, 204, 21, 0.4); margin-left: 0; }
.bat-key.gap { background: repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.45) 0 2px, transparent 2px 5px); }
.bat-gapline { stroke: rgba(148, 163, 184, 0.22); stroke-width: 2; }
.bat-gaptext { opacity: 0.8; }
@media (max-width: 520px) { .bat-stats { grid-template-columns: repeat(3, 1fr); } .bat-tile b { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .bat-pulse { animation: none; } }
/* The setup guide's disclaimer: scrolls in its own box, Start waits for the tick. */
/* No scroll box of its own: it scrolls with the page (a box inside the scrolling page trapped the
   scroll, so the tick at the end couldn't be reached). The tick sits above the buttons instead. */
.su-terms { padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--p-line, #1e293b) 45%, transparent); font-size: 13px; line-height: 1.5; }
.su-terms p { margin: 0 0 10px; }
.su-terms p:last-child { margin-bottom: 0; }
.su-agree { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.su-agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--acc); }
/* Spot Mow: two switches side by side (laps first; Ai and dock) - the same width each. */
.spot-switch-pair { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: center; }
.spot-switch-pair.hidden-by-pattern { display: none; }
.spot-switch-pair .spot-switch { grid-column: auto; min-width: 0; line-height: 1.25; }
.su-agree-row { flex: none; padding: 10px 2px 0; border-top: 1px solid var(--p-line, #1e293b); margin-top: 8px; }
.su-agree-row[hidden] { display: none; }
.su-agree-row .set-note:empty { display: none; }
.su-agree-row .set-note { margin: 6px 0 0; }
/* (1.159.24) The box to tick beside its words, full size: a window's labels stack small and grey (.modal-card label),
   which put the disclaimer's tick above a line of small print. */
.modal-card label.su-agree { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600;
  color: var(--text); }
/* (1.159.24) A warning agreed to in the confirmation window (NoTurn): its box ticked before OK works. */
.ask-card .ask-agree { padding: 10px 2px 0; border-top: 1px solid var(--p-line, #1e293b); text-align: left; line-height: 1.4; }
.ask-card .ask-agree input[type=checkbox] { width: 20px !important; height: 20px !important; min-height: 0 !important;
  padding: 0 !important; margin: 1px 0 0 !important; flex: none; font-size: inherit; }
/* A lawn without a job on now: grey, no green glow (like the Mammotion app). */
path.lawn-area.idle { filter: none; }
#recSettingsCard[hidden] { display: none; }
.ly-card[hidden] { display: none; }
/* Spot Mow editor: the selected part's kind (outlined), and options that don't apply to it hidden. */
.spot-addkinds button.current { box-shadow: inset 0 0 0 2px #3b82f6; color: #fff !important; }
.spot-addkinds button.k-nogo.current { box-shadow: inset 0 0 0 2px #ef4444; }
.spot-slider.hidden-by-kind, .spot-switch-pair.hidden-by-kind, #spotSetBox.hidden-by-kind { display: none !important; }
/* The kind being added / the selected part's kind: the whole tile filled in its own colour, like
   No-go (owner: "highlight the whole icon … as its easier to see"). */
.spot-addkinds button[data-kind="area"][aria-pressed="true"], .spot-addkinds button[data-kind="area"].current {
  background: #d97706 !important; color: #fff !important; box-shadow: none; }
.spot-addkinds button[data-kind="line"][aria-pressed="true"], .spot-addkinds button[data-kind="line"].current {
  background: #9333ea !important; color: #fff !important; box-shadow: none; }
.spot-addkinds button[data-kind="whole"][aria-pressed="true"], .spot-addkinds button[data-kind="whole"].current {
  background: #16a34a !important; color: #fff !important; box-shadow: none; }
.spot-addkinds button.k-nogo[aria-pressed="true"], .spot-addkinds button.k-nogo.current {
  background: #dc2626 !important; color: #fff !important; box-shadow: none; }
.spot-addkinds button[aria-pressed="true"] svg, .spot-addkinds button.current svg { color: #fff !important; }
.spot-addkinds button { transition: none !important; }   /* the fill shows at once */
/* Delete: a button like the ones beside it (same height, background and border - owner: "the height
   must be the same as the edit button … ONLY the dustbin must have the red outline, not the box"),
   holding just a red-outlined dustbin. .btn-icon: the same, for other one-icon buttons (e.g. Queue). */
.btn-del-icon, .btn-icon { display: inline-flex; align-items: center; justify-content: center; flex: none;
  padding-left: 11px !important; padding-right: 11px !important; min-width: 0; }
.btn-del-icon .ic, .btn-icon .ic { width: 17px; height: 17px; margin: 0 !important; }
.btn-del-icon .ic { color: #ef4444; }
.btn-sm.btn-del-icon .ic, .btn-sm.btn-icon .ic { width: 15px; height: 15px; }   /* the same height as a small button with words */
.btn-del-icon:hover .ic { color: #dc2626; }
.spot-panel .modal-actions .btn-del-icon { flex: 0 0 auto !important; width: auto !important; }
/* Charging: the header battery fills up - a lighter bar sweeps from the level to full, again and again. */
#batteryBtn .ic .bat-flow { display: none; transform-box: fill-box; transform-origin: 0 50%; }
/* Charging (owner, 2026-10-07: "ANIMATE THIS BATTERY ICON" - the faint sweep didn't show on a 14 px icon):
   the fill grows from the level to full, strongly, again and again, and the bolt pulses. */
#batteryBtn.charging .ic .bat-flow { display: inline; animation: bat-flow 1.6s steps(4) infinite; }
@keyframes bat-flow { 0% { transform: scaleX(var(--lvl, 0.2)); opacity: .9; } 70% { transform: scaleX(1); opacity: .75; } 100% { transform: scaleX(1); opacity: 0; } }
/* A plain battery (owner, 2026-10-07: "remove the smiley face … just a plain one animated filling up until
   full then its solid green, and as the battery gets used it should drain"): no bolt; green, amber at
   30 %, red at 15 %; charging, the fill grows to the top again and again; full, solid green and still. */
#batteryBtn .ic .bat-bolt, #batteryBtn.charging .ic.lvl .bat-bolt { display: none !important; }
#batteryBtn #batIcon { color: #22c55e; }
html.theme-light #batteryBtn #batIcon { color: #16a34a; }
#batteryBtn #batIcon.lvl-warn { color: #f59e0b; }
#batteryBtn #batIcon.lvl-bad { color: #ef4444; }
html.theme-light #batteryBtn #batIcon.lvl-warn { color: #d97706; }
html.theme-light #batteryBtn #batIcon.lvl-bad { color: #dc2626; }
#batteryBtn.charging #batIcon.full .bat-flow { display: none; animation: none; }
/* (1.158.580, owner: "just take this and make it a chip" - the docking "Charging" picture) while it charges below 100 %
   the Battery chip is that picture made small: its battery (green outline, solid fill to the level, the lighter flow
   to full, the yellow bolt pulsing) in place of the little battery, the level in its green and "Full 2h 04m" under it.
   At 100 % (.bat-full, paintBattery) the plain chip again. (574-579's whole-chip fill is gone.) */
#batteryBtn .chip-cp { display: none; width: 30px; height: 15px; flex: none; overflow: visible; }
#batteryBtn.charging:not(.bat-full) .chip-cp { display: inline-block; }
#batteryBtn.charging:not(.bat-full) #batIcon { display: none; }
#batteryBtn.charging:not(.bat-full) #battery { color: #4ade80; }
html.theme-light #batteryBtn.charging:not(.bat-full) #battery { color: #16a34a; }
#batteryBtn .chip-cp .cp-body { fill: none; stroke: #4ade80; stroke-width: 3.2; }
#batteryBtn .chip-cp .cp-tip { fill: #4ade80; }
#batteryBtn .chip-cp .cp-fill { fill: #22c55e; transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(var(--lvl, .3)); }
/* (1.158.586: the animation back - 585's still chip didn't bring Brave's graphics back, so it wasn't the cause) */
#batteryBtn .chip-cp .cp-flow { fill: #86efac; transform-box: fill-box; transform-origin: 0 50%; animation: cp-flow 1.6s steps(4) infinite; }
#batteryBtn .chip-cp .cp-bolt { fill: #fde047; stroke: #0f172a; stroke-width: 1.4; stroke-linejoin: round;
  animation: cp-bolt 1.6s steps(4) infinite; transform-box: fill-box; transform-origin: 50% 50%; }
html.theme-light #batteryBtn .chip-cp .cp-body { stroke: #16a34a; }
html.theme-light #batteryBtn .chip-cp .cp-tip { fill: #16a34a; }
@media (prefers-reduced-motion: reduce) { #batteryBtn .chip-cp .cp-flow, #batteryBtn .chip-cp .cp-bolt { animation: none; } }
/* (a phone: five chips share one row - the picture's battery smaller, so the level and "2h 04m" keep their room) */
@media (max-width: 700px) {
  /* (1.158.581, owner: "on the phone the battery can be horizontal" -> "maybe vertical") upright like the plain battery
     (terminal on top); the bolt turned back so it still reads as a bolt; the turned box's sides given back */
  #batteryBtn .chip-cp { width: 22px; height: 11px; transform: rotate(-90deg); margin: 0 -4px; }
  #batteryBtn .chip-cp .cp-bolt { animation-name: cp-bolt-up; transform: rotate(90deg); }
}
@keyframes cp-bolt-up { 0%, 100% { transform: rotate(90deg) scale(1); } 50% { transform: rotate(90deg) scale(1.12); } }
/* Docked: a big battery filling up, near the top of the map, for ~5 s. */
.charge-pop { position: fixed; left: 50%; top: 18%; z-index: 1560; display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-radius: 18px; transform: translate(-50%, -8px) scale(.96); opacity: 0;
  background: rgba(15, 23, 42, 0.86); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(74, 222, 128, 0.35); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(34, 197, 94, 0.18);
  color: #e2e8f0; pointer-events: none; transition: opacity .35s ease, transform .35s ease; }
.charge-pop[hidden] { display: none; }
.charge-pop.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.charge-pop.out { opacity: 0; transform: translate(-50%, -8px) scale(.97); }
.charge-pop .cp-bat { width: 76px; height: 38px; flex: none; overflow: visible; }
.charge-pop .cp-body { fill: none; stroke: #4ade80; stroke-width: 2.6; }
.charge-pop .cp-tip { fill: #4ade80; }
.charge-pop .cp-fill { fill: #22c55e; transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(var(--lvl, .3)); }
.charge-pop .cp-flow { fill: #86efac; transform-box: fill-box; transform-origin: 0 50%; animation: cp-flow 1.6s steps(4) infinite; }
.charge-pop .cp-bolt { fill: #fde047; stroke: #0f172a; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(253, 224, 71, 0.7)); animation: cp-bolt 1.6s steps(4) infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes cp-flow { 0% { transform: scaleX(var(--lvl, .3)); opacity: .9; } 75% { transform: scaleX(1); opacity: .35; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes cp-bolt { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.charge-pop .cp-text { display: flex; flex-direction: column; gap: 2px; }
.charge-pop .cp-text b { font-size: 15px; color: #fff; }
.charge-pop .cp-text span { font-size: 22px; font-weight: 700; color: #4ade80; font-variant-numeric: tabular-nums; }
.charge-pop .cp-text small { font-size: 12px; color: rgba(255, 255, 255, 0.75); }   /* (1.158.576) "Full in about 1h 20m" */
html.theme-light .charge-pop .cp-text small { color: #475569; }
html.theme-light .charge-pop { background: rgba(255, 255, 255, 0.92); color: #0f172a; }
html.theme-light .charge-pop .cp-text b { color: #0f172a; }
html.theme-light .charge-pop .cp-text span { color: #16a34a; }
@media (prefers-reduced-motion: reduce) {
  .charge-pop .cp-flow, .charge-pop .cp-bolt { animation: none; }   /* (the header battery still moves: the owner asked for it) */
}

/* The bar's Stop only shows while something runs (hidden takes no space). */
#controls button[hidden] { display: none !important; }

/* Spot Mow's Cancel (forget a stopped mow), an icon on its own: solid red, white icon, in every theme
   (owner, 2026-10-06: the dark theme drew it green - "change it to red"). */
html #spotPanel .modal-actions button.spot-cancel-btn, html #spotPanel .modal-actions button.spot-cancel-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #f05252, #d62f2f) !important; border: 1px solid rgba(252, 165, 165, 0.45) !important;
  color: #fff !important; box-shadow: none !important; }
html #spotPanel .modal-actions button.spot-cancel-btn svg { color: #fff !important; }
html #spotPanel .modal-actions button.spot-cancel-btn:hover:not(:disabled) { filter: brightness(1.08) !important; }

/* Window titles: an icon badge in the theme's accent and tighter type (owner, 2026-10-06: "make them look
   more attractive"). Warnings (Mower Stuck, Theft Alarm, not activated) in red. */
.win-title { display: inline-flex; align-items: center; gap: 11px; min-width: 0; flex: none; }
.win-title > h2 { margin: 0; letter-spacing: -0.015em; font-weight: 750; line-height: 1.15; }
.modal-card > .win-title { margin-bottom: 4px; }        /* (a title straight in the card - Show on the map) */
.win-ic { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  color: var(--acc); background: color-mix(in srgb, var(--acc) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 32%, transparent), 0 1px 2px rgba(0, 0, 0, 0.12); }
.win-ic .ic { width: 18px; height: 18px; stroke-width: 2.1; }
.win-ic.warn { color: #ef4444; background: rgba(239, 68, 68, 0.13); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35); }
#askModal.ask-go .win-ic { color: #22c55e; background: rgba(34, 197, 94, 0.13); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35); }
html.theme-light #askModal.ask-go .win-ic { color: #16a34a; }
#askModal.ask-three .modal-actions { flex-wrap: nowrap; }
#askModal.ask-three .modal-actions > button { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
@media (max-width: 700px) {
  .win-title { gap: 9px; }
  .win-ic { width: 28px; height: 28px; border-radius: 9px; }
  .win-ic .ic { width: 16px; height: 16px; }
}

/* The camera window: its title like the others (badge + type) and, on a phone, the same fixed width as the Spot
   Mow window (owner, 2026-10-06: "the camera should get the same icon and fixed width"). */
.cam-title > span:last-child { font-size: 18px; font-weight: 750; letter-spacing: -0.015em; }
@media (max-width: 700px) {
  .cam-title > span:last-child { font-size: 16px; }
  .camera-panel:not(.maximized):not(.hidden) { left: 10px !important; right: 10px !important; width: auto !important;
    min-width: 0 !important; max-width: none !important; }
}

/* Ai Training (2026-10-07): the Seen list, the saved pictures (tap a box: Wrong / Right), the Wrong marks */
.train-model { margin: -2px 0 8px; font-size: 12.5px; color: var(--p-text-2, #a9b0bb); }
.train-model b { color: inherit; font-weight: 700; }
.train-sheet .tabs { margin-bottom: 8px; flex: none; }
.train-sheet .tabs .lt-badge:empty { display: none; }
.train-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--p-text-2, #a9b0bb); }
.train-seen { padding: 0; overflow: visible; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
/* Ai Training's Seen tab: a card a thing - its picture as wide as the card, the name and the buttons under it */
.train-seen .cs-row { flex-wrap: wrap; padding: 8px; gap: 8px; align-content: flex-start; }
.train-seen .cs-row img { flex: 1 1 100%; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 9px; }
.train-seen .cs-txt { font-size: 15px; }
.train-seen .cs-txt b { overflow-wrap: normal; }
/* (the list inside the camera view, family's: the buttons go under the name rather than squeeze it to a letter a line) */
.cam-seen .cs-row { flex-wrap: wrap; }
.cam-seen .cs-txt { min-width: 96px; }
.train-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.tp-card { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; background: rgba(127, 127, 127, 0.08); }
/* the picture's shape held before it loads (lazy pictures with no height never load); the boxes are % of it */
.tp-img { position: relative; border-radius: 9px; overflow: hidden; background: #000; line-height: 0; aspect-ratio: 4 / 3; }
.tp-img img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tp-box { position: absolute; padding: 0; margin: 0; min-height: 0; border: 2px solid #22c55e; border-radius: 4px;
  background: transparent; box-shadow: none; cursor: pointer; line-height: 1.2; }
.tp-box span { position: absolute; left: -2px; bottom: 100%; max-width: 160px; padding: 1px 5px; border-radius: 4px 4px 4px 0;
  font: 650 11px/1.35 system-ui, sans-serif; color: #fff; background: inherit; width: max-content; white-space: normal; overflow-wrap: anywhere; }
.tp-box.g-person { border-color: #ef4444; } .tp-box.g-person span { background: #ef4444; }
.tp-box.g-animal { border-color: #f59e0b; } .tp-box.g-animal span { background: #d97706; }
.tp-box.g-vehicle { border-color: #3b82f6; } .tp-box.g-vehicle span { background: #2563eb; }
.tp-box.g-object span { background: #16a34a; }
.tp-box.marked-wrong { border-style: dashed; border-color: #9ca3af; } .tp-box.marked-wrong span { background: #6b7280; }
.tp-box.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(0, 0, 0, 0.35); z-index: 2; }
.tp-meta { font-size: 11.5px; color: var(--p-text-2, #a9b0bb); }
.tp-act { display: flex; align-items: center; gap: 8px; }
.tp-act[hidden] { display: none; }
.tp-what { flex: 1; min-width: 0; font-size: 13px; }
.tp-what .cs-done, .tp-what .tp-right { display: block; font-size: 11.5px; font-weight: 650; }
.tp-right { color: #6fd497; }
.tp-act button { flex: none; min-height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 650; }
/* Wrong (a verdict against what it saw): red, as everywhere */
.cs-wrong.danger, .tp-act button.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.train-collect { margin-right: auto; }

/* GPU load (owner, 2026-10-08): every animation stops while the page is hidden (app.js sets lm-anim-idle; since
   1.158.656 not when the window is only out of focus - it is still on screen), and the endless pulses get their own layer, so their glow is drawn
   once and only scaled / faded by the GPU instead of redrawn every frame. */
html.lm-anim-idle *, html.lm-anim-idle *::before, html.lm-anim-idle *::after { animation-play-state: paused !important; }
#stateBtn.state-charging .ic, #stateBtn.state-mowing .ic, .activity-dot, .rec-banner .rec-dot { will-change: transform, opacity; }

/* ---- Maps in Spot Mow (2026-10-08): the mower's areas + their no-go zones, and paths (blue) ---- */
.map-section { margin-bottom: 6px; }
.map-section .sq-head .sub, .spot-list-head .sub { font-size: 12px; color: var(--p-muted, #94a3b8); font-weight: 400; margin-right: auto; margin-left: 8px; }
.spot-list-head { margin-top: 14px; justify-content: flex-start; }
.map-sync { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px;
  line-height: 1.35; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.35); color: #bfdbfe; }
.map-sync > span { flex: 1; }
.map-sync.done { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); color: #bbf7d0; }
.map-sync.failed { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: #fecaca; }
html.theme-light .map-sync { color: #1e3a8a; }
html.theme-light .map-sync.done { color: #14532d; }
html.theme-light .map-sync.failed { color: #7f1d1d; }
.spot-addkinds button.k-chan svg { color: #3b82f6; }
.spot-addkinds button.k-chan[aria-pressed="true"] { background: #2563eb !important; }
.spot-addkinds button.k-chan.current { box-shadow: inset 0 0 0 2px #3b82f6; }
.spot-sel.k-chan { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.4); }
.spot-sel.k-chan .spot-sel-dot { background: #3b82f6; }
/* (1.158.423) a guide line: LuLuMate's own, dashed gold (1.158.426) */
.spot-addkinds button.k-guide svg { color: #eab308; }
.spot-addkinds button.k-guide[aria-pressed="true"] { background: #ca8a04 !important; }
.spot-addkinds button.k-guide.current { box-shadow: inset 0 0 0 2px #fde047; }
.spot-sel.k-guide { background: rgba(250, 204, 21, 0.12); border-color: rgba(234, 179, 8, 0.5); }
.spot-sel.k-guide .spot-sel-dot { background: #fde047; }
/* A map isn't mowed from its editor: no Mow button, route stats or progress there. */
.spot-panel.map-mode #spotStart, .spot-panel.map-mode #spotStats, .spot-panel.map-mode #spotProgress,
.spot-panel.map-mode #spotEta { display: none !important; }
.spot-sel.k-own { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); }
.spot-sel.k-own .spot-sel-dot { background: #22c55e; }
/* No fill picked yet (or nothing to fill): the fill buttons all show unselected. */
#spotPatterns.none button[aria-checked="true"] { background: transparent; }
.spot-addkinds button { font-size: 11.5px !important; white-space: nowrap; letter-spacing: -0.01em; padding: 7px 1px 6px !important; }
.spot-addkinds button svg { width: 20px; height: 20px; }
.spot-addkinds button span { overflow: hidden; text-overflow: clip; max-width: 100%; }
@media (max-width: 460px) {   /* phones: "No-go line" breaks onto two lines; the row stays one row */
  .spot-addkinds button { font-size: 11px !important; padding: 6px 0 5px !important; }
  .spot-addkinds button span { white-space: normal; line-height: 1.05; text-align: center; overflow: visible; }
  .spot-addkinds button svg { width: 18px; height: 18px; }
}
/* A drawn path: as wide as the mower's own paths (the 3 px of .spot-poly made it thin; owner, 2026-10-08). */
.leaflet-container .spot-poly.spot-road { stroke-width: 8px; }
.leaflet-container .spot-poly.spot-road-centre { stroke-width: 2px; }
/* The themes pull a sheet's buttons up over the end of its scrolling part (margin-top -64px); with the
   disclaimer's agree tick there (setup guide, first-use disclaimer) that put the tick under the Start
   button (owner, 2026-10-08: clients couldn't set up). With the tick showing, the buttons go under it. */
html .su-agree-row:not([hidden]) + .modal-actions { margin-top: 0 !important; }
/* Settings: one look across every menu (owner, 2026-10-08: the Display → Map card's style).
   Options are switches; a longer label wraps beside the knob, which lines up with its first line.
   Every switch in a Settings card gets this, whatever other class it has (owner, 2026-10-11: "make the switches
   all look the same in the settings"). It was only for .set-switch: a switch without that class fell back to
   ".modal-card label" (a column: the knob above its words, centred, small text - Theft protection, Units,
   Home Assistant, Updates), and .vector-toggle (Display) had smaller words. */
#settingsModal .set-card label.spot-switch { margin: 8px 0 0; display: flex; flex-direction: row; align-items: flex-start;
  justify-content: flex-start; gap: 12px; text-align: left; font-weight: 600; font-size: 13.5px; line-height: 1.4; }
#settingsModal .set-card label.spot-switch .knob { margin-top: 1px; }
#settingsModal .set-card label.spot-switch .sub { display: block; font-weight: 400; font-size: 12.5px; opacity: .8; margin-top: 2px; }
/* Explanations are the tinted boxes (.hint): every "sub" note, plain notes without an id, and sub-notes.
   Live status lines (a set-note with an id: "Checking…", "Saved") stay plain text. */
#settingsModal p.set-note.sub, #settingsModal p.set-note:not([id]), #settingsModal p.sub-note {
  font-size: 12.5px; line-height: 1.45; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(37, 99, 235, 0.12); color: var(--muted, #94a3b8); }
html:not(.theme-light) #settingsModal p.set-note.sub, html:not(.theme-light) #settingsModal p.set-note:not([id]),
html:not(.theme-light) #settingsModal p.sub-note { background: var(--dk-accent-soft); color: var(--dk-text-2); }
html.theme-light #settingsModal p.set-note.sub, html.theme-light #settingsModal p.set-note:not([id]),
html.theme-light #settingsModal p.sub-note { background: var(--lt-accent-soft); color: var(--lt-text-2); }
#settingsModal p.set-note.sub:empty, #settingsModal p.set-note:not([id]):empty, #settingsModal p.sub-note:empty { display: none; }

/* Spot Mow's short confirmations ("Saved", "Saving…") as a pill in its header (owner, 2026-10-09). */
.spot-head .modal-msg:not(:empty) { display: inline-flex; align-items: center; flex: 0 1 auto; max-width: 60%;
  padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 18px; min-height: 0;
  color: #cbd5e1; background: rgba(148, 163, 184, .14); border: 1px solid rgba(148, 163, 184, .35); }
.spot-head .modal-msg.ok:not(:empty) { color: #4ade80; background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .45); }
html.theme-light .spot-head .modal-msg:not(:empty) { color: #475569; background: rgba(100, 116, 139, .10); border-color: rgba(100, 116, 139, .30); }
html.theme-light .spot-head .modal-msg.ok:not(:empty) { color: #15803d; background: rgba(34, 197, 94, .12); border-color: rgba(22, 163, 74, .40); }
/* (1.158.16) Something that did not work - a Save, a Delete - on a line of its own under the title, in full and in
   red: in the title row it was cut off after a few words ("Couldn't reach the mo…"). */
.spot-head:has(.modal-msg.err:not(:empty)) { flex-wrap: wrap; }
.spot-head .modal-msg.err:not(:empty) { display: block; flex: 1 0 100%; max-width: none; margin-left: 0; white-space: normal; overflow: visible; text-overflow: clip;
  color: #fecaca; background: rgba(239, 68, 68, .16); border-color: rgba(239, 68, 68, .5); line-height: 1.35;
  /* a box, not a pill: several lines in a fully rounded shape looked squeezed (owner, 2026-10-14) */
  border-radius: 10px; padding: 8px 12px; }
html.theme-light .spot-head .modal-msg.err:not(:empty) { color: #b91c1c; background: rgba(239, 68, 68, .10); border-color: rgba(220, 38, 38, .40); }
/* (1.158.922, owner, a "Switched — ..." message in the Schedules header cut off mid-word: "this shouldnt happen, i dont
   want text to be cut off") Any window's message that doesn't fit beside the title on one line goes on a line of its own
   under it, in full, as a box like the errors above - in its own colours. app.js headMsgsInFull measures it (.long). */
.title-row:has(> .modal-msg.long), .spot-head:has(> .modal-msg.long) { flex-wrap: wrap; }
.title-row > .modal-msg.long:not(:empty):not(#_lbl), .spot-head > .modal-msg.long:not(:empty):not(#_lbl) {
  display: block; flex: 1 0 100%; max-width: none; margin-left: 0; white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; text-align: left; line-height: 1.35; border-radius: 10px; padding: 8px 12px; }

/* Mow Settings: obstacle detection as a switch with its explanation box (owner, 2026-10-09). */
#cuttingModal .detect-row { display: flex; flex-direction: column; gap: 8px; }
#cuttingModal label.spot-switch.set-switch { display: flex; flex-direction: row; align-items: center; gap: 12px;
  font-weight: 600; font-size: 15px; }
#cuttingModal .detect-row .slider-row { margin: 0; }
#cuttingModal .detect-row .hint { margin: 0; font-size: 12.5px; line-height: 1.45; padding: 10px 12px; border-radius: 10px; }
html:not(.theme-light) #cuttingModal .detect-row .hint { background: var(--dk-accent-soft, rgba(37, 99, 235, .12)); color: var(--dk-text-2, #94a3b8); }
html.theme-light #cuttingModal .detect-row .hint { background: var(--lt-accent-soft, rgba(37, 99, 235, .10)); color: var(--lt-text-2, #475569); }

/* A control this mower doesn't have (a YUKA's blade height, set on the mower) - hidden, whatever the row's own display */
.slider-row.hidden, .spot-slider.hidden, label.hidden { display: none !important; }

/* ---- (1.158.31) The Mow window's two tabs: Whole areas (the mower's own job) / Spots & fills (LuLuMate) ---- */
.mow-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--p-line-strong, #334155);
  background: rgba(15, 22, 38, 0.55); }
.mow-tabs button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 6px;
  border: 0; border-radius: 9px; background: transparent; color: var(--p-text-2, #94a3b8); cursor: pointer; font: inherit; }
.mow-tabs button b { font-size: 14px; font-weight: 650; }
.mow-tabs button small { font-size: 11px; font-weight: 500; opacity: 0.85; }
.mow-tabs button.active { background: rgba(100, 116, 139, 0.42); color: #fff; }
html.theme-light .mow-tabs { background: rgba(255, 255, 255, 0.45); border-color: rgba(15, 23, 42, 0.14); }
html.theme-light .mow-tabs button { color: #64748b; }
html.theme-light .mow-tabs button.active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16); }
/* (1.158.487) both tabs alike: the Mammotion Mow tab is no longer dimmed more than LuLuMate Mow when not in use */
.mow-pane { display: flex; flex-direction: column; gap: 10px; }
.mow-pane[hidden] { display: none; }
.spot-saved-list .mow-whole-row .name { flex-direction: row; align-items: center; gap: 10px; text-align: left; }
.mow-whole-row .mow-name { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
/* (1.158.64) A picked area's row, in both lists: the yellow a picked area has on the map. No tick boxes. */
.spot-saved-list .spot-row.picked { border-color: rgba(250, 204, 21, 0.85); background: rgba(250, 204, 21, 0.13);
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2); }
.mow-whole-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; border-radius: 12px;
  border: 0; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.mow-whole-go .ic { width: 17px; height: 17px; }
.mow-whole-go:disabled { opacity: 0.45; cursor: not-allowed; }

/* an area being deleted: its row's buttons are off until the answer is in */
.spot-row.deleting button { cursor: progress; opacity: .5; }
/* ... and it shows that something is happening (owner: "its confusing and people think its doing nothing"):
   a turning ring where the dustbin was, and "Deleting…" under the name */
.spot-row.deleting .btn-del-icon { opacity: 1; }
.spot-row.deleting .btn-del-icon .ic { display: none; }
.spot-row.deleting .btn-del-icon::after { content: ""; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, .3); border-top-color: #ef4444; animation: btn-spin .8s linear infinite; }
.spot-row.deleting .name .sub { color: #f59e0b; font-weight: 600; }

/* Health -> Battery (1.158.217-218): tiles like Totals, then the charging settings as switch rows, a slider and
   two-column fields with the label above each box */
#hl-chg-card [hidden] { display: none !important; }
#hl-chg-card h3.hl-sub { margin: 18px 0 6px; font-size: 0.95em; }
#hl-chg-card #hl-chg-at { margin: 6px 0 0; }
#hl-chg-card label.spot-switch.ly-row { display: grid !important; grid-template-columns: 1fr 40px; column-gap: 14px;
  align-items: center; margin: 12px 0; padding: 0; }
#hl-chg-card .ly-row .knob { grid-column: 2; grid-row: 1; }
#hl-chg-card .ly-row .ly-text { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 3px; }
#hl-chg-card .ly-text b { font-size: 14px; }
#hl-chg-card .ly-text .sub { font-size: 12.5px; font-weight: 400; opacity: 0.7; line-height: 1.35; }
#hl-chg-card .chg-slider { display: block; margin: 12px 0; }
#hl-chg-card .chg-slider input { width: 100%; }
#hl-chg-card .chg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 14px; }
#hl-chg-card .chg-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
#hl-chg-card .chg-field > span { font-size: 0.85em; opacity: 0.75; }
#hl-chg-card .chg-field input { width: 100%; box-sizing: border-box; }
#hl-chg-card #hl-chg-none { margin-top: 12px; }
#hl-chg-card #cm-next { margin: 4px 0 18px; }
#hl-chg-card .set-row { margin-top: 18px; }   /* (1.158.227) the save buttons apart from what is above them */
#hl-chg-card #cm-msg, #hl-chg-card #hl-chg-msg { margin-top: 8px; }
@media (max-width: 420px) { #hl-chg-card .chg-grid { grid-template-columns: 1fr; } }

/* (1.158.441) garden patrol stops on the map */
.pt-stop-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.pt-stop-row .pt-name { flex: 1; min-width: 0; }
.pt-shots { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.pt-shots figure { margin: 0; width: 132px; }
.pt-shots img { width: 132px; height: 74px; object-fit: cover; border-radius: 6px; display: block; cursor: zoom-in; }
.pt-shots figcaption { font-size: 11px; opacity: .8; }
/* (1.158.566) the in-app picture viewer (patrol / theft pictures): over every window, with a Close button clear of
   the phone's notch; left/right step through the pictures */
#photoViewer { position: fixed; inset: 0; z-index: 6500; background: rgba(0,0,0,.92); display: flex;
  align-items: center; justify-content: center; touch-action: pan-y; }
#photoViewer.hidden { display: none; }
#photoViewer img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
#photoViewer .pv-btn { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
#photoViewer .pv-btn .ic { width: 22px; height: 22px; margin: 0; }
#photoViewer .pv-btn[hidden] { display: none; }
#photoViewer .pv-close { top: calc(env(safe-area-inset-top, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px); }
#photoViewer .pv-prev { left: calc(env(safe-area-inset-left, 0px) + 10px); top: 50%; transform: translateY(-50%); }
#photoViewer .pv-next { right: calc(env(safe-area-inset-right, 0px) + 10px); top: 50%; transform: translateY(-50%); }
#photoViewer .pv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  color: #fff; font-size: 14px; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; }
#photoViewer .pv-cap:empty { display: none; }
.lawn-thing { background: #0ea5e9; color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; font: 700 11px/1 system-ui, sans-serif; }
/* (1.158.450) the patrol stop drawing (map and list): all in its own SVG, nothing for a theme to restyle */
.pt-badge { display: inline-block; width: 26px; height: 26px; flex: none; line-height: 0; }
.patrol-stop-icon { background: none; border: 0; }
.pt-icon { display: block; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.45)); }
/* (1.158.452) the stop clicked on the map, lit for a moment in Settings -> Patrol */
@keyframes pt-flash { 0%, 40% { background: rgba(14,165,233,.28); } 100% { background: transparent; } }
.pt-stop-row.pt-flash { animation: pt-flash 1.8s ease-out; border-radius: 8px; }
/* (1.158.454) patrol on a phone: the stop list fits, the pin in the middle of the map, the bar at the bottom */
/* (1.158.455, owner: "rename button can be a pen ... all the buttons in one line and not wrapped") one line: the
   badge, the name, then the buttons; on a phone icons only. (1.158.922) A long name goes onto two lines beside them -
   never cut short with "…". */
.pt-stop-row { flex-wrap: nowrap; }
.pt-stop-row .pt-name { overflow-wrap: anywhere; }
.pt-stop-row .pt-acts { display: inline-flex; gap: 6px; flex: none; }
.pt-stop-row .pt-ib { display: inline-flex; align-items: center; gap: 6px; }
#pt-stops .pt-stop-row .btn.pt-ib.pt-on { color: #0ea5e9; border-color: #0ea5e9; }
/* (1.158.527, owner: "make this the same as the phone view where buttons are pics instead of words so it displays
   the whole content without cutting off") icons only at every width, so the stop's name has the room */
.pt-stop-row .pt-acts { gap: 4px; }
.pt-stop-row .pt-acts .btn { padding: 0; width: 34px; height: 34px; justify-content: center; }
.pt-stop-row .pt-lbl { display: none; }
@media (max-width: 560px) {
  .pt-shots figure, .pt-shots img { width: calc(50vw - 40px); }
  .pt-shots img { height: calc((50vw - 40px) * 0.56); }
}
.pt-centre-pin { position: absolute; left: 50%; top: 50%; z-index: 650; pointer-events: none;
  transform: translate(-50%, -100%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.pt-centre-pin .pc-body { fill: #0ea5e9; transition: fill .15s; }
.pt-centre-pin.bad .pc-body { fill: #ef4444; }
.pt-bar { position: fixed; left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 2500;
  max-width: 560px; margin: 0 auto; padding: 12px 14px; border-radius: 14px; background: rgba(24, 26, 30, .94);
  color: #f1f5f9; box-shadow: 0 6px 24px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 10px; }
.pt-bar[hidden] { display: none; }
.pt-bar-msg { margin: 0; font-size: 14px; line-height: 1.35; }
.pt-bar-ctl:empty { display: none; }
.pt-bar .pt-dir { width: 100%; height: 32px; }
.pt-bar-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pt-bar-btns .btn { min-height: 40px; padding: 8px 16px; }
/* (1.158.509) a press the server is still working on (app.js fetch wrapper): a spinner in place of the icon, the
   label says what is happening, no second press - in its own colour, not greyed */
button.net-busy, .btn.net-busy, [role="button"].net-busy { cursor: progress !important; pointer-events: none; }
button.net-busy:disabled, .btn.net-busy:disabled { opacity: 1 !important; filter: none !important; }
button.net-busy > svg.ic, .btn.net-busy > svg.ic, button.net-busy > svg, .btn.net-busy > .btn-spinner:not(.net-spin) { display: none; }
.net-spin { margin-right: 6px; vertical-align: -2px; }
button.net-busy > .net-spin:only-child { margin-right: 0; }
/* ... and any change still going after a moment: a thin moving bar along the top of the screen */
#netBusyBar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100000; pointer-events: none;
  overflow: hidden; background: rgba(34, 197, 94, 0.18); }
#netBusyBar::before { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; border-radius: 2px;
  background: #22c55e; animation: net-busy-run 1.1s ease-in-out infinite; }
@keyframes net-busy-run { from { left: -35%; } to { left: 100%; } }
/* (1.158.520, owner: "show the busy/planning indication when anything is changed like a new pattern is selected,
   noturn is switched basically anything that will take time to do") - the busy pill over the map: a route being
   worked out after a change, or work a change started that has no button or control left to show on */
#busyPill { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1440; pointer-events: none;   /* (under the Mow window: 1450 - it says Planning… itself) */
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(15, 23, 42, 0.9); color: #e2e8f0; font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
#busyPill[hidden] { display: none; }
#busyPill .btn-spinner { width: 14px; height: 14px; border-width: 2px; color: #22c55e; }
/* (light colours at the colour styles' own weight: each light style's generated rule, later in the page, wins) */
:where(html.theme-light) #busyPill { background: rgba(255, 255, 255, 0.96); color: #0f172a; }
html.theme-light #busyPill { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18); }
/* over an open window (Settings, Map layers: 1600; under the confirm box, 1700): the work its OK started shows there */
body:has(.modal:not(.hidden)) #busyPill { z-index: 1650; }
/* a phone: the Mow sheet open says Planning… itself - the pill only with the sheet rolled up or away */
@media (max-width: 700px) {
  #stage:has(#spotPanel:not(.hidden):not(.tucked):not(.collapsed)) #busyPill { display: none; }
}
/* the route on the map is the last settings' while the new one is worked out: faded */
#map.plan-stale path.plan-preview { opacity: 0.28 !important; transition: opacity 0.15s; }
/* the Mow window: Planning… with a spinner (by id: the colour styles restyle .spot-state), its figures faded, Mow waiting */
#spotState.planning { display: inline-flex; align-items: center; gap: 6px; background: rgba(34, 197, 94, 0.18); color: #86efac; }
html.theme-light #spotState.planning { background: rgba(22, 163, 74, 0.14); color: #15803d; }
#spotState.planning::before { content: ""; width: 9px; height: 9px; flex: none; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; animation: btn-spin 0.7s linear infinite; }
#spotPanel.plan-pending #spotStatsBox { opacity: 0.55; transition: opacity 0.15s; }
#spotStart.plan-wait { cursor: progress; }
#spotStart.plan-wait:disabled { opacity: 0.9 !important; filter: none !important; }
#spotStart.plan-wait > svg.ic { display: none; }
#spotStart.plan-wait::before { content: ""; display: inline-block; width: 15px; height: 15px; flex: none; margin-right: 6px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: btn-spin 0.7s linear infinite; vertical-align: -2px; }
/* the whole-area Mow settings: Planning… beside the title while its stripes are worked out */
#mowStartView #msTitle::after { content: "Planning…"; display: inline-flex; margin-left: 10px; padding: 1px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; vertical-align: 2px; background: rgba(34, 197, 94, 0.18); color: #86efac; visibility: hidden; }
/* (its room kept all the time: a long title wrapped and unwrapped under the finger as Planning… came and went) */
#mowStartView.planning #msTitle::after { visibility: visible; }
html.theme-light #mowStartView #msTitle::after { background: rgba(22, 163, 74, 0.14); color: #15803d; }
/* a switch, slider, list or field whose change the server is still working on: a small spinner beside it */
.net-ctl-spin { width: 12px; height: 12px; margin: 0 0 0 8px; border-width: 2px; vertical-align: -2px; color: #22c55e; }
#stage:has(#posBadge:not(.hidden):not(.on-header)) #busyPill { top: 52px; }
#stage.rec-on #busyPill { top: calc(20px + var(--rec-h, 44px)); }           /* (under the recovery banner, however tall) */
#stage.rec-on:has(#posBadge:not(.hidden):not(.on-header)) #busyPill { top: calc(60px + var(--rec-h, 44px)); }   /* (and the badge it moves down) */
@media (max-width: 700px) {   /* (with the camera open the banner sits at the bottom) */
  body:has(#cameraPanel:not(.hidden)) #stage.rec-on:not(:has(#posBadge:not(.hidden):not(.on-header))) #busyPill { top: 12px; }
}

/* ==========================================================================
   (sweeper) The YUKA sweeper kit - shown only on a mower that can sweep
   ========================================================================== */
/* The Job choice, the dumping interval and their notes, in the Mow window and the schedule editor: laid out like the
   form they're in (a <section>, so the form's first heading stays its first) */
.sweep-block { display: flex; flex-direction: column; gap: 10px; }
.sweep-block[hidden] { display: none; }
.sweep-block > * { flex-shrink: 0; }
.sweep-block .set-note, .sweep-block .mowstart-warn { margin: 0; }
.sweep-block .set-note.hidden, .sweep-block .mowstart-warn.hidden, .sweep-block .sched-grid.hidden { display: none; }
#ms-dump-sub, #pl-dump-sub { margin-top: -4px; }
#plSweepBlock .form-section { margin-top: 10px; }
#msSweepBlock:not([hidden]) ~ .form-section:first-of-type { margin-top: 10px; }
.sweep-speed-hint { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.3; color: var(--p-text-3); }
.sweep-speed-hint.hidden { display: none; }
/* Mow Settings: Dump / Close Bag is neutral (its Stop Brush takes red from its word, like every button) */
.blade-row .blade-start.sweep-act { border-color: var(--p-line-strong); color: var(--p-text); }
html.theme-light .blade-row .blade-start.sweep-act { border-color: rgba(15, 23, 42, 0.22); color: var(--p-text); }
#cutSweepRows .slider-range { max-width: 62%; text-align: right; }
/* The dumping spot on the map: a white badge, amber ring, the tipping bin */
.station-marker.dump-spot-marker { background: #fff; border-color: #f59e0b; color: #b45309; }
.station-marker.dump-spot-marker svg { width: 66%; height: 66%; }
/* Dumping spots in Spot Mow's editor (map.js dumpEd): the Dump Spot tile (amber-brown), the picked spot's bar, and the
   spot's badge - picked (a blue ring), being checked (faded, pulsing) or not checked yet (a dashed ring) */
.spot-addkinds button.k-dump svg { color: #b45309; }
.spot-addkinds button.k-dump[aria-pressed="true"] { background: #b45309 !important; }
.spot-addkinds button.k-dump.current { background: #b45309 !important; color: #fff !important; box-shadow: inset 0 0 0 2px #f59e0b; }
.spot-addkinds button.k-dump[hidden] { display: none; }
.spot-sel.k-dump { background: rgba(180, 83, 9, 0.1); border-color: rgba(180, 83, 9, 0.4); }
.spot-sel.k-dump .spot-sel-dot { background: #b45309; }
.leaflet-container .station-marker.dump-ed { cursor: grab; }
.leaflet-container .station-marker.dump-ed.leaflet-dragging, .leaflet-container .station-marker.dump-ed:active { cursor: grabbing; }
.station-marker.dump-ed.sel { box-shadow: 0 0 0 2.5px #2563eb, 0 1px 6px rgba(0, 0, 0, 0.5); }
.station-marker.dump-ed.checking { opacity: 0.55; animation: sab-tile 1.4s ease-in-out infinite; }
.station-marker.dump-ed.unchecked { border-style: dashed; }
/* six add tools on a phone: the words wrap onto two lines instead of being cut off */
@media (max-width: 430px) {
  .spot-addkinds.six button { white-space: normal; line-height: 1.1; }
  .spot-addkinds.six button span { white-space: normal; line-height: 1.05; text-align: center; overflow: visible; }
}

/* (1.158.549, owner picked mockup B: "bring it closer to how the mammotion mow card looks") the Spot Mow Settings box in
   sections like the Mammotion Mow window - Job, Pattern, Path, Safety, More options - with choices in place of switch pairs */
#spotSettings .spot-sec { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--acc); }
#spotSettings .spot-sec[hidden] { display: none; }
.spot-segrow { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.spot-segrow[hidden], .spot-segrow.hidden-by-pattern, .spot-segrow.hidden-by-kind { display: none !important; }
#spotSweepRow, #sc-spotSweepRow { gap: 10px; }   /* (sc-: the schedule's copy, 1.158.923) */
#spotSweepRow .spot-sec, #sc-spotSweepRow .spot-sec { margin: 0; }
.spot-seglabel { font-size: 12.5px; color: var(--p-text-2, #94a3b8); }
.spot-seg { grid-template-columns: repeat(3, 1fr); }
.spot-seg button { min-width: 0; overflow: hidden; line-height: 1.15; padding-left: 3px; padding-right: 3px; }
.spot-gap-warn { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #fbbf24; }
.spot-gap-warn[hidden] { display: none; }
html.theme-light .spot-gap-warn { color: #92400e; }
.spot-seg button[hidden] { display: none; }
.spot-more { grid-column: 1 / -1; margin-top: 2px; }
.spot-more[hidden] { display: none; }
.spot-more > summary .spot-more-sum { flex: 1; min-width: 0; text-align: right; font-size: 12px; font-weight: 500;
  color: var(--p-text-2, #94a3b8); overflow-wrap: anywhere; }
/* (1.158.942, owner: "on a phone just have this show More options") the hint beside it is for wider screens */
@media (max-width: 700px) { .spot-more > summary .spot-more-sum { display: none; } }
.spot-more .sched-more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spot-segbox { display: none !important; }   /* the unseen checkboxes behind the choices (their label's hidden = not offered) */
/* (1.158.553, owner: "More options can be cleaned up as its very untidy") the Mammotion Mow card's More options: each
   choice's name over its buttons, the buttons and the sliders the whole width */
#mowStartView .sched-more-body { display: flex; flex-direction: column; gap: 10px; }
#mowStartView .sched-more-body > .sched-label { margin-bottom: -4px; }
#mowStartView .sched-more-body > .sched-seg { width: 100%; box-sizing: border-box; }
#mowStartView .sched-more-body > .sched-grid { grid-template-columns: 1fr 1fr; }   /* NoGo laps and Start at on one line (owner) */
/* (1.158.553, owner: "this does not need to have so much padding on top") open, the stats box has no empty line over the
   chips: its arrow sits at the end of the chips' row */
.spot-statsbox { position: relative; }
.spot-statsbox[open] > summary { position: absolute; top: 4px; right: 0; padding: 0; }
.spot-statsbox[open] .spot-statssum { display: none; }
.spot-statsbox[open] > .spot-stats { padding-top: 0; padding-right: 24px; }

/* (723) LuLuMate Fleet's camera window: the page is only this window, and Fleet moves and sizes the frame around it */
html.fleet-cam, html.fleet-cam body { background: transparent !important; overflow: hidden; }
html.fleet-cam body > *:not(#cameraPanel) { display: none !important; }
/* (735) what the window's own buttons open: the list button's Ai Training Seen, and the questions it asks */
html.fleet-cam body > #trainModal:not(.hidden), html.fleet-cam body > #askModal.fleet-asked:not(.hidden) { display: flex !important; }
html.fleet-cam #cameraPanel { inset: 0 !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; min-width: 0; min-height: 0; transform: none !important; box-shadow: none !important; }

/* Show me around (724): covers the page, so only its own buttons can be pressed */
#tourBlock { position: fixed; inset: 0; z-index: 4000; }
#tourSpot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 2px #fff; pointer-events: none; transition: left 0.18s, top 0.18s, width 0.18s, height 0.18s; }
#tourCard { position: fixed; width: min(360px, calc(100vw - 24px)); max-width: none; margin: 0; transition: left 0.18s, top 0.18s; }
#tourCard small { opacity: 0.7; }
html.theme-light #tourCard { background: #fbfaf3 !important; }
html:not(.theme-light) #tourCard { background: #18202e !important; }
#tourCard { padding: 16px 18px; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; }
#tourCard .modal-actions { flex-direction: row; flex-wrap: nowrap; gap: 8px; margin-top: 0; justify-content: flex-end; }
#tourCard .modal-actions button { order: 0 !important; }
#tourClose { margin-right: auto; }
#tourCard .modal-actions button { flex: 0 1 auto; min-width: 0; padding: 8px 12px; min-height: 0; font-size: 14px; }
#tourCard h2 { margin: 4px 0 6px; }
#tourCard p { margin: 0 0 12px; }
html.fleet-cam #tourBlock { display: none; }

/* (1.158.725) a picked corner dot in the map editor, and the dustbin that deletes it */
.spot-vertex.picked:not(#_lbl) { box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 1px 4px rgba(0,0,0,.5); }
.spot-vertex .spot-vertex-del:not(#_lbl) { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: 38px; height: 38px; padding: 0; cursor: pointer; touch-action: manipulation; }
/* (1.158.725) another mower's lawn, sent by LuLuMate Fleet */
.leaflet-tooltip.map-ref-label { font-size: 12px; }
.leaflet-tooltip.map-ref-label::before { display: none; }

/* (1.158.786) patrol rounds: tabs over the schedule, and which stops each has */
.pt-rounds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pt-rounds .tab { flex: 0 1 auto; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line, rgba(127,127,127,.3)); border-radius: 9px; background: transparent; color: inherit; font-weight: 600; cursor: pointer; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.pt-rounds .tab.active { background: var(--acc); border-color: var(--acc); color: #fff; }
.pt-round-head { flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-round-name { flex: 1 1 170px; min-width: 0; display: flex; align-items: center; gap: 6px; }
.pt-round-name input { flex: 1; min-width: 0; }
.pt-round-stops { flex-wrap: wrap; }
.pt-round-stops .day-pill { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; padding-inline: 10px; white-space: normal; overflow-wrap: anywhere; }

/* (1.158.917) LuLuMate schedules: the reminder to switch the Mammotion ones; (1.158.919) the schedule's own copy of the Mow
   window's settings (#lmSetBox) - its section titles as #spotSettings' own */
.lm-set-host { margin: 4px 0 10px; }
.lm-per { margin: 6px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.lm-per[hidden] { display: none; }
.lm-per .ask-link { align-self: flex-start; margin: 0; padding: 2px 0; }
.lm-set-host[hidden] { display: none; }
.lm-set-box .spot-sec { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--acc); }
.lm-set-box .spot-sec[hidden] { display: none; }
/* (1.158.925) a switch in the schedule's copy looks as it does in the Mow window - knob and words on one line: the window's
   ".modal-card label" (a column, small grey words) put "Spiral out" under its knob */
.lm-set-box label.spot-switch { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; color: inherit; }
.sched-switch-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(14, 165, 233, 0.12);
  font-size: 13px; line-height: 1.45; }
.plan-switch { display: inline-flex; margin-top: 6px; font-size: 12.5px; padding: 6px 10px; }
.zone-badge.mam { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
html.theme-light .zone-badge.mam { color: #334155; }

/* The Mow window's buttons on a phone (1.159.9, owner 2026-11-15: "i don't want buttons wrapping and showing on the
   next line. Remove unnecessary buttons or change them to icons instead of text"): always one row - the main button
   keeps its words, Stop / Cancel and Close are their icons alone (their names stay as the tooltip and label). */
@media (max-width: 700px) {
  #spotPanel .modal-actions { flex-wrap: nowrap; gap: 8px; }
  #spotPanel .modal-actions > button { min-width: 0; }
  #spotPanel .modal-actions > button.secondary { flex: 0 1 auto; width: auto; padding-left: 14px; padding-right: 14px; }
  #spotPanel .modal-actions > #spotCancel, #spotPanel .modal-actions > #spotClose {
    flex: 0 0 52px !important; width: 52px !important; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 0; }
  #spotPanel .modal-actions > #spotCancel span, #spotPanel .modal-actions > #spotClose span { display: none; }
  #spotPanel .modal-actions > #spotCancel .ic, #spotPanel .modal-actions > #spotClose .ic { width: 20px; height: 20px; margin: 0 !important; }
}
/* (the smallest phones: Save is its icon too, so Start Mowing stays on one line) */
@media (max-width: 359px) {
  #spotPanel .modal-actions > #spotSave { flex: 0 0 52px !important; width: 52px !important; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 0; }
  #spotPanel .modal-actions > #spotSave span { display: none; }
  #spotPanel .modal-actions > #spotSave .ic { width: 20px; height: 20px; margin: 0 !important; }
}

/* Phones: a row of buttons never breaks onto a second line (1.159.9, owner 2026-11-15, a photo of the Mammotion
   account notice's "Later" alone under its main button: "Can you look through all phone versions and remove all
   wrapping of buttons"). Every window's buttons share one row: the second button is as wide as its word (not the
   112 px a computer gives it), the main button takes the rest. Rows with more buttons than words fit show icons. */
@media (max-width: 700px) {
  .modal-actions { flex-wrap: nowrap !important; gap: 8px; }
  .modal-actions > button { min-width: 0; }
  .modal-actions > button.secondary { flex: 0 0 auto; width: auto; padding-left: 16px; padding-right: 16px; }
  #licLock .modal-actions > #licLockPause, #licLock .modal-actions > #licLockDock, #licLock .modal-actions > #licLockStop {
    flex: 0 0 52px !important; width: 52px !important; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 0; }
  #licLock .modal-actions > #licLockGo { flex: 1 1 auto; }
  #licLock .modal-actions > #licLockPause > span, #licLock .modal-actions > #licLockDock > span, #licLock .modal-actions > #licLockStop > span { display: none; }
  #licLockPause .ic, #licLockDock .ic, #licLockStop .ic { width: 20px; height: 20px; margin: 0 !important; }
  #licLock .modal-actions > #licLockGo .auto-ic { display: none; }
  #theftModal .set-row { flex-wrap: nowrap; }
  #theftModal .set-row > .btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; justify-content: center; }
  .learn-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .learn-quick > span { grid-column: 1 / -1; }
  .learn-quick button { padding-left: 4px; padding-right: 4px; text-align: center; }
}
@media (max-width: 380px) {
  #theftModal .set-row > .btn { font-size: 13px; }
  #theftModal .set-row > .btn .auto-ic { display: none; }
}
@media (max-width: 700px) {
  /* The Mow window's area lists: the name and its details across the row, its buttons together on one line under
     them, on the right as on a computer (beside the name they left it a column a few words wide). */
  .spot-saved-list .spot-row > .name { flex: 1 1 100%; }
  .spot-saved-list .spot-row > .name + button { margin-left: auto; }
}
/* (the smallest phones: a little less padding and type, so the words of a window's buttons stay on one line) */
@media (max-width: 359px) {
  .modal-actions > button { padding-left: 10px; padding-right: 10px; font-size: 15px; }
  .modal-actions > button.secondary { padding-left: 12px; padding-right: 12px; }
  #askModal .modal-actions > #askOk .auto-ic { display: none; }
  #theftModal .modal-actions > #thm-off .auto-ic { display: none; }
  #theftModal .modal-actions > button.secondary { flex: 0 0 46px; width: 46px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; font-size: 0; }
  #theftModal .modal-actions > button.secondary .auto-ic { width: 20px; height: 20px; margin: 0 !important; }
  #licLock .modal-actions { gap: 6px; }
  #licLock .modal-actions > #licLockPause, #licLock .modal-actions > #licLockDock, #licLock .modal-actions > #licLockStop { flex-basis: 44px !important; width: 44px !important; }
  .mow-tabs button { padding-left: 4px; padding-right: 4px; }
  .mow-tabs button b { font-size: 13px; }
  .mow-tabs button small { font-size: 10.5px; }
  #th-mode > button { padding-left: 4px; padding-right: 4px; font-size: 12px; }
  .style-seg button { padding-left: 6px; padding-right: 4px; gap: 5px; font-size: 12px; }
}

/* (1.159.9) the rows that only show with real data, found by a second sweep: */
/* Seen by the Ai (the camera's list): the picture on the left; its name, then Name it and Wrong side by side under it
   (Wrong used to drop alone onto a line of its own). */
.cam-seen .cs-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; column-gap: 8px; row-gap: 6px; align-items: center; }
.cam-seen .cs-row > img { grid-column: 1; grid-row: 1 / span 2; }
.cam-seen .cs-row > .cs-txt { grid-column: 2 / -1; grid-row: 1; min-width: 0; }
.cam-seen .cs-row > .cs-undo { grid-column: 3; grid-row: 2; }
.cam-seen .cs-row > .cs-wrong { grid-column: 4; grid-row: 2; }
.cam-seen .cs-row > .cs-undo:not(.cs-name) { grid-column: 3 / -1; justify-self: end; }
/* Settings > About: Activate Licence / Check Now / Manage Subscription share one row (a wide-button rule took a row each). */
#lic-buttons { flex-wrap: nowrap; }
#lic-buttons > .btn { width: auto; flex: 1 1 auto; min-width: 0; }
/* The header's logo while the first row is full (fitHudRow). */
#portalLink.hud-squeezed { display: none !important; }
@media (max-width: 700px) {
  /* The setup guide's download links: "Mac" and "Windows" under "Download LuLuMate Setup". */
  #su-install .su-dl { flex-wrap: nowrap; }
  #su-install .su-dl .btn { flex: 1 1 0; min-width: 0; justify-content: center; padding-left: 12px; padding-right: 12px; }
  #su-install .su-dl .su-long { display: none; }
  /* Tabs that can outgrow a phone (a schedule's per-area settings, patrol rounds): one line that scrolls sideways. */
  #lm-per-tabs, .pt-rounds { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #lm-per-tabs::-webkit-scrollbar, .pt-rounds::-webkit-scrollbar { display: none; }
  #lm-per-tabs > *, .pt-rounds > * { flex: none; }
  /* A patrol round's name, Patrol This Round and its dustbin: one row, the name field takes what is left. */
  .pt-round-head { flex-wrap: nowrap !important; }
  .pt-round-head .pt-round-name { flex: 1 1 0; min-width: 0; font-size: 0; }
  .pt-round-head .pt-round-name input { font-size: 14px; width: 100%; min-width: 0; }
}


html[data-view-only] #controls [data-cmd],
html[data-view-only] #cuttingBtn,
html[data-view-only] #joystick,
html[data-view-only] #bladeBtn,
html[data-view-only] #aiBtn,
html[data-view-only] #schedulesBtn,
html[data-view-only] #spotBtn,
html[data-view-only] #learnBtn,
html[data-view-only] #findDockBtn,
html[data-view-only] #calibSmaller,
html[data-view-only] #calibBigger,
html[data-view-only] #recBannerStop,
html[data-view-only] #licBanner,
html[data-view-only] #licLockPause,
html[data-view-only] #licLockDock,
html[data-view-only] #licLockStop,
html[data-view-only] #spotAlertAct,
html[data-view-only] #mapApplyNow,
html[data-view-only] #mapDiscard,
html[data-view-only] #recModal,
html[data-view-only] #lightBtn,
html[data-view-only] #ly-add-pin,
html[data-view-only] #ly-patches-clear,
html[data-view-only] #ly-patches-mow,
html[data-view-only] #ly-lawn-clear,
html[data-view-only] #ly-lidar-clear,
html[data-view-only] #ly-rtk-clear,
html[data-view-only] .set-row:has(> #hl-blades-changed),
html[data-view-only] #settingsModal .tab[data-tab="alerts"],
html[data-view-only] #settingsModal .tab[data-tab="patrol"] {
  display: none !important;
}
html[data-view-only] #controls::before {
  content: "View only";
  align-self: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.75;
}
