:root {
  --bg: #020712;
  --panel: rgba(6, 18, 37, 0.88);
  --panel-strong: rgba(7, 24, 47, 0.96);
  --line: rgba(38, 183, 239, 0.34);
  --line-bright: rgba(50, 221, 255, 0.82);
  --cyan: #22e3ff;
  --blue: #2e8cff;
  --amber: #ffc66d;
  --text: #d7f5ff;
  --muted: #6c98ab;
  --faint: #315266;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, select { font: inherit; }
button, select, input[type="range"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.dashboard-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(19, 113, 177, 0.27), transparent 38%),
    radial-gradient(circle at 5% 45%, rgba(1, 97, 148, 0.14), transparent 30%),
    radial-gradient(circle at 95% 64%, rgba(14, 83, 151, 0.14), transparent 34%),
    #020712;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.52;
  background-image:
    linear-gradient(rgba(24, 125, 174, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 125, 174, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.85) 76%, transparent 100%);
}

.dashboard-frame { width: min(1880px, 100%); margin: 0 auto; padding: 12px 24px 18px; position: relative; z-index: 1; }

.command-header {
  height: 78px;
  display: grid;
  grid-template-columns: 1fr minmax(520px, 1.75fr) 1fr;
  align-items: center;
  border-top: 1px solid rgba(34, 227, 255, 0.14);
  position: relative;
}

.command-header::after {
  content: "";
  position: absolute;
  left: 2%; right: 2%; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,227,255,.42) 20%, rgba(34,227,255,.82) 50%, rgba(34,227,255,.42) 80%, transparent);
  box-shadow: 0 0 15px rgba(34, 227, 255, 0.46);
}

