/* BM Maasto – ulkoasu. Suuret kosketusalueet ja vahva kontrasti auringonvalossa. */

:root {
  --brand: #285836;      /* palkit ja päätoiminnot, valkoinen teksti */
  --brand-dark: #1c3f27;
  --green: #285836;      /* vihreä teksti ja korostukset */
  --green-soft: #e6efe8;
  --orange: #c4721f;
  --red: #b23a2e;
  --blue: #1d6fd1;
  --bg: #f6f7f5;
  --surface: #ffffff;
  --text: #17201a;
  --muted: #5d685f;
  --line: #d5dbd6;
  --shadow: 0 2px 10px rgba(0, 0, 0, .18);
  --radius: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2c6a40;
    --brand-dark: #23573a;
    --green: #6cc189;
    --green-soft: #1f3326;
    --bg: #111613;
    --surface: #1b221d;
    --text: #e9efea;
    --muted: #9eaaa1;
    --line: #2f3a32;
    --shadow: 0 2px 12px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body { display: flex; flex-direction: column; }

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

button, .button {
  min-height: 48px;
  padding: 6px 18px;
  line-height: 1.25;
  text-align: center;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  touch-action: manipulation;
}
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--brand); color: #fff; }
.primary:active { background: var(--brand-dark); }
.secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.danger { background: var(--surface); border-color: var(--red); color: var(--red); }
.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.big { min-height: 56px; font-size: 18px; padding: 0 24px; }
.icon { min-height: 48px; min-width: 48px; padding: 0; background: transparent; font-size: 26px; line-height: 1; }

