:root {
  --vfcc-ink: #15200f;
  --vfcc-green: #545d20;
  --vfcc-yellow: #fcc81c;
  --vfcc-light: #a6e781;
  --vfcc-paper: #ffffff;
  --vfcc-soft: #f5f8f1;
  --vfcc-line: #dfe6d9;
  --vfcc-muted: #5c6658;
  --vfcc-shadow: 0 12px 32px rgba(21, 32, 15, 0.10);
}

.vfcc-shell,
.vfcc-shell * { box-sizing: border-box; }
.vfcc-shell {
  position: relative;
  width: 100%;
  color: var(--vfcc-ink);
  font-family: inherit;
  background: var(--vfcc-paper);
  border: 1px solid #e4e9df;
  border-radius: 18px;
  box-shadow: var(--vfcc-shadow);
  overflow: hidden;
}
.vfcc-disabled,
.vfcc-map-error { padding: 18px; border: 1px solid #dfb638; background: #fff9e7; border-radius: 10px; }

.vfcc-hero {
  margin: 18px 18px 0;
  padding: 24px 26px;
  color: white;
  background: linear-gradient(135deg, #1c3916 0%, var(--vfcc-ink) 100%);
  border-radius: 14px;
}
.vfcc-kicker,
.vfcc-related-kicker,
.vfcc-panel-eyebrow,
.vfcc-dialog-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--vfcc-yellow);
  color: var(--vfcc-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.vfcc-hero h2 { margin: 10px 0 5px; color: white; font-size: clamp(25px, 3vw, 38px); line-height: 1.07; font-weight: 650; }
.vfcc-hero p { max-width: 860px; margin: 0; color: rgba(255,255,255,.9); font-size: 15px; line-height: 1.45; }

.vfcc-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  list-style: none;
  margin: 12px 18px;
  padding: 0;
}
.vfcc-steps li {
  display: grid;
  grid-template-columns: 27px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--vfcc-line);
  border-radius: 11px;
  background: var(--vfcc-soft);
}
.vfcc-steps li > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  background: #2e6b32;
  font-size: 12px;
  font-weight: 800;
}
.vfcc-steps strong { font-size: 13px; line-height: 1.2; }
.vfcc-steps small { color: var(--vfcc-muted); font-size: 11px; line-height: 1.25; }

.vfcc-public-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 18px 12px;
  padding: 12px 14px;
  border-left: 4px solid #d99e00;
  border-radius: 8px;
  background: #fff9e8;
  font-size: 13px;
}
.vfcc-public-notice strong { flex: none; }