.header-side { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.header-side div { display: flex; flex-direction: column; gap: 4px; }
.header-side b { color: #c9edf8; font-size: 13px; letter-spacing: .08em; }
.header-side small { font-size: 10px; letter-spacing: .05em; }
.system-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--cyan); background: rgba(10, 82, 116, .22); box-shadow: inset 0 0 14px rgba(34,227,255,.1), 0 0 12px rgba(34,227,255,.08); }
.header-right { justify-content: flex-end; text-align: right; }
.system-state { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(65,206,255,.28); padding: 6px 9px; color: #8addec; font-size: 10px; letter-spacing: .12em; }
.system-state i { width: 6px; height: 6px; border-radius: 50%; background: #50f3a8; box-shadow: 0 0 8px #50f3a8; }
.system-state.loading i { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 1s infinite; }
.system-state.demo i, .system-state.limited i { background: #ff9a5b; box-shadow: 0 0 8px #ff9a5b; }

.system-title { display: flex; align-items: center; justify-content: center; min-width: 0; text-align: center; }
.system-title > div { padding: 6px 26px 8px; min-width: 420px; border-bottom: 2px solid rgba(45, 189, 255, .7); background: linear-gradient(180deg, rgba(12,79,130,.1), rgba(13,91,145,.28)); box-shadow: inset 0 -10px 18px rgba(0,158,232,.08), 0 8px 24px rgba(0,0,0,.26); }
.system-title p { margin: 0 0 3px; color: #4aa9d2; font-size: 8px; letter-spacing: .36em; }
.system-title h1 { margin: 0; color: #cef7ff; font-weight: 500; font-size: clamp(19px, 1.65vw, 27px); letter-spacing: .16em; text-shadow: 0 0 8px rgba(102,222,255,.75), 0 0 22px rgba(27,142,221,.5); white-space: nowrap; }
.title-wing { flex: 1; height: 24px; border-top: 1px solid rgba(41,173,231,.42); position: relative; }
.title-wing::after { content: ""; position: absolute; top: 8px; width: 70%; height: 1px; background: linear-gradient(90deg, transparent, rgba(44,204,255,.78)); }
.title-wing.left { transform: skewX(35deg); border-left: 2px solid rgba(40,196,255,.5); }
.title-wing.left::after { right: 0; }
.title-wing.right { transform: skewX(-35deg); border-right: 2px solid rgba(40,196,255,.5); }
.title-wing.right::after { left: 0; transform: rotate(180deg); }

.data-alert { border: 1px solid rgba(255,172,83,.32); background: rgba(108,61,20,.3); color: #ffd195; padding: 7px 12px; margin-top: 9px; font-size: 11px; letter-spacing: .03em; }

.tech-panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(36, 194, 255, .16) 0 1px, transparent 1px) top left / 30px 30px no-repeat,
    linear-gradient(-135deg, rgba(36, 194, 255, .16) 0 1px, transparent 1px) top right / 30px 30px no-repeat,
    linear-gradient(315deg, rgba(36, 194, 255, .12) 0 1px, transparent 1px) bottom right / 30px 30px no-repeat,
    linear-gradient(45deg, rgba(36, 194, 255, .12) 0 1px, transparent 1px) bottom left / 30px 30px no-repeat,
    linear-gradient(180deg, rgba(8, 28, 53, .94), rgba(4, 14, 29, .9));
  box-shadow: inset 0 0 26px rgba(21, 135, 205, .075), 0 10px 34px rgba(0, 0, 0, .2);
}
.tech-panel::before, .tech-panel::after { content: ""; position: absolute; z-index: 3; pointer-events: none; }
.tech-panel::before { left: -1px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(transparent, var(--cyan), transparent); opacity: .6; }
.tech-panel::after { top: -1px; left: 17px; width: 74px; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); box-shadow: 0 0 9px rgba(34,227,255,.65); }

.overview-strip { display: grid; grid-template-columns: .9fr 1.75fr .85fr; gap: 14px; margin: 14px 0; }
.overview-total, .overview-gauge { min-height: 146px; padding: 22px 24px; }
.metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-label { color: #7fb3c6; font-size: 12px; letter-spacing: .14em; }
.period-switch { flex: 0 0 auto; display: flex; border: 1px solid rgba(47,139,175,.28); background: rgba(4,20,38,.42); }
.period-switch button { min-width: 35px; border: 0; border-right: 1px solid rgba(47,139,175,.2); padding: 4px 7px; background: transparent; color: #47768a; font-size: 8px; cursor: pointer; }
.period-switch button:last-child { border-right: 0; }
.period-switch button:hover { color: #a7e8f4; }
.period-switch button.active { color: #d5faff; background: rgba(23,132,177,.34); box-shadow: inset 0 0 9px rgba(34,227,255,.11); }
.overview-total strong { display: block; margin: 13px 0 5px; color: #e1fbff; font-family: "Bahnschrift", "DIN Alternate", Arial, sans-serif; font-size: clamp(34px, 3.15vw, 52px); line-height: 1; letter-spacing: .06em; text-shadow: 0 0 12px rgba(100,229,255,.62); }
.overview-total strong small { color: #87cfde; font-size: 15px; letter-spacing: .04em; }
.overview-total p { color: #557d90; margin: 0 0 15px; font-size: 10px; }
.energy-line { height: 5px; background: rgba(86, 142, 162, .15); position: relative; overflow: hidden; }
.energy-line i { display: block; height: 100%; background: linear-gradient(90deg, #116bae, var(--cyan)); box-shadow: 0 0 8px var(--cyan); transition: width .3s ease; }

.overview-matrix { display: grid; grid-template-columns: repeat(4, 1fr); min-width: 0; }
.matrix-cell { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 18px 20px; border-right: 1px solid rgba(45,150,191,.18); position: relative; }
.matrix-cell:last-child { border-right: 0; }
.matrix-cell::before { content: ""; position: absolute; left: 20px; right: 20px; bottom: 11px; height: 1px; background: linear-gradient(90deg, rgba(34,227,255,.4), transparent); }
.matrix-cell span { color: #5f91a7; font-size: 10px; letter-spacing: .08em; }
.matrix-cell b { color: #d5f7ff; margin: 11px 0 7px; font-size: clamp(20px, 1.75vw, 30px); font-weight: 500; font-family: "Bahnschrift", Arial, sans-serif; }
.matrix-cell b small { color: #5f93a8; font-size: 10px; font-family: inherit; }
.matrix-cell em { color: #365e73; font-size: 9px; font-style: normal; }

.overview-gauge { display: flex; align-items: center; justify-content: center; gap: 18px; }
.gauge { width: 92px; height: 92px; border-radius: 50%; padding: 7px; box-shadow: 0 0 20px rgba(34,227,255,.12); transition: background .3s; }
.gauge > div { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; border-radius: 50%; background: #071326; box-shadow: inset 0 0 16px rgba(20,120,180,.2); }
.gauge strong { color: #ddfbff; font: 500 23px "Bahnschrift", Arial, sans-serif; }
.gauge small { display: block; color: #517b90; font-size: 8px; margin-top: 2px; }
.gauge-copy { min-width: 112px; }
.gauge-copy > span { color: #628fa2; font-size: 10px; }
.gauge-copy > b { display: block; color: #eefcff; margin: 8px 0 5px; font: 500 29px "Bahnschrift", Arial, sans-serif; }
.gauge-copy > b small { color: #749bac; font-size: 11px; }
.gauge-copy p { margin: 0; color: #3f6b7f; font-size: 9px; }

.dashboard-grid { display: grid; grid-template-columns: 310px minmax(520px, 1.45fr) minmax(340px, .82fr); grid-template-rows: 410px 320px; gap: 14px; }
.control-panel { grid-column: 1; grid-row: 1 / 3; min-width: 0; }
.map-panel { grid-column: 2; grid-row: 1; min-width: 0; padding-bottom: 11px; }
.weather-panel { grid-column: 3; grid-row: 1; min-width: 0; }
.trend-panel { grid-column: 2; grid-row: 2; min-width: 0; }
.decision-panel { grid-column: 3; grid-row: 2; min-width: 0; }

.panel-title { height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 0 17px; border-bottom: 1px solid rgba(39, 176, 229, .2); background: linear-gradient(90deg, rgba(17,89,138,.24), rgba(9,31,57,.05)); position: relative; z-index: 5; }
.panel-title::after { content: ""; position: absolute; left: 18px; bottom: -1px; width: 112px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); box-shadow: 0 0 8px rgba(34,227,255,.6); }
.panel-title > div:first-child { display: flex; align-items: center; min-width: 0; }
.panel-index { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 9px; border: 1px solid rgba(34,227,255,.35); color: #2bbce7; font-size: 8px; background: rgba(18,99,140,.2); }
.panel-title h2 { margin: 0; color: #b9e8f5; font-size: 13px; font-weight: 500; letter-spacing: .08em; white-space: nowrap; }
.chip { color: #4b8ba4; border: 1px solid rgba(46,151,190,.22); padding: 4px 7px; font-size: 7px; letter-spacing: .12em; white-space: nowrap; }
.chip.live { color: #65cfe2; }
.chip.live i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: #56f0aa; box-shadow: 0 0 6px #56f0aa; }

.control-body { padding: 18px; }
.field-control { display: block; min-width: 0; }
.field-control > span { display: flex; justify-content: space-between; margin: 0 0 7px; color: #6d9caf; font-size: 10px; letter-spacing: .06em; }
.field-control > span b { color: var(--cyan); }
.field-control.full { margin-bottom: 15px; }
.control-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px; margin-bottom: 16px; }
select, input[type="number"] { width: 100%; height: 36px; border: 1px solid rgba(51,142,177,.34); border-radius: 0; background: rgba(3, 14, 28, .82); color: #cceef6; padding: 0 10px; outline: 0; }
select { color-scheme: dark; }
select:hover, input[type="number"]:hover, select:focus, input[type="number"]:focus { border-color: rgba(34,227,255,.72); box-shadow: inset 0 0 14px rgba(34,227,255,.06); }
.unit-input { display: flex; align-items: center; border: 1px solid rgba(51,142,177,.34); background: rgba(3,14,28,.82); }
.unit-input input { border: 0; background: transparent; }
.unit-input i { padding: 0 9px; color: #5e8ea2; font-size: 10px; font-style: normal; }
.range-control { margin: 0 0 16px; }
input[type="range"] { width: 100%; height: 4px; accent-color: var(--cyan); }
.advanced-toggle { width: 100%; height: 38px; display: flex; justify-content: space-between; align-items: center; border: 0; border-top: 1px solid rgba(52,145,181,.2); border-bottom: 1px solid rgba(52,145,181,.2); background: transparent; color: #729caf; font-size: 10px; }
.advanced-toggle b { color: var(--cyan); font-size: 16px; font-weight: 400; }
.advanced-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 11px 0 0; }
.advanced-grid label span { display: block; color: #4f7d91; font-size: 8px; margin-bottom: 4px; }
.advanced-grid input { height: 31px; padding: 0 6px; }
.primary-action { width: 100%; height: 41px; margin: 16px 0 14px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid rgba(34,227,255,.68); background: linear-gradient(90deg, rgba(13,107,159,.72), rgba(10,75,122,.7)); color: #d8f9ff; font-size: 11px; letter-spacing: .1em; box-shadow: inset 0 0 16px rgba(34,227,255,.1), 0 0 12px rgba(34,227,255,.07); transition: .2s ease; }
.primary-action:hover { border-color: var(--cyan); background: linear-gradient(90deg, rgba(15,133,191,.82), rgba(10,89,142,.82)); box-shadow: inset 0 0 18px rgba(34,227,255,.16), 0 0 16px rgba(34,227,255,.16); }
.primary-action:disabled { opacity: .56; cursor: wait; }
.primary-action b { color: var(--cyan); font-size: 16px; }
.model-flow { margin-top: 12px; padding: 13px 11px; border: 1px solid rgba(43,137,172,.19); background: rgba(2,13,26,.48); }
.model-flow p { margin: 0 0 11px; color: #4c788c; font-size: 9px; letter-spacing: .1em; }
.model-flow > div { display: flex; align-items: center; justify-content: space-between; }
.model-flow span { color: #81bacb; font-size: 8px; border: 1px solid rgba(47,164,204,.2); padding: 4px 5px; }
.model-flow i { color: #2d6981; font-style: normal; font-size: 9px; }
.parameter-readout { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 13px; border: 1px solid rgba(40,127,160,.17); }
.parameter-readout div { padding: 10px; text-align: center; border-right: 1px solid rgba(40,127,160,.17); }
.parameter-readout div:last-child { border-right: 0; }
.parameter-readout span { display: block; color: #416c7f; font-size: 8px; }
.parameter-readout b { display: block; margin-top: 5px; color: #8fd3e2; font: 500 14px "Bahnschrift", Arial, sans-serif; }
.sync-note { margin: 14px 0 0; text-align: center; color: #345e70; font-size: 8px; }

.map-wrap { height: 310px; margin: 12px 13px 0; position: relative; overflow: hidden; border: 1px solid rgba(47,167,208,.24); background: #dce7eb; }
.map { width: 100%; height: 100%; z-index: 1; filter: none; }
.map-mode-admin .map { background: #e8eef0; }
.map-mode-irrigation .map { background: #d8e4df; }
.map::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 26px rgba(3,8,18,.28); pointer-events: none; }
.map-scan { position: absolute; z-index: 450; left: 0; right: 0; top: -20%; height: 60px; pointer-events: none; background: linear-gradient(transparent, rgba(41,216,255,.07), transparent); animation: scan 6s linear infinite; }
@keyframes scan { to { top: 110%; } }
.administrative-base-tiles { filter: saturate(.74) brightness(1.04) contrast(.93); }
.irrigation-base-tiles { filter: saturate(.72) brightness(.86) contrast(1.05); }
.tianditu-label-tiles { filter: contrast(1.04); }
.map-config-warning { position: absolute; z-index: 720; left: 50%; bottom: 34px; width: min(440px, calc(100% - 24px)); transform: translateX(-50%); padding: 9px 12px; border: 1px solid rgba(255,198,109,.72); background: rgba(48,27,4,.94); color: #ffe1a6; box-shadow: 0 6px 20px rgba(0,0,0,.3); font-size: 10px; line-height: 1.6; text-align: center; pointer-events: none; }
.leaflet-control-zoom a { background: rgba(5,22,41,.9) !important; border-color: rgba(39,154,197,.25) !important; color: #7ccdde !important; }
.leaflet-control-attribution { background: rgba(2,10,19,.7) !important; color: #3d6575 !important; font-size: 7px !important; }
.leaflet-control-attribution a { color: #568ba1 !important; }
.city-tooltip { background: rgba(4,19,35,.92) !important; border: 1px solid rgba(34,227,255,.5) !important; border-radius: 0 !important; color: #c7f5ff !important; box-shadow: 0 0 15px rgba(34,227,255,.13) !important; font-size: 10px !important; }
.admin-city-tooltip { font-weight: 600; }
.admin-boundary-tooltip { background: rgba(255,255,255,.95) !important; border-color: rgba(12,111,148,.45) !important; color: #17495b !important; box-shadow: 0 4px 13px rgba(17,62,78,.16) !important; font-size: 10px !important; }
.admin-province-label, .admin-prefecture-label { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; white-space: nowrap; text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 -1px 0 #fff; }
.admin-province-label::before, .admin-prefecture-label::before { display: none !important; }
.admin-province-label { color: #075f7d !important; font: 700 11px "Microsoft YaHei", sans-serif !important; letter-spacing: .08em; }
.admin-prefecture-label { color: #4c6670 !important; font: 600 8px "Microsoft YaHei", sans-serif !important; }
.glad-cropland-mask { image-rendering: pixelated; filter: drop-shadow(0 0 1px rgba(58,224,116,.56)); }
.glad-cropland-overview { opacity: .72 !important; }
.glad-cropland-native { opacity: .88 !important; }
.boundary-tooltip { background: rgba(3,16,30,.94) !important; border: 1px solid rgba(83,224,255,.48) !important; border-radius: 0 !important; color: #bceef8 !important; box-shadow: 0 0 14px rgba(16,180,232,.16) !important; font-size: 9px !important; }
.irrigation-boundary-tooltip { border-color: rgba(255,179,79,.72) !important; color: #ffe2b4 !important; }
.irrigation-selected-label { padding: 5px 9px !important; border: 1px solid #fff1bd !important; border-radius: 0 !important; background: rgba(81, 37, 5, .96) !important; color: #fff7dc !important; box-shadow: 0 0 0 2px rgba(255, 159, 47, .24), 0 0 20px rgba(255, 159, 47, .72) !important; font: 600 10px "Microsoft YaHei", sans-serif !important; letter-spacing: .04em; }
.irrigation-selected-label::before { border-top-color: #fff1bd !important; }
.station-name-label { padding: 3px 6px !important; border: 1px solid rgba(10,112,61,.62) !important; border-radius: 2px !important; background: rgba(244,255,248,.94) !important; color: #075a32 !important; box-shadow: 0 3px 10px rgba(4,76,39,.18) !important; font: 700 9px "Microsoft YaHei", sans-serif !important; }
.station-name-label::before { border-top-color: rgba(10,112,61,.62) !important; }
.selected-city-pin { background: transparent; border: 0; }
.pin-orbit { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(103,235,255,.82); border-radius: 50%; background: rgba(34,227,255,.06); box-shadow: 0 0 0 8px rgba(34,227,255,.05), 0 0 18px rgba(34,227,255,.48); animation: orbitPulse 1.7s infinite; }
.pin-orbit span { width: 10px; height: 10px; border-radius: 50%; background: #e5feff; border: 2px solid var(--cyan); box-shadow: 0 0 11px var(--cyan); }
@keyframes orbitPulse { 50% { transform: scale(.86); opacity: .74; } }
.location-card { position: absolute; z-index: 510; top: 10px; left: 10px; width: min(220px, calc(100% - 20px)); min-width: 185px; padding: 9px 11px; border-left: 2px solid var(--cyan); background: linear-gradient(90deg, rgba(2,16,30,.94), rgba(3,24,42,.82)); box-shadow: 0 7px 18px rgba(0,0,0,.24); backdrop-filter: blur(9px); pointer-events: none; }
.location-card span { display: block; color: #47788d; font-size: 7px; letter-spacing: .1em; }
.location-card b, .location-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-card b { margin-top: 5px; color: #87bdcb; font-size: 8px; font-weight: 500; }
.location-card strong { margin-top: 4px; color: #e2fbff; font-size: 11px; font-weight: 500; }
.location-card em { display: block; margin-top: 4px; color: #ffb9f1; font-size: 8px; font-style: normal; line-height: 1.35; }
.location-card small { display: block; margin-top: 4px; color: #3f6b7e; font: 7px "Bahnschrift", Arial, sans-serif; }
.map-toolbar { position: absolute; z-index: 530; top: 10px; right: 10px; width: min(276px, calc(100% - 250px)); }
.map-mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid rgba(32,137,177,.34); background: rgba(3,17,31,.91); box-shadow: 0 6px 18px rgba(0,0,0,.18); backdrop-filter: blur(9px); }
.map-mode-switch button { min-width: 0; height: 28px; border: 0; background: transparent; color: #6895a5; font: 600 9px "Microsoft YaHei", sans-serif; letter-spacing: .03em; }
.map-mode-switch button.active { background: linear-gradient(90deg, rgba(13,126,169,.72), rgba(19,94,133,.72)); color: #e2fbff; box-shadow: inset 0 0 0 1px rgba(72,224,255,.34); }
.station-search { margin-top: 5px; padding: 6px 7px 5px; border: 1px solid rgba(32,137,177,.3); background: rgba(3,17,31,.92); box-shadow: 0 6px 18px rgba(0,0,0,.18); backdrop-filter: blur(9px); }
.station-search > div { display: grid; grid-template-columns: 1fr 46px; }
.station-search input { min-width: 0; height: 27px; border: 1px solid rgba(69,154,183,.36); border-right: 0; border-radius: 0; outline: 0; background: rgba(2,10,20,.72); color: #d7f8ff; padding: 0 7px; font: 9px "Microsoft YaHei", sans-serif; }
.station-search input::placeholder { color: #4f7888; }
.station-search input:focus { border-color: rgba(71,226,255,.72); }
.station-search button { height: 27px; border: 1px solid rgba(71,226,255,.48); background: rgba(12,104,146,.72); color: #d9f9ff; font-size: 9px; }
.station-search small { display: block; overflow: hidden; margin-top: 4px; color: #6b98a7; font-size: 7px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.map-layer-legend { position: absolute; z-index: 510; right: 10px; bottom: 45px; display: none; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 9px; max-width: calc(100% - 20px); padding: 6px 8px; border: 1px solid rgba(61,157,192,.24); background: rgba(2,13,25,.84); color: #729eac; font-size: 7px; backdrop-filter: blur(8px); pointer-events: none; }
.map-layer-legend.show { display: flex; }
.map-layer-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.map-layer-legend i { width: 10px; height: 3px; display: inline-block; }
.legend-cropland { height: 7px !important; background: #46e88f; box-shadow: 0 0 6px rgba(70,232,143,.7); }
.legend-irrigation { height: 8px !important; border: 1px solid #ffbf68; background: rgba(242,143,39,.48); box-shadow: inset 0 0 4px rgba(255,225,166,.32); filter: drop-shadow(0 0 3px rgba(255,179,79,.72)); }
.legend-station { width: 7px !important; height: 7px !important; border: 1px solid #effff3; border-radius: 50%; background: #16c86f; box-shadow: 0 0 6px rgba(22,200,111,.7); }
.legend-province { height: 2px !important; background: #14b8e8; box-shadow: 0 0 5px rgba(20,184,232,.42); }
.legend-prefecture { height: 1px !important; background: #a6bec7; }
.map-hint, .map-coordinates { position: absolute; z-index: 500; bottom: 10px; padding: 7px 9px; border: 1px solid rgba(57,157,193,.26); background: rgba(3,16,30,.86); color: #75a9bb; font-size: 8px; backdrop-filter: blur(7px); }
.map-hint { left: 10px; max-width: calc(100% - 180px); }
.map-hint small { display: block; margin: 3px 0 0 13px; color: #426f81; font-size: 7px; }
.map-coordinates { right: 10px; }
.pulse-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #51f5b0; box-shadow: 0 0 8px #51f5b0; animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.78); } }
.map-facts { display: grid; grid-template-columns: 1.4fr .6fr 1fr; margin: 9px 13px 0; border-top: 1px solid rgba(43,139,174,.18); }
.map-facts div { padding: 7px 9px 0; border-right: 1px solid rgba(43,139,174,.14); }
.map-facts div:last-child { border-right: 0; }
.map-facts span { display: block; color: #3d697c; font-size: 7px; }
.map-facts b { display: block; margin-top: 3px; color: #75b8c9; font-size: 9px; font-weight: 500; }

.weather-panel { padding-bottom: 12px; }
.current-weather { display: flex; justify-content: space-between; align-items: center; padding: 15px 19px 10px; }
.current-weather span { color: #5b8ba0; font-size: 9px; }
.current-weather strong { display: block; color: #e2fbff; margin-top: 5px; font: 500 40px "Bahnschrift", Arial, sans-serif; text-shadow: 0 0 10px rgba(61,211,255,.48); }
.current-weather strong small { color: #6ba1b4; font-size: 14px; }
.current-weather p { margin: -2px 0 0; color: #426b7e; font-size: 8px; }
.weather-orbit { width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid rgba(48,188,229,.35); border-radius: 50%; position: relative; box-shadow: inset 0 0 17px rgba(34,227,255,.08), 0 0 12px rgba(34,227,255,.08); }
.weather-orbit::before, .weather-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(34,227,255,.22); }
.weather-orbit::before { inset: 8px; }.weather-orbit::after { inset: -7px; border-style: solid; border-color: rgba(34,227,255,.12); }
.weather-orbit span { color: var(--cyan); font-size: 19px; text-shadow: 0 0 10px var(--cyan); }
.weather-metrics { display: grid; grid-template-columns: 1fr 1fr; margin: 0 15px; border: 1px solid rgba(47,139,174,.18); }
.weather-metrics div { padding: 8px 10px; border-right: 1px solid rgba(47,139,174,.15); border-bottom: 1px solid rgba(47,139,174,.15); }
.weather-metrics div:nth-child(2n) { border-right: 0; }.weather-metrics div:nth-child(n+3) { border-bottom: 0; }
.weather-metrics span { display: block; color: #416e80; font-size: 7px; }
.weather-metrics b { display: block; margin-top: 3px; color: #82c1cf; font-size: 10px; font-weight: 500; }
.forecast-bars { height: 122px; display: grid; grid-template-columns: repeat(7,1fr); align-items: end; gap: 5px; margin: 12px 15px 0; }
.forecast-day { min-width: 0; height: 100%; display: grid; grid-template-rows: 13px 1fr 14px 13px; justify-items: center; gap: 2px; }
.forecast-day > span, .forecast-day > small { color: #416a7b; font-size: 7px; white-space: nowrap; }
.forecast-day > b { color: #6facbb; font-size: 8px; font-weight: 500; }
.forecast-day > small.wet { color: #53bde0; }
.temperature-track { height: 100%; width: 8px; display: flex; align-items: end; background: rgba(50,113,138,.12); }
.temperature-track i { width: 100%; display: block; background: linear-gradient(180deg, var(--cyan), rgba(33,108,169,.38)); box-shadow: 0 0 6px rgba(34,227,255,.35); transition: height .3s; }

.trend-panel { padding-bottom: 7px; }
.chart-tabs { display: flex; border: 1px solid rgba(47,139,175,.22); }
.chart-tabs button { border: 0; background: transparent; color: #47768a; padding: 4px 9px; font-size: 8px; }
.chart-tabs button.active { color: #c9f5ff; background: rgba(23,132,177,.28); }
.chart-legend { height: 28px; display: flex; align-items: center; gap: 15px; padding: 0 18px; color: #4f7e91; font-size: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend em { margin-left: auto; color: #355d70; font-style: normal; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.legend-dot.etc { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }.legend-dot.eto-lsy { background: #48a8ff; }.legend-dot.eto { border: 1px solid var(--amber); }.legend-dot.rain { border-radius: 1px; background: #3e6d9e; }
.chart-shell { width: 100%; overflow: hidden; }
.trend-chart { width: 100%; height: 235px; display: block; }
.chart-grid { stroke: rgba(63,137,166,.16); stroke-width: 1; stroke-dasharray: 3 5; }
.axis-label, .date-label { fill: #355e70; font-size: 8px; }
.rain-bar { fill: #2b6fa9; opacity: .48; }
.eto-line, .eto-lsy-line, .etc-primary-line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.eto-line { stroke: var(--amber); stroke-dasharray: 5 5; opacity: .72; }
.eto-lsy-line { stroke: #438df3; opacity: .85; }
.etc-primary-line { stroke: var(--cyan); stroke-width: 2; }
.etc-point { fill: #041426; stroke: #b8f7ff; stroke-width: 1.5; }
.table-scroll { height: 238px; overflow: auto; margin: 5px 12px 0; border: 1px solid rgba(43,133,168,.15); }
table { width: 100%; border-collapse: collapse; color: #739bab; font-size: 9px; }
th, td { padding: 9px 10px; border-bottom: 1px solid rgba(41,123,154,.14); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { position: sticky; top: 0; z-index: 2; background: #07172b; color: #4f7b8e; font-weight: 500; }
tbody tr:hover { background: rgba(24,113,155,.09); }
.hot-value { color: #ffc274; text-shadow: 0 0 8px rgba(255,194,116,.25); }

.decision-panel { padding-bottom: 10px; }
.export-button { border: 1px solid rgba(34,227,255,.34); background: rgba(10,73,108,.22); color: #75c9da; padding: 5px 8px; font-size: 8px; }
.export-button:hover { border-color: var(--cyan); color: #d8fbff; }
.export-button:disabled { cursor: not-allowed; opacity: .38; }
.decision-list { padding: 7px 14px 5px; }
.decision-list article { min-height: 47px; display: grid; grid-template-columns: 25px 1fr auto 50px; align-items: center; gap: 8px; border-bottom: 1px solid rgba(41,128,161,.15); }
.rank { color: #2e7793; font: 500 10px "Bahnschrift", Arial, sans-serif; }
.decision-list article div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.decision-list article div b { color: #86bdcb; font-size: 9px; font-weight: 500; }
.decision-list article div small { overflow: hidden; text-overflow: ellipsis; color: #3f697c; font-size: 7px; white-space: nowrap; }
.decision-list article > strong { color: #d6f6fb; font: 500 14px "Bahnschrift", Arial, sans-serif; }
.decision-list article > strong small { color: #557f91; font-size: 7px; }
.decision-list article > em { color: #4c8296; font-size: 8px; font-style: normal; text-align: right; }
.decision-summary { display: flex; align-items: flex-start; margin: 5px 14px 0; padding: 10px 11px; border-left: 2px solid rgba(34,227,255,.56); background: rgba(18,91,127,.12); }
.decision-summary .pulse-dot { flex: 0 0 auto; margin-top: 4px; }
.decision-summary p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.decision-summary b { color: #85cad8; font-size: 9px; font-weight: 500; }
.decision-summary small { color: #436d7e; font-size: 7px; line-height: 1.5; }

.zone-modal-backdrop { position: fixed; z-index: 9999; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0, 5, 13, .78); backdrop-filter: blur(8px); }
.zone-modal { width: min(1180px, 100%); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid rgba(52, 199, 246, .52); background: linear-gradient(180deg, rgba(7, 28, 51, .99), rgba(3, 12, 25, .99)); box-shadow: 0 24px 80px rgba(0,0,0,.62), inset 0 0 38px rgba(24,150,216,.07); }
.zone-modal-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid rgba(52,169,211,.24); background: linear-gradient(90deg, rgba(14,91,139,.28), transparent); }
.zone-modal-header span { color: #3a8eaa; font-size: 8px; letter-spacing: .2em; }
.zone-modal-header h2 { margin: 5px 0 4px; color: #d7f8ff; font-size: 20px; font-weight: 500; letter-spacing: .07em; text-shadow: 0 0 13px rgba(54,218,255,.34); }
.zone-modal-header p { margin: 0; color: #527f92; font: 9px "Bahnschrift", Arial, sans-serif; }
.zone-modal-header button { flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid rgba(58,181,222,.32); background: rgba(7,36,61,.74); color: #81ccdc; font-size: 23px; line-height: 1; }
.zone-modal-header button:hover { border-color: var(--cyan); color: #e1fbff; }
.zone-model-note { min-height: 37px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid rgba(42,132,166,.15); color: #6c9cae; font-size: 9px; }
.zone-status-dot { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #52f1ad; box-shadow: 0 0 8px #52f1ad; }
.zone-status-dot.loading { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 1s infinite; }
.zone-status-dot.error { background: #ff745f; box-shadow: 0 0 8px #ff745f; }
.zone-loading, .zone-error { min-height: 300px; display: grid; place-content: center; justify-items: center; gap: 12px; color: #6d9bac; text-align: center; }
.zone-loading i { width: 48px; height: 48px; border: 2px solid rgba(34,227,255,.14); border-top-color: var(--cyan); border-radius: 50%; animation: zoneSpin .8s linear infinite; }
.zone-loading b { color: #c8f4fc; font-size: 14px; font-weight: 500; }.zone-loading span { color: #3e6e81; font-size: 9px; }
.zone-error { color: #d99a8e; padding: 30px; }
@keyframes zoneSpin { to { transform: rotate(360deg); } }
.zone-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 14px 18px 10px; border: 1px solid rgba(43,147,185,.19); background: rgba(42,131,166,.16); }
.zone-summary-grid article { min-width: 0; padding: 13px 14px; background: #06172a; }
.zone-summary-grid span { display: block; overflow: hidden; color: #527f91; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.zone-summary-grid strong { display: block; margin-top: 8px; color: #d7f8ff; font: 500 23px "Bahnschrift", Arial, sans-serif; }
.zone-summary-grid strong small { color: #5e8da0; font-size: 9px; }
.zone-peak-note { min-height: 45px; display: flex; align-items: center; margin: 0 18px 10px; padding: 8px 12px; border-left: 2px solid var(--amber); background: rgba(137,89,26,.09); }
.zone-peak-note .pulse-dot { flex: 0 0 auto; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.zone-peak-note b { color: #eccb96; font-size: 10px; font-weight: 500; }.zone-peak-note p { margin: 0 0 0 9px; color: #6f756f; font-size: 8px; }
.zone-peak-note button { margin-left: auto; border: 1px solid rgba(34,227,255,.38); background: rgba(10,73,108,.26); color: #86d5e3; padding: 7px 10px; font-size: 8px; }
.zone-table-wrap { height: min(350px, 42vh); overflow: auto; margin: 0 18px; border: 1px solid rgba(43,133,168,.18); }
.zone-table-wrap table { font-size: 9px; }.zone-table-wrap th { top: 0; }.zone-table-wrap td, .zone-table-wrap th { padding: 8px 10px; }
.zone-disclaimer { margin: 9px 19px 14px; color: #3d687a; font-size: 8px; line-height: 1.45; }

.dashboard-footer { min-height: 38px; display: flex; align-items: center; justify-content: space-between; color: #315769; font-size: 8px; letter-spacing: .04em; }
.dashboard-footer p { margin: 0; }.dashboard-footer span { text-align: right; }

@media (max-width: 1280px) {
  .command-header { grid-template-columns: .8fr minmax(500px,1.7fr) .8fr; }
  .header-side small { display: none; }
  .overview-strip { grid-template-columns: .9fr 1.6fr .8fr; }
  .overview-total, .overview-gauge { padding-inline: 18px; }
  .dashboard-grid { grid-template-columns: 305px minmax(0,1fr); grid-template-rows: 410px 350px 320px auto; }
  .control-panel { grid-column: 1; grid-row: 1 / 3; }
  .map-panel { grid-column: 2; grid-row: 1; }
  .weather-panel { grid-column: 2; grid-row: 2; }
  .trend-panel { grid-column: 1 / 3; grid-row: 3; }
  .decision-panel { grid-column: 1 / 3; grid-row: 4; }
  .forecast-bars { height: 98px; }
  .decision-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
}

@media (max-width: 960px) {
  .dashboard-frame { padding-inline: 15px; }
  .command-header { grid-template-columns: 90px 1fr 90px; }
  .system-title > div { min-width: 0; padding-inline: 13px; }
  .system-title h1 { font-size: 18px; }
  .system-title p { display: none; }
  .title-wing { display: none; }
  .system-icon { display: none; }
  .header-left { justify-content: flex-start; }.header-right { justify-content: flex-end; }
  .system-state { display: none; }
  .overview-strip { grid-template-columns: 1fr 1fr; }
  .overview-matrix { grid-column: 1 / 3; grid-row: 2; }
  .overview-total, .overview-gauge { min-height: 130px; }
}

@media (max-width: 760px) {
  .dashboard-frame { padding: 8px 10px 15px; }
  .command-header { height: 66px; display: flex; justify-content: center; }
  .header-side { display: none; }
  .system-title { width: 100%; }
  .system-title > div { width: 100%; }
  .system-title h1 { font-size: clamp(15px, 5vw, 20px); letter-spacing: .08em; }
  .overview-strip { grid-template-columns: 1fr; gap: 10px; }
  .overview-total, .overview-gauge { min-height: 125px; }
  .metric-heading { align-items: flex-start; }
  .overview-matrix { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; }
  .matrix-cell { min-height: 105px; border-bottom: 1px solid rgba(45,150,191,.18); }
  .matrix-cell:nth-child(2n) { border-right: 0; }
  .matrix-cell:nth-child(n+3) { border-bottom: 0; }
  .dashboard-grid { grid-template-columns: 1fr; grid-template-rows: auto; gap: 10px; }
  .control-panel, .map-panel, .weather-panel, .trend-panel, .decision-panel { grid-column: 1; grid-row: auto; }
  .map-wrap { height: 370px; }
  .location-card { top: 10px; left: 10px; right: 10px; width: auto; min-width: 0; }
  .map-toolbar { top: 88px; left: 10px; right: 10px; width: auto; }
  .map-layer-legend { left: 10px; right: auto; max-width: calc(100% - 20px); flex-wrap: wrap; }
  .weather-panel { min-height: 390px; }
  .trend-panel { min-height: 350px; }
  .trend-chart { min-width: 720px; }
  .chart-shell { overflow-x: auto; }
  .decision-list { display: block; }
  .dashboard-footer { flex-direction: column; align-items: flex-start; gap: 6px; padding: 13px 3px 4px; line-height: 1.5; }
  .dashboard-footer span { text-align: left; }
  .zone-modal-backdrop { padding: 7px; }
  .zone-modal { max-height: calc(100vh - 14px); }
  .zone-modal-header { padding: 12px 14px; }.zone-modal-header h2 { font-size: 15px; }
  .zone-model-note { padding: 8px 14px; line-height: 1.45; }
  .zone-summary-grid { grid-template-columns: 1fr 1fr; margin: 10px; }
  .zone-peak-note { align-items: flex-start; flex-wrap: wrap; margin: 0 10px 8px; }
  .zone-peak-note p { width: calc(100% - 20px); margin: 5px 0 0 20px; }.zone-peak-note button { margin: 7px 0 0 20px; }
  .zone-table-wrap { margin: 0 10px; height: 36vh; }.zone-disclaimer { margin-inline: 11px; }
}

@media (max-width: 440px) {
  .overview-gauge { justify-content: flex-start; }
  .control-row { grid-template-columns: 1fr; }
  .map-wrap { height: 360px; }
  .map-coordinates { display: none; }
  .map-hint { max-width: calc(100% - 20px); }
  .station-search small { white-space: normal; }
  .chart-legend { gap: 9px; padding-inline: 12px; }
  .chart-legend em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.model-input-note { color: #87a9b8; font-size: 12px; line-height: 1.7; margin: 18px 0 10px; }
