/* Spots: the hills explorer, a hill's page, the hill editor (spots.js, editor.js) and
   Scouting (scouting.js). The app's tokens (base.css) throughout; the breakpoints are the
   site's: phone under 768 px, tablet 768 to 1099, computer from 1100. */

.hills .seal, .seal { color: var(--good); display: inline-flex; vertical-align: -2px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip[disabled] { opacity: 0.45; cursor: not-allowed; }
a.chip { text-decoration: none; }
a.chip:hover { text-decoration: none; }
.right { text-align: right; }
.flip-ic { transform: rotate(180deg); }
.hills .chip { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.hills .chip.on { background: var(--accent-soft); border-color: rgba(255, 90, 42, 0.55); color: var(--text); font-weight: 600; }
@media (hover: hover) {
  .hills .chip:not(.on):not([disabled]):hover { border-color: var(--text-3); color: var(--text); }
}
.hills :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hills :focus:not(:focus-visible) { outline: none; }
.hills .btn { touch-action: manipulation; }

/* placeholders: the shell's shimmer (.sk-line, app.css) sized for the hills' layouts */
.hsk { margin: 6px 0; }
.hsk.h10 { height: 10px; } .hsk.h12 { height: 12px; } .hsk.h16 { height: 16px; } .hsk.h18 { height: 18px; } .hsk.h26 { height: 26px; } .hsk.h40 { height: 40px; border-radius: 10px; margin: 0; }
.hsk.w30 { width: 30%; } .hsk.w40 { width: 40%; } .hsk.w60 { width: 60%; } .hsk.w70 { width: 70%; } .hsk.w80 { width: 80%; } .hsk.w90 { width: 90%; }
.hsk.chart { height: 100%; margin: 0; border-radius: 10px; }
.map-wait { background: linear-gradient(90deg, var(--card-2) 0%, #252c38 45%, var(--card-2) 90%) 0 0 / 220% 100% !important; animation: sk-shimmer 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .map-wait { animation: none; } }

/* map labels (a gate's dot and name; hillmap.js) */
.gate-label { display: flex; align-items: center; gap: 4px; transform: translate(-4px, -50%); white-space: nowrap; pointer-events: none; }
.gate-label i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid #fff; flex: none; }
.gate-label span { font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }

/* a hill's pin: a round head on a white stem, its tip on the hill's pin; orange once
   ridden, a tick when verified; the name shows for ridden, hovered and active pins */
.hx-pin { position: relative; width: 30px; height: 38px; cursor: pointer; }
.hx-pin::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 14px; margin-left: -1px; background: #fff; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.hx-pin-head { position: absolute; left: 2px; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #8e8e93; border: 2px solid #fff; display: grid; place-items: center; color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); transition: transform 0.15s ease-out, box-shadow 0.15s ease-out; transform-origin: 50% 146%; }
.hx-pin.ridden .hx-pin-head { background: var(--accent); }
.hx-pin-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.hx-pin-dot.small { width: 6px; height: 6px; }
.hx-pin-name { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 1px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 0 1px #000; pointer-events: none; display: none; }
.hx.named .hx-pin.ridden .hx-pin-name, .hx-pin.hot .hx-pin-name, .hx-pin.sel .hx-pin-name { display: block; }
.hx-pin.hot, .hx-pin.sel { z-index: 5; }
.hx-pin.hot .hx-pin-head { transform: scale(1.2); }
.hx-pin.sel .hx-pin-head { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(255, 90, 42, 0.45), 0 2px 8px rgba(0, 0, 0, 0.5); }
.scrub-dot { width: 14px; height: 14px; border-radius: 50%; background: #ff9f0a; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .hx-pin-head { transition: none; } }

/* --- the explorer ------------------------------------------------------------------ */
#view.hx-view { max-width: none; padding: 0; }
.hx { position: relative; overflow: hidden; height: 70vh; }
.hx .map.hx-map { height: 100%; min-height: 0; max-height: none; border-radius: 0; }
.hx-mappane { position: relative; min-height: 0; }
.hx-panel { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.hx-grab { flex: none; padding: 10px 16px 8px; }
.hx-grabber { display: none; }
.hx-top { display: flex; gap: 8px; align-items: center; }
.hx-search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; height: 40px; border-radius: 11px; background: var(--card-2); border: 1px solid transparent; color: var(--text-2); cursor: text; transition: border-color 0.15s; }
.hx-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; color: var(--text); font-size: 16px; outline: none; }
.hx-search input::-webkit-search-cancel-button { display: none; }
.hx-search:focus-within { border-color: rgba(255, 90, 42, 0.6); }
.hx-clear { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--text-3); color: var(--bg); cursor: pointer; }
.hx-clear[hidden] { display: none; }
.hx-add { width: 40px; min-height: 40px; height: 40px; padding: 0; flex: none; border-radius: 11px; }
.hx-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px 16px; }
.hx-filters { margin: 2px 0 6px; }
.hx-filters .chips { padding: 2px 0; }
.hx-country { position: relative; padding-right: 26px !important; }
.hx-country select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit; font-size: 13px; padding: 0; cursor: pointer; max-width: 46vw; }
.hx-country select option { background: var(--card); color: var(--text); }
.hx-country .ic:last-child { position: absolute; right: 9px; pointer-events: none; }
.hx-count { margin: 8px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.hx-count:empty { display: none; }
.hx-list { display: grid; }
.hx-row { display: grid; gap: 2px; width: calc(100% + 16px); margin: 0 -8px; padding: 10px 8px; text-align: left; background: none; border: 0; border-radius: 10px; color: var(--text); font: inherit; cursor: pointer; position: relative; transition: background 0.12s; }
.hx-row + .hx-row::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; height: 1px; background: var(--line); }
.hx-row.sel, .hx-row.sel + .hx-row { }
.hx-row.sel { background: var(--accent-soft); }
.hx-row.sel::before, .hx-row.sel + .hx-row::before, .hx-row.hot::before, .hx-row.hot + .hx-row::before { opacity: 0; }
.hx-row:active { background: var(--card); }
@media (hover: hover) {
  .hx-row:hover, .hx-row.hot { background: var(--card); }
  .hx-row.sel:hover { background: var(--accent-soft); }
}
.hx-row-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hx-row-head b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8e8e93; }
.hx-dot.ridden { background: var(--accent); }
.hx-warn { margin-left: auto; flex: none; font-size: 11px; color: var(--warn); }
.hx-sub { display: block; padding-left: 16px; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-counts { display: flex; gap: 12px; align-items: center; padding-left: 16px; margin-top: 3px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 0; }
.hx-counts > span { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.hx-counts .grow { flex: 1; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); }
.hx-skrow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hx-empty { padding: 36px 12px; }
.hx-empty p { margin: 0; max-width: 28em; }
.hx-foot { margin: 16px 0 4px; }
.hx-nomap { height: 100%; align-content: center; padding: 24px; }
.hx-nomap p { margin: 0; }
.hx-fail { padding: 16px; }
.hx-mapnote { display: none; gap: 8px; align-items: flex-start; margin: 4px 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 13px; color: var(--text-2); }
.hx-mapnote .ic { flex: none; margin-top: 2px; }
@media (max-width: 767px) { .hx-mapnote { display: flex; } }

/* the active hill's card */
.hx-card { padding: 2px 0 14px; animation: hc-in 0.2s ease-out; }
@keyframes hc-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hx-card { animation: none; } }
.hc-head { display: flex; gap: 10px; align-items: flex-start; }
.hc-head h2 { margin: 0; font-size: 21px; line-height: 1.2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hc-head p { margin: 2px 0 0; }
.hc-x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--card-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
@media (hover: hover) { .hc-x:hover { color: var(--text); background: #2a3242; } }
.hc-actions { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.hc-actions .btn { min-height: 36px; gap: 6px; }
.hc-road { margin-top: 10px; }
.hc-road p, .hc-roadline { margin: 0 0 6px; display: flex; align-items: center; gap: 5px; }
.hc-roadline { margin-top: 10px; }
.hc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; }
.hc-tile { min-width: 0; }
.hc-tile span { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.hc-tile b { display: block; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.hc-tile b .u { font-style: normal; font-size: 11px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.hc-tile small { display: block; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-tile .hsk { margin: 4px 0; }
.hc-chart { position: relative; height: 128px; margin-top: 6px; }
.hc-chart.tall { height: 190px; }
.hc-chart canvas { touch-action: pan-y; cursor: crosshair; }
.hc-grade { display: flex; gap: 12px; margin: 6px 0 0; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hc-planned { margin: 10px 0 0; }

/* the explorer on a phone: the map fills the screen, the list is a sheet over it */
@media (max-width: 767px) {
  .hx-mappane { position: absolute; inset: 0; }
  .hx-panel { position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 3; background: var(--bg-2);
    border-radius: 16px 16px 0 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.5);
    transform: translateY(55%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
  .hx-panel.dragging { transition: none; }
  .hx-grab { touch-action: none; cursor: grab; padding: 6px 16px 10px; user-select: none; -webkit-user-select: none; }
  .hx-grab:active { cursor: grabbing; }
  .hx-grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: 0.8; margin: 0 auto 8px; }
  .hx-scroll { flex: none; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .hx-panel.peek .hx-scroll { overflow: hidden; }
  .hx.nomap .hx-mappane { bottom: auto; height: 46%; }
  .hc-stats .hc-tile b { font-size: 16px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) { .hx-panel { transition: none; } }

/* beside the map from tablet width: the list is a column, the map fills the rest */
@media (min-width: 768px) {
  .hx { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
  .hx-panel { order: -1; border-right: 1px solid var(--line); }
  .hx-grab { padding: 14px 16px 10px; }
  .hx-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 2px 0 12px; }
  .hx-card[hidden] { display: none; }
}
@media (min-width: 1100px) {
  .hx { grid-template-columns: 400px minmax(0, 1fr); }
  .hx-grab { padding: 16px 20px 10px; }
  .hx-scroll { padding: 0 20px 20px; }
}

/* --- a hill ------------------------------------------------------------------------ */
#view.hl-view { max-width: 980px; }
.hl-mapcol { margin: -12px calc(-1 * var(--gutter)) 14px; }
.hl .map.hl-map { height: 44vh; min-height: 240px; max-height: 460px; border-radius: 0; }
.hl .no-card { flex-direction: column; gap: 4px; display: flex; align-items: center; justify-content: center; }
.hl-head { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px; }
.hl-head h1 { margin: 0; font-size: 26px; line-height: 1.2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hl-head p { margin: 3px 0 0; font-size: 14px; }
.hl-head .btn { flex: none; gap: 6px; }
.hl-note { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); font-size: 13px; margin: 0 0 12px; }
.hl-note .ic { color: var(--good); margin-top: 1px; }
.hl-roadline { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; }
.hl .block .hc-stats { margin-top: 0; }
.hl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; border: 1px solid rgba(255, 255, 255, 0.7); }
.hl-days { display: grid; }
.hl-days a { display: flex; align-items: center; gap: 10px; padding: 10px 6px; margin: 0 -6px; border-radius: 10px; color: var(--text); text-decoration: none; position: relative; transition: background 0.12s; }
.hl-days a + a::before { content: ""; position: absolute; left: 6px; right: 6px; top: 0; height: 1px; background: var(--line); }
.hl-days a b { display: block; font-weight: 600; font-size: 15px; }
.hl-days a small { display: block; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hl-days .chev { transform: rotate(180deg); color: var(--text-3); }
.hl-days a:active { background: var(--card-2); }
@media (hover: hover) { .hl-days a:hover { background: var(--card-2); text-decoration: none; } .hl-days a:hover + a::before { opacity: 0; } }
.hl-stamp { margin: 4px 2px 0; }
.hl-planned p { margin: 0; }
.hl .kv span { display: inline-flex; align-items: center; white-space: nowrap; flex: none; }
.hl .kv b { min-width: 0; }
@media (max-width: 359px) {
  .hc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
}
@media (min-width: 768px) {
  .hl-mapcol { margin: 0 0 16px; }
  .hl .map.hl-map { border-radius: var(--radius); height: 420px; }
}
/* a computer: the map on the left, held in view while the page scrolls */
@media (min-width: 1100px) {
  #view.hl-view { max-width: 1280px; padding-top: 16px; }
  .hl { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(400px, 1fr); gap: 24px; align-items: start; }
  .hl-mapcol { position: sticky; top: 72px; margin: 0; }
  .hl .map.hl-map { height: calc(var(--avail-h, 100vh) - 88px); min-height: 440px; max-height: 960px; }
}

/* --- the editor --------------------------------------------------------------------- */
#view.ed-view { max-width: none; padding: 0; }
body:has(.ed-view) { padding-bottom: 0; }
.ed { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head" "map" "ctl"; height: 80vh; overflow: hidden; }
.ed-head { grid-area: head; padding: 10px 16px 6px; min-width: 0; }
.ed-mapcol { grid-area: map; min-height: 0; position: relative; }
.ed-ctl { grid-area: ctl; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; background: var(--bg-2); border-top: 1px solid var(--line); min-width: 0; }
.ed-name { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; border-radius: 11px; background: var(--card-2); border: 1px solid transparent; color: var(--text-2); }
.ed-name input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; color: var(--text); font-size: 19px; font-weight: 600; outline: none; }
.ed-name input:disabled { color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1; }
.ed.ro .ed-name { background: transparent; padding-left: 0; }
.ed.ro .ed-name .ic { display: none; }
.ed-name:focus-within { border-color: rgba(255, 90, 42, 0.6); }
.ed-statusrow { display: flex; align-items: flex-start; gap: 10px; margin: 6px 2px 0; }
.ed-status { flex: 1; margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--text-2); min-height: 1.35em; }
.ed-status.on { color: var(--accent); }
.ed-undo { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--card-2); color: var(--text); border-radius: 999px; padding: 4px 10px 4px 8px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 30px; }
.ed-undo[hidden] { display: none; }
.ed-road { display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; color: var(--text-2); }
.ed-road b { color: var(--text); font-weight: 600; }
#edRoad[hidden] { display: none; }
.ed-mapwrap { position: relative; height: 100%; }
.ed .map.ed-map { height: 100%; min-height: 0; max-height: none; border-radius: 0; }
.ed-map .empty { height: 100%; align-content: center; }
.ed-cross, .ed-gate { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 2; }
.ed-cross svg, .ed-gate svg { display: block; overflow: visible; }
.ed-gate .hit { pointer-events: stroke; cursor: grab; touch-action: none; }
.ed-mapwrap.turning, .ed-mapwrap.turning .hit { cursor: grabbing; }
.ed-mapwrap.turning .ed-ring { stroke-opacity: 0.6; }
/* above Apple's logo and Legal link, which MapKit keeps in the bottom-left corner */
.ed-readout { position: absolute; left: 12px; bottom: 40px; z-index: 3; font-size: 13px; font-variant-numeric: tabular-nums; padding: 6px 11px; border-radius: 999px;
  background: rgba(18, 22, 29, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; }
.ed-readout:empty { display: none; }
.ed-width { position: absolute; right: 12px; bottom: 40px; z-index: 3; display: flex; gap: 8px; }
.ed-mbtn { width: 48px; height: 44px; border: 0; border-radius: 10px; display: grid; place-items: center; color: var(--text); cursor: pointer;
  background: rgba(30, 36, 48, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); touch-action: manipulation; }
.ed-mbtn:active { background: rgba(48, 56, 72, 0.95); }
.ed-turn[hidden], .ed-width[hidden], .ed-cross[hidden] { display: none; }
.ed-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ed-kind { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 0 6px; border: 0; border-radius: 11px; background: var(--card-2); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer; touch-action: manipulation; transition: background 0.15s, opacity 0.15s; }
.ed-kind span { overflow: hidden; text-overflow: ellipsis; }
.ed-kind .ed-kdot { flex: none; }
.ed-kind.done { background: rgba(52, 199, 89, 0.3); }
.ed-kind.on { background: var(--accent); color: #fff; }
.ed-kind.on .ed-kdot { background: #fff !important; }
.ed-kind:disabled { opacity: 0.45; cursor: not-allowed; }
@media (hover: hover) { .ed-kind:not(:disabled):not(.on):hover { background: #2a3242; } .ed-kind.done:not(:disabled):hover { background: rgba(52, 199, 89, 0.4); } }
.ed-count { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.ed-kdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ed-turn { display: flex; align-items: center; gap: 8px; }
.ed-turn input { flex: 1; min-width: 0; accent-color: var(--accent); height: 28px; }
.ed-tbtn { flex: none; width: 44px; height: 40px; border: 0; border-radius: 10px; background: var(--card-2); color: var(--text); display: grid; place-items: center; cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .ed-tbtn:hover, .ed-undo:hover { background: #2a3242; } }
.ed-cancel { flex: none; min-height: 40px; }
.ed-label { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.ed-label[hidden] { display: none; }
.ed-lines .chips { gap: 6px; }
.ed-chip { background: rgba(52, 199, 89, 0.14); border-color: rgba(52, 199, 89, 0.3); color: var(--text); }
.ed .ed-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ed-fields { display: flex; gap: 8px; align-items: center; }
.ed-fields input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.ed-fields input:focus { outline: 2px solid rgba(255, 90, 42, 0.5); border-color: transparent; }
.ed-fields .select { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; height: 40px; flex: none; }
.ed-fields .select select { font-size: 14px; padding-right: 20px; }
.ed-fields .select > .ic:last-child { right: 8px; }
#edFields:empty { display: none; }
.ed-keys { display: none; }
.ed-foot { display: none; }
.ed-save { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.ed-save:empty { display: none; }
.ed-save .ic { flex: none; margin-top: 1px; }
.ed-save.good { color: var(--good); }
.ed-save.bad { color: var(--bad); }
.ed-save.bad span { color: var(--text); }
.ed-save.quiet { color: var(--text-3); }
.ed-save .spinner.sm { flex: none; margin-top: 1px; }
.ed-dirty { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-top: 5px; }
.ed .hl-note { margin: 0; }
.ed-barsave { min-width: 68px; }
#edSave[hidden], .ed-barsave[hidden] { display: none; }
.btn.is-busy { opacity: 0.8; cursor: progress; }

/* the editor on a phone: Save in the top bar, the save line over the controls */
@media (max-width: 767px) {
  .ed-foot { display: block; }
  .ed-foot-btns { display: none; }
  .ed-ctl { gap: 8px; }
  .ed-lines .ed-label { display: none; }
  .ed-lines .chips { flex-wrap: nowrap; overflow-x: auto; }
  .ed.placing .ed-lines { display: none; }
  .ed-head { padding: 8px 12px 6px; }
}
@media (max-width: 400px) {
  .ed-kinds { gap: 4px; }
  .ed-kind { font-size: 13px; padding: 0 3px; gap: 3px; }
  .ed-count { padding: 0 4px; }
}
/* beside the map from tablet width: the map on the left, the controls a column */
@media (min-width: 768px) {
  .ed-barsave { display: none; }
  .ed { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "map head" "map ctl"; }
  .ed-head { padding: 16px 16px 4px; border-left: 1px solid var(--line); background: var(--bg-2); }
  .ed-ctl { border-top: 0; border-left: 1px solid var(--line); align-content: start; overflow-y: auto; padding: 10px 16px 16px; grid-template-rows: auto; }
  .ed-foot { display: grid; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
  .ed-foot-btns { display: flex; gap: 10px; justify-content: flex-end; }
  .ed-foot-btns .btn { flex: 1; }
  .ed-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-turn { flex-wrap: wrap; }
  .ed-turn input { flex-basis: 120px; }
  .ed-cancel { flex: 1 0 100%; }
}
@media (min-width: 1100px) {
  .ed { grid-template-columns: minmax(0, 1fr) 380px; }
  .ed-head, .ed-ctl { padding-left: 20px; padding-right: 20px; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 768px) { .ed-keys { display: block; } .ed.ro .ed-keys { display: none; } }

/* --- scouting ------------------------------------------------------------------------- */
#view.scouting { max-width: none; padding: 0; }
.sc-wrap { display: flex; flex-direction: column; height: 70vh; }
.sc-frame { position: relative; flex: 1; min-height: 0; background: #000; }
.sc-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; opacity: 0; transition: opacity 0.2s ease-out; }
.sc-frame iframe.in { opacity: 1; }
.sc-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.sc-loading p { margin: 0; }
.sc-wrap > .sc-loading { position: relative; height: 100%; }
.view.scouting .sc-estimate { flex: none; display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 9px 16px; font-size: 12px; line-height: 1.4; color: var(--text-2); border-top: 1px solid var(--line); background: var(--bg-2); }
.view.scouting .sc-estimate .ic { color: #ffd60a; margin-top: 1px; flex: none; }
.view.scouting .sc-ack { max-width: 560px; margin: 0 auto; padding: 32px 20px 28px; }
.sc-flag { color: var(--accent); display: block; }
.sc-kicker { margin: 14px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.view.scouting .sc-ack h1 { margin: 4px 0 8px; font-size: 26px; line-height: 1.2; }
.view.scouting .sc-points { display: grid; gap: 14px; margin: 18px 0; padding: 16px; }
.view.scouting .sc-points > div { display: flex; gap: 12px; align-items: flex-start; }
.view.scouting .sc-points span { color: var(--accent); width: 26px; flex: none; display: grid; place-items: center; }
.view.scouting .sc-points p { margin: 0; font-size: 15px; }
.sc-missing p { max-width: 30em; margin: 0; }
@media (min-width: 768px) {
  .view.scouting .sc-ack { padding-top: 64px; }
  .view.scouting .sc-ack .btn.wide { width: auto; min-width: 220px; }
  .view.scouting .sc-estimate { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .sc-frame iframe { transition: none; } }
/* clear of MapKit's zoom buttons, which a mouse-driven map shows bottom right */
@media (hover: hover) and (pointer: fine) { .ed-width { bottom: 64px; } }