.vfcc-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(270px, 1.6fr) minmax(260px, 1.5fr);
  gap: 12px 18px;
  margin: 0 18px;
  padding: 13px 14px;
  border: 1px solid var(--vfcc-line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #fbfcfa;
}
.vfcc-control-group { min-width: 0; }
.vfcc-action-controls { grid-column: 2 / 4; }
.vfcc-group-label,
.vfcc-region-control label {
  display: block;
  margin: 0 0 6px;
  color: #61715b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.vfcc-region-control select,
.vfcc-timebar select {
  width: 100%;
  min-height: 39px;
  padding: 6px 30px 6px 10px;
  border: 1px solid #cad4c5;
  border-radius: 8px;
  background: white;
  color: var(--vfcc-ink);
  font: inherit;
  font-size: 13px;
}
.vfcc-button-row { display: flex; flex-wrap: wrap; gap: 6px; }
.vfcc-layer-button,
.vfcc-base-button,
.vfcc-action-button,
.vfcc-timebar button {
  min-height: 37px;
  padding: 8px 12px;
  border: 1px solid #d1dacd;
  border-radius: 8px;
  color: var(--vfcc-ink);
  background: white;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.vfcc-layer-button:hover,
.vfcc-base-button:hover,
.vfcc-action-button:hover,
.vfcc-timebar button:hover { border-color: var(--vfcc-green); box-shadow: 0 3px 9px rgba(21,32,15,.08); transform: translateY(-1px); }
.vfcc-layer-button.is-active,
.vfcc-base-button.is-active {
  color: white;
  border-color: var(--vfcc-green);
  background: var(--vfcc-green);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.vfcc-layer-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.vfcc-pro-badge {
  display: inline-flex;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--vfcc-ink);
  background: var(--vfcc-yellow);
  font-size: 8px;
  font-weight: 900;
  vertical-align: middle;
}
.vfcc-layer-button.is-active .vfcc-pro-badge,
.vfcc-base-button.is-active .vfcc-pro-badge { box-shadow: 0 0 0 1px rgba(21,32,15,.25); }
.vfcc-layer-button.is-locked,
.vfcc-base-button.is-locked,
.vfcc-action-button.is-locked { border-style: dashed; }

.vfcc-timebar {
  display: grid;
  grid-template-columns: 38px 42px 38px minmax(180px, 320px) 1fr;
  gap: 7px;
  align-items: center;
  margin: 0 18px;
  padding: 8px 12px;
  border: 1px solid var(--vfcc-line);
  border-top: 0;
  background: #f7faf4;
}
.vfcc-timebar[hidden] { display: none !important; }
.vfcc-timebar span { color: var(--vfcc-muted); font-size: 11px; }

.vfcc-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 520px;
  margin: 0 18px;
  border: 1px solid var(--vfcc-line);
  overflow: hidden;
}
.vfcc-map-stage { position: relative; min-width: 0; background: #dce7d8; }
.vfcc-map { width: 100%; height: 520px; background: #dce7d8; }
.vfcc-status {
  position: absolute;
  z-index: 700;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 8px 11px;
  border: 1px solid rgba(21,32,15,.18);
  border-left: 4px solid #39763b;
  border-radius: 8px;
  color: var(--vfcc-ink);
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 14px rgba(21,32,15,.12);
  font-size: 11px;
  line-height: 1.3;
  pointer-events: none;
}
.vfcc-status.is-warning { border-left-color: #e1a400; background: rgba(255,249,230,.96); }
.vfcc-status.is-error { border-left-color: #b42318; background: rgba(255,238,236,.96); }

.vfcc-legend {
  position: absolute;
  z-index: 700;
  left: 10px;
  bottom: 10px;
  min-width: 175px;
  max-width: 260px;
  padding: 9px 11px;
  border: 1px solid rgba(21,32,15,.17);
  border-radius: 9px;
  color: var(--vfcc-ink);
  background: rgba(255,255,255,.95);
  box-shadow: 0 5px 15px rgba(21,32,15,.12);
  font-size: 10px;
}
.vfcc-legend[hidden] { display: none; }
.vfcc-legend strong { display: block; margin-bottom: 6px; font-size: 12px; }
.vfcc-legend-gradient { display: block; height: 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(21,32,15,.18); }
.vfcc-legend-temp { background: linear-gradient(90deg,#4b4cff,#1ab6ef,#59d36b,#f7e547,#ff9b31,#d7191c); }
.vfcc-legend-rain { background: linear-gradient(90deg,#eef8ff,#a9e1ff,#46a9ff,#1867d3,#7030a0); }
.vfcc-legend-wind { background: linear-gradient(90deg,#e6f5e8,#9bd28f,#f1d35a,#ef8f3c,#b21e2b); }
.vfcc-legend-clouds { background: linear-gradient(90deg,#ffffff,#dedede,#a7a7a7,#565656); }
.vfcc-legend-pressure { background: linear-gradient(90deg,#5237a0,#3977d6,#5ec5b4,#f0df67,#de7d3d); }
.vfcc-legend-labels { display: flex; justify-content: space-between; margin-top: 4px; color: var(--vfcc-muted); }
.vfcc-legend details { margin-top: 7px; }
.vfcc-legend summary { cursor: pointer; font-weight: 700; }
.vfcc-legend img { display: block; max-width: 100%; max-height: 150px; margin-top: 6px; }

.vfcc-weather-tile { image-rendering: auto; }
.vfcc-base-tile { filter: saturate(.72) contrast(.94) brightness(1.03); }

.vfcc-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: white;
  border-left: 1px solid var(--vfcc-line);
}
.vfcc-panel-close { display: none; }
.vfcc-panel-content { flex: 1; padding: 28px 20px 18px; }
.vfcc-panel-content h3 { margin: 9px 0 8px; font-size: 24px; line-height: 1.05; }
.vfcc-panel-content p { margin: 0 0 12px; color: #4d584a; font-size: 13px; line-height: 1.45; }
.vfcc-panel-eyebrow { background: #eef5e9; color: var(--vfcc-green); }
.vfcc-panel-skeleton { display: grid; gap: 8px; margin-top: 16px; }
.vfcc-panel-skeleton span { display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg,#edf1ea,#f8faf7,#edf1ea); background-size: 200% 100%; animation: vfcc-shimmer 1.2s linear infinite; }
.vfcc-panel-skeleton span:nth-child(2) { width: 82%; }
.vfcc-panel-skeleton span:nth-child(3) { width: 58%; }
@keyframes vfcc-shimmer { to { background-position: -200% 0; } }
.vfcc-weather-description { text-transform: capitalize; }
.vfcc-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin: 15px 0; }
.vfcc-metrics > div { padding: 9px; border: 1px solid var(--vfcc-line); border-radius: 8px; background: #fafcf8; }
.vfcc-metrics > div.is-highlight { border-color: #b08b00; background: #fff8d9; box-shadow: inset 3px 0 0 var(--vfcc-yellow); }
.vfcc-metrics span { display: block; color: var(--vfcc-muted); font-size: 10px; }
.vfcc-metrics strong { display: block; margin-top: 2px; font-size: 14px; }
.vfcc-coordinate-note { padding: 9px; border-radius: 7px; background: #f4f6f2; font-size: 10px !important; }
.vfcc-panel-actions { display: grid; gap: 7px; padding: 13px 17px 17px; }
.vfcc-primary-button,
.vfcc-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}
.vfcc-primary-button { color: var(--vfcc-ink) !important; background: var(--vfcc-yellow); }
.vfcc-secondary-button { color: var(--vfcc-ink) !important; border: 1px solid #e3bd29; background: #ffe57a; }
.vfcc-primary-button:hover,
.vfcc-secondary-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.vfcc-primary-button.is-disabled,
.vfcc-secondary-button.is-disabled { opacity: .5; pointer-events: none; }

.vfcc-agro-note,
.vfcc-source-strip {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 10px 18px 0;
  padding: 11px 13px;
  border-radius: 8px;
  background: #f0f7ec;
  font-size: 12px;
}
.vfcc-agro-note { border-left: 4px solid #65aa45; }
.vfcc-agro-note strong { min-width: 170px; }
.vfcc-agro-note span,
.vfcc-source-strip span { color: #4f5a4c; }
.vfcc-source-strip { margin-top: 8px; background: #f7f8f5; }
.vfcc-source-strip button { margin-left: auto; padding: 5px 9px; border: 0; border-bottom: 1px solid var(--vfcc-green); color: var(--vfcc-green); background: transparent; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }

.vfcc-related { margin: 25px 18px 18px; padding-top: 18px; border-top: 1px solid var(--vfcc-line); }
.vfcc-related-kicker { padding: 0; background: transparent; color: var(--vfcc-green); font-size: 10px; }
.vfcc-related h3 { margin: 5px 0 3px; font-size: 20px; }
.vfcc-related > p { margin: 0 0 13px; color: var(--vfcc-muted); font-size: 13px; }
.vfcc-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.vfcc-related-grid a { display: block; min-width: 0; padding: 13px; border: 1px solid var(--vfcc-line); border-radius: 10px; color: var(--vfcc-ink) !important; background: #fcfdfb; text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.vfcc-related-grid a:hover { transform: translateY(-2px); border-color: #9eab94; box-shadow: 0 7px 17px rgba(21,32,15,.08); }
.vfcc-related-grid span { display: block; color: var(--vfcc-muted); font-size: 10px; }
.vfcc-related-grid strong { display: block; margin: 3px 0; font-size: 14px; line-height: 1.2; }
.vfcc-related-grid small { display: block; color: #5c6658; font-size: 10px; line-height: 1.35; }

.vfcc-dialog-backdrop {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10,16,8,.58);
}
.vfcc-dialog-backdrop[hidden] { display: none !important; }
.vfcc-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: min(720px, 90vh);
  overflow: auto;
  padding: 27px;
  border-radius: 16px;
  color: var(--vfcc-ink);
  background: white;
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
}
.vfcc-dialog-close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #edf1ea;
  color: var(--vfcc-ink);
  font-size: 22px;
  cursor: pointer;
}
.vfcc-dialog h3 { margin: 12px 35px 8px 0; font-size: 25px; line-height: 1.1; }
.vfcc-dialog p,
.vfcc-dialog li { color: #4f5a4c; font-size: 13px; line-height: 1.45; }
.vfcc-dialog ul { margin: 12px 0 20px 18px; padding: 0; }
.vfcc-dialog .vfcc-primary-button { width: 100%; }
.vfcc-source-list { display: grid; gap: 8px; margin: 15px 0 0; }
.vfcc-source-list div { padding: 10px; border-radius: 8px; background: #f5f8f2; }
.vfcc-source-list dt { font-weight: 800; }
.vfcc-source-list dd { margin: 2px 0 0; color: #596455; font-size: 12px; }
body.vfcc-dialog-open { overflow: hidden; }

.vfcc-shell .leaflet-control-attribution { font-size: 9px; }
.vfcc-shell .leaflet-control-zoom a { color: var(--vfcc-ink); }

@media (max-width: 980px) {
  .vfcc-toolbar { grid-template-columns: 1fr 1fr; }
  .vfcc-region-control { grid-column: 1 / 2; }
  .vfcc-weather-controls { grid-column: 2 / 3; }
  .vfcc-base-controls { grid-column: 1 / 2; }
  .vfcc-action-controls { grid-column: 2 / 3; }
  .vfcc-map-layout { grid-template-columns: minmax(0,1fr) 270px; }
  .vfcc-related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .vfcc-shell { border-radius: 12px; }
  .vfcc-hero { margin: 10px 10px 0; padding: 19px 18px; }
  .vfcc-hero h2 { font-size: 25px; }
  .vfcc-hero p { font-size: 13px; }
  .vfcc-steps { margin: 9px 10px; gap: 6px; }
  .vfcc-steps li { grid-template-columns: 23px 1fr; padding: 8px; column-gap: 6px; }
  .vfcc-steps li > span { width: 21px; height: 21px; }
  .vfcc-steps strong { font-size: 11px; }
  .vfcc-steps small { display: none; }
  .vfcc-public-notice { margin: 0 10px 9px; flex-direction: column; gap: 3px; }
  .vfcc-toolbar { grid-template-columns: 1fr; margin: 0 10px; gap: 11px; padding: 10px; }
  .vfcc-region-control,
  .vfcc-weather-controls,
  .vfcc-base-controls,
  .vfcc-action-controls { grid-column: 1; }
  .vfcc-button-row { gap: 5px; }
  .vfcc-layer-button,
  .vfcc-base-button,
  .vfcc-action-button { flex: 1 1 auto; min-height: 40px; padding: 8px 10px; }
  .vfcc-timebar { grid-template-columns: 36px 40px 36px 1fr; margin: 0 10px; }
  .vfcc-timebar span { grid-column: 1 / -1; }
  .vfcc-map-layout { display: block; min-height: 510px; margin: 0 10px; position: relative; }
  .vfcc-map { height: 510px; }
  .vfcc-panel {
    position: absolute;
    z-index: 900;
    right: 8px;
    bottom: 8px;
    left: 8px;
    max-height: 72%;
    border: 1px solid var(--vfcc-line);
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(21,32,15,.24);
    transform: translateY(calc(100% + 20px));
    transition: transform .25s ease;
    overflow: hidden;
  }
  .vfcc-panel.is-open { transform: translateY(0); }
  .vfcc-panel::before { content: ''; display: block; width: 45px; height: 4px; margin: 8px auto 0; border-radius: 999px; background: #cbd3c7; }
  .vfcc-panel-close { display: grid; place-items: center; position: absolute; z-index: 2; top: 12px; right: 12px; width: 31px; height: 31px; border: 0; border-radius: 50%; color: var(--vfcc-ink); background: #edf1ea; font-size: 20px; cursor: pointer; }
  .vfcc-panel-content { padding: 20px 17px 11px; overflow: auto; }
  .vfcc-panel-content h3 { font-size: 21px; }
  .vfcc-panel-actions { position: sticky; bottom: 0; padding: 10px 13px 13px; background: white; }
  .vfcc-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vfcc-legend { bottom: 9px; max-width: 210px; }
  .vfcc-agro-note,
  .vfcc-source-strip { margin: 8px 10px 0; align-items: flex-start; flex-direction: column; }
  .vfcc-agro-note strong { min-width: 0; }
  .vfcc-source-strip button { margin-left: 0; }
  .vfcc-related { margin: 20px 10px 12px; }
  .vfcc-related-grid { grid-template-columns: 1fr; }
  .vfcc-dialog-backdrop { align-items: end; padding: 0; }
  .vfcc-dialog { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; padding: 24px 20px 20px; }
}

@media (max-width: 430px) {
  .vfcc-steps { grid-template-columns: 1fr; }
  .vfcc-steps li { grid-template-columns: 23px 1fr; }
  .vfcc-steps small { display: block; }
  .vfcc-map { height: 480px; }
  .vfcc-map-layout { min-height: 480px; }
  .vfcc-legend { max-width: 185px; }
}
.vfcc-metrics > div.is-locked-metric { background: #f7f8f5; }
.vfcc-metrics > div.is-locked-metric span em { display: inline-block; margin-left: 4px; padding: 1px 4px; border-radius: 999px; background: var(--vfcc-yellow); color: var(--vfcc-ink); font-size: 8px; font-style: normal; font-weight: 900; }
.vfcc-metrics > div.is-locked-metric strong { color: #6b7467; font-size: 11px; }