/* yläpalkki */
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(6px + var(--safe-top)) 8px 6px;
  background: var(--brand);
  color: #fff;
  z-index: 1000;
}
.bar .icon { color: #fff; }
.hanke {
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  padding: 4px 12px;
}
.hanke .label { font-size: 11px; font-weight: 500; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
#hankeName { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sync { background: #fff; color: var(--text); padding: 0 12px; font-size: 14px; max-width: 46vw; }
.sync span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync .dot { width: 10px; height: 10px; border-radius: 50%; background: #999; flex: none; }
.sync.good .dot { background: var(--green); }
.sync.warn .dot { background: var(--orange); }
.sync.bad .dot { background: var(--red); }
.sync.busy .dot { background: var(--blue); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; } }

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff6e5;
  color: #4a3510;
  border-bottom: 1px solid #ecd9b0;
  font-size: 14px;
  z-index: 999;
}
.banner span { flex: 1; }
@media (prefers-color-scheme: dark) { .banner { background: #3a2f1a; color: #f3e3c3; border-color: #5a4a2a; } }

/* kartta */
main { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: #dfe5df; }
.gps {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 500;
  background: var(--surface);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  max-width: calc(100% - 90px);
}
.gps #gpsAcc { font-weight: 700; font-size: 15px; }
.gps #gpsCoord { font-variant-numeric: tabular-nums; color: var(--muted); }
.good { color: var(--green); }
.ok { color: var(--orange); }
.bad { color: var(--red); }
.round {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 500;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow);
}
.actions {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 500;
  display: flex;
  gap: 10px;
}
.actions .primary { flex: 1; box-shadow: var(--shadow); white-space: nowrap; padding: 0 12px; }
.actions button { white-space: nowrap; }
.actions .secondary { box-shadow: var(--shadow); }
.count { background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 1px 8px; font-size: 13px; }
.count:empty { display: none; }
.count.warn { background: #fbe7d1; color: #8a4b0d; }
.sync.good, .sync.warn, .sync.bad, .sync.busy, .sync.grey { color: #17201a; }
.leaflet-bottom.leaflet-right { margin-bottom: calc(76px + var(--safe-bottom)); }
.leaflet-container { font: inherit; }
.leaflet-container .leaflet-control-attribution { font-size: 11px; line-height: 1.35; max-width: 70vw; }
.popup strong { display: block; margin-bottom: 2px; }
.popup div { font-size: 13px; color: #444; }

/* sijainnin valinta kartalta */
.pick { position: absolute; inset: 0; z-index: 800; pointer-events: none; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--red); box-shadow: 0 0 0 1.5px #fff; }
.crosshair::before { left: 21px; top: 0; width: 2px; height: 44px; }
.crosshair::after { top: 21px; left: 0; height: 2px; width: 44px; }
.pickbar {
  pointer-events: auto;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(16px + var(--safe-bottom));
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
}
.pickbar .inline button { flex: 1; }

/* reitti GPS-laatikossa */
.gps .track {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  min-height: 28px; padding: 2px 0 0; margin: 0; border: 0; background: none;
  font-size: 13px; font-weight: 600; color: var(--text); text-decoration: underline dotted var(--muted);
}
.gps .track:empty { display: none; }
.gps .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite alternate; }

/* paluu avoimeen lomakkeeseen kartalta */
.returnbar { position: absolute; left: 50%; transform: translateX(-50%); top: 74px; z-index: 600; box-shadow: var(--shadow); white-space: nowrap; }

/* rajaustyökalu */
.draw { position: absolute; inset: 0; z-index: 900; pointer-events: none; }
.drawinfo {
  pointer-events: auto;
  position: absolute; left: 10px; right: 72px; top: 10px;
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px 12px; font-weight: 700; font-size: 15px;
}
.drawbar {
  pointer-events: auto;
  position: absolute; left: 10px; right: 10px; bottom: calc(12px + var(--safe-bottom));
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.drawbar .inline { flex-wrap: nowrap; gap: 8px; }
.drawbar .inline button { flex: 1 1 0; padding: 0 8px; white-space: nowrap; }
.drawbar .hint { margin: 0; font-size: 12px; }
.drawbar .active { background: var(--orange); color: #fff; border-color: var(--orange); }
#mapWrap.drawing .actions, #mapWrap.drawing .gps { display: none; }
#mapWrap.drawing .leaflet-bottom { margin-bottom: calc(196px + var(--safe-bottom)); }
.bm-vertex { border-radius: 50%; background: #fff; border: 3px solid #d62728; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.bm-vertex.first { border-color: #285836; }
.bm-vertex.last { background: #ffd6d2; }
.bm-vertex.selected { background: #d62728; transform: scale(1.25); }
.bm-vertex.mid { width: 14px !important; height: 14px !important; margin: -7px 0 0 -7px !important; border-width: 2px; opacity: .75; }

/* tasot */
.row.layer { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.row.layer .sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.swatch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: color-mix(in srgb, var(--c) 28%, transparent); border: 2.5px solid var(--c); color: var(--c);
  font-size: 15px; line-height: 1;
}
.swatch.point { border-radius: 50%; }
.check .swatch { width: 22px; height: 22px; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; }
.legend .hint { width: 100%; font-size: 13px; }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* paneelit */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.sheet[hidden] { display: none; }
.sheet > header {
  display: flex;
  align-items: center;
  padding: calc(4px + var(--safe-top)) 4px 4px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.sheet > header h2 { flex: 1; margin: 0; font-size: 19px; }
.sheet .body { flex: 1; overflow-y: auto; padding: 14px 16px 24px; -webkit-overflow-scrolling: touch; }
.sheet .foot {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sheet .foot:empty { display: none; }
.sheet .foot button { flex: 1; }
.sheet .foot .hint { flex: 1; margin: 0; }

/* lomake */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-weight: 600; font-size: 15px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 12px; }
.field.checkbox input { width: 26px; height: 26px; accent-color: var(--green); }
.req { color: var(--red); }
input[type=text], input[type=number], input[type=search], select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 17px; /* ≥16 px: iPhone ei zoomaa */
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--green) 35%, transparent); border-color: var(--green); }
.inline { display: flex; gap: 10px; flex-wrap: wrap; }
.inline > * { flex: 1 1 auto; }

.loc {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.loc .big { font-size: 20px; font-weight: 700; min-height: 0; padding: 0; }
.loc .coords { font-variant-numeric: tabular-nums; font-size: 15px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photos:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .remove {
  position: absolute; top: 4px; right: 4px;
  min-height: 34px; width: 34px; padding: 0;
  border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 22px;
}
.thumb .tag { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; }

.hint { color: var(--muted); font-size: 14px; }
.hint.small { font-size: 12px; }

/* projektin lomake (QGIS-ryhmät) */
details.grp { border: 1.5px solid var(--line); border-radius: var(--radius); margin: 0 0 14px; background: var(--surface); }
details.grp > summary {
  list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; gap: 8px; min-height: 48px;
}
details.grp > summary::-webkit-details-marker { display: none; }
details.grp > summary::before { content: "▸"; color: var(--green); transition: transform .15s; }
details.grp[open] > summary::before { transform: rotate(90deg); }
details.grp > .grp-body { padding: 0 14px 4px; }
details.grp.depth1, details.grp.depth2, details.grp.depth3 { background: var(--bg); border-width: 1px; }
details.grp.depth1 > summary, details.grp.depth2 > summary { font-size: 15px; padding: 10px 12px; }
.helptext { white-space: pre-wrap; font-size: 13px; line-height: 1.45; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
output.computed { display: block; padding: 10px 12px; border-radius: 10px; background: var(--green-soft); font-weight: 600; font-variant-numeric: tabular-nums; min-height: 44px; }
.req.soft { color: var(--orange); }
.multi { display: flex; flex-direction: column; gap: 2px; }
.inline.date input { flex: 1 1 60%; }
.inline.date button { flex: 0 0 auto; }
.field-photo:empty { display: none; }
.error { color: var(--red); font-size: 14px; }
.center { text-align: center; }

/* listat */
.rows { display: flex; flex-direction: column; gap: 6px; }
.row {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  min-height: 54px;
  padding: 8px 14px;
}
.row.selected { border-color: var(--green); background: var(--green-soft); }
.row.obs { display: flex; padding: 0; margin-bottom: 6px; align-items: stretch; }
.row.obs .main {
  flex: 1; display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 2px;
  justify-items: start; text-align: left; background: transparent; padding: 8px 12px; min-height: 58px;
}
.row.obs .icon { font-size: 22px; color: var(--blue); border-left: 1px solid var(--line); border-radius: 0; }
.row .time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.row .sub { grid-column: 2 / 4; font-size: 13px; font-weight: 400; color: var(--muted); }
.row .sub.error { color: var(--red); }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 700; align-self: center; }
.chip.lahetetty { background: var(--green-soft); color: var(--green); }
.chip.jonossa { background: #fbe7d1; color: #8a4b0d; }
.chip.virhe { background: #f6d8d4; color: var(--red); }
.grouphead { font-size: 14px; color: var(--muted); margin: 16px 2px 6px; }
.day { font-size: 14px; color: var(--muted); margin: 16px 2px 6px; text-transform: capitalize; }
.search { margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }

#menuView section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
#menuView h3 { margin: 10px 0 2px; font-size: 16px; }
#menuView p { margin: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 3000;
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
  font-size: 15px;
}

/* kartan työkalut (oikea reuna) */
.tools { position: absolute; right: 10px; top: 72px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.tool {
  position: relative;
  width: 62px; min-height: 58px; padding: 6px 2px 4px; flex-direction: column; gap: 2px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); border-radius: 14px;
  font-size: 11px; font-weight: 700; line-height: 1.1; hyphens: manual;
}
.tool svg { color: var(--green); }
.tool.has svg { color: #B3261E; }
#mapWrap.drawing .tools { display: none; }
.gps .near {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px; text-align: left;
  min-height: 32px; padding: 2px 0 0; margin: 0; border: 0; background: none;
  font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2;
}
.gps .near .ltdot { min-width: 22px; height: 22px; font-size: 12px; padding: 0 5px; }

/* luontotarkastelu: käyntipaikat */
.ltpin-wrap { background: none; border: 0; }
.ltpin {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 system-ui, sans-serif; color: #fff; white-space: nowrap;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: pointer;
}
.ltpin.p1 { background: #B3261E; }
.ltpin.p2 { background: #E8A33D; color: #1d1405; }
.ltpin.p3 { background: #4A7FB5; }
.ltpin.done { background: #6b7280; color: #fff; }
.ltdot {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px;
  font-weight: 700; font-size: 13px; color: #fff; background: #4A7FB5;
}
.ltdot.p1 { background: #B3261E; }
.ltdot.p2 { background: #E8A33D; color: #1d1405; }
.ltdot.p3 { background: #4A7FB5; }
.ltdot.done { background: #6b7280; color: #fff; }
.ltdot.big { min-width: 44px; height: 44px; border-radius: 22px; font-size: 20px; }
.row.place { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; }
.row.place .ltdot { grid-row: 1 / 4; }
.row.place .sub { grid-column: 2; }
.row.place.done { opacity: .75; }
.sub.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; }
.chip-btn { min-height: 38px; padding: 0 12px; border-radius: 19px; background: var(--surface); border: 1.5px solid var(--line); font-size: 14px; }
.chip-btn.on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.ltcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.ltcard p { margin: 0; }
.ltcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 17px; }
.ltprio { display: flex; gap: 14px; font-size: 14px; }
.ltprio .key { display: inline-flex; align-items: center; gap: 4px; }
.ltprio .ltdot { min-width: 22px; height: 22px; font-size: 12px; }
.ltbadges { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.ltbadges .big { font-weight: 700; font-size: 18px; min-height: 0; padding: 0; }
.ltstatus { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; }
.ltstatus.done { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.ltlist { margin: 0 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
#ltView h3 { margin: 14px 0 6px; font-size: 16px; }
.linkish { min-height: 40px; padding: 0; background: none; border: 0; color: var(--green); font-weight: 600; justify-content: flex-start; text-decoration: underline; }
p.big.ok { font-size: 18px; font-weight: 700; }

/* karttatasot */
.layerrow { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 4px 8px 6px 12px; margin-bottom: 8px; background: var(--surface); }
.layerrow.on { border-color: var(--green); }
.layerhead { display: flex; align-items: center; gap: 4px; }
.layerhead .check { flex: 1; min-width: 0; }
.layerhead .ltitle { display: flex; flex-direction: column; font-weight: 600; line-height: 1.2; }
.layerhead .gtag { font-size: 12px; font-weight: 400; color: var(--muted); }
.icon.small { min-height: 40px; min-width: 40px; font-size: 20px; color: var(--muted); }
.layerctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 4px 32px; }
.layerctl input[type=range] { flex: 1 1 140px; accent-color: var(--green); min-height: 32px; }
.layerctl .pct { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.layerctl select { min-height: 40px; padding: 4px 8px; font-size: 15px; width: auto; flex: 1 1 100%; }
.layerrow .hint.small { margin: 0 0 4px 32px; }

/* mitä uutta */
.news { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news:last-child { border-bottom: 0; }
.news h3 { margin: 0 0 4px; font-size: 17px; }
.news p { margin: 0 0 8px; }
.newsicon { width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 20px; }

@media (min-width: 760px) {
  .sheet { left: auto; width: 480px; box-shadow: var(--shadow); }
  .actions { right: auto; width: 420px; }
}

/* Kohdevalikko (suunnitelma, rajaus, käyntipaikka, havainto): tiedot ja Suunnista tänne */
.menu-popup .leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.35; }
.menu-popup .leaflet-popup-content-wrapper { border-radius: 12px; }
.fmenu { display: flex; flex-direction: column; gap: 6px; color: #17201a; }
.fmenu-title { font-size: 16px; }
.fmenu .hint { color: #5d685f; margin: 0; font-size: 13px; }
.fmenu-text { font-size: 13px; max-height: 6em; overflow: auto; }
.fmenu details summary { cursor: pointer; color: #285836; font-size: 13px; }
.props { display: grid; grid-template-columns: minmax(70px, auto) 1fr; gap: 2px 10px; margin: 0; font-size: 13px; max-height: 40vh; overflow: auto; }
.props dt { color: #5d685f; overflow-wrap: anywhere; }
.props dd { margin: 0; overflow-wrap: anywhere; }
.fmenu-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.fmenu-actions button { flex: 1 1 auto; min-height: 40px; }

/* Suunnistus */
.navmain { width: 100%; margin: 6px 0 4px; }
#navView .rows .row .title { font-weight: 500; }

/* Suunnitelmat */
.plancard .grp-body { padding: 0; }
.plancard details.grp { margin: 0; }
.plancard details.grp > .grp-body { padding: 0 10px 4px; }
.field.crs { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.field.crs.warn span { color: var(--orange); font-weight: 600; }
.field.crs select { min-height: 40px; }

/* Vienti */
.exportfmt { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.exportfmt label { display: grid; grid-template-columns: 26px 1fr; gap: 2px 8px; align-items: start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.exportfmt label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.exportfmt input { width: 22px; height: 22px; accent-color: var(--green); margin: 0; grid-row: span 2; }
.exportfmt .hint { grid-column: 2; margin: 0; }

/* Jaettu sijainti */
.peer-wrap { overflow: visible; }
.peer { position: absolute; transform: translate(-9px, -9px); display: flex; align-items: center; gap: 6px; white-space: nowrap; pointer-events: auto; }
.peerdot { width: 18px; height: 18px; border-radius: 50%; background: #e8590c; border: 3px solid #fff; box-shadow: 0 0 0 2px #e8590c, var(--shadow); }
.peername { background: rgba(255, 255, 255, .95); color: #17201a; border-radius: 10px; padding: 2px 8px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.peer.stale .peerdot { background: #9aa39c; box-shadow: 0 0 0 2px #9aa39c; }
.peer.stale .peername { color: #5d685f; font-weight: 500; }
.tool.on svg { color: #e8590c; }
.tool .badge { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: #e8590c; color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; }
.peerrow { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.peerrow:last-child { border-bottom: 0; }

.navtitle { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
