.scripts-topbar-link {
  display: inline-flex;
  align-items: center;
  min-width: 92px;
  justify-content: center;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255,255,255,.1);
  gap: 6px;
}
.scripts-topbar-link:hover { background: rgba(255,255,255,.2); }
.scripts-topbar-link + .scripts-topbar-link { margin-left: 5px; }

.scripts-page, .history-page {
  display: block;
  height: calc(100vh - 50px);
  overflow: auto;
  padding: 32px clamp(18px, 4vw, 58px) 50px;
  color: #173643;
}
.scripts-page { display:flex; flex-direction:column; max-width:1120px; margin:0 auto; padding-top:22px; }
.scripts-hero { order:0; margin-bottom:16px; }
.scripts-page .script-group[aria-labelledby="climate-tools-title"] { order:1; }
.scripts-page .script-group[aria-labelledby="local-tools-title"] { order:2; }
.scripts-back { color: #176789; text-decoration: none; font-weight: 700; }
.scripts-kicker { margin-top:16px; color:#58808f; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.scripts-hero h1, .history-heading h1 { margin:3px 0 4px; font-size:clamp(28px,3.5vw,40px); }
.scripts-hero p { margin: 0; color: #5d7480; }
.scripts-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:11px; }
.script-group + .script-group { margin-top:0; }
.scripts-page .script-group[aria-labelledby="local-tools-title"] { margin-top:20px; }
.script-group-heading { display:flex; align-items:center; gap:10px; margin:0 0 9px; }
.script-group-heading h2 { margin: 0 0 2px; font-size: 19px; }
.script-group-heading p { margin: 0; color: #6a818b; font-size: 12px; }
.script-group-icon { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:10px; background:#d8ebf1; color:#075f7d; font-size:18px; font-weight:900; }
.script-card { display:grid; grid-template-columns:44px 1fr auto; gap:12px; align-items:center; min-height:88px; padding:14px 16px; border-radius:13px; background:#fff; box-shadow:0 5px 18px rgba(18,70,89,.1); color:#173643; text-decoration:none; }
.script-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(18,70,89,.17); }
.script-card-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:11px; background:#dff2f7; color:#00658b; font-size:22px; }
.script-card strong, .script-card small { display: block; }
.script-card strong { font-size:16px; margin-bottom:3px; }
.script-card small { color:#637984; font-size:12px; line-height:1.3; }
.script-card-arrow { font-size:21px; color:#1680a6; }
.script-card-surprise .script-card-icon { background: linear-gradient(135deg, #e8ddff, #d9f0ff); color: #6545a1; }
.script-card-tropical .script-card-icon { background: linear-gradient(135deg, #eee7ff, #ffd9a8); color: #65459a; }
.script-card-energy .script-card-icon { background: linear-gradient(135deg, #fff1bf, #dff5d8); color: #856000; }
.script-card-daily .script-card-icon { background: linear-gradient(135deg, #dff2f7, #e7f5dc); color: #087050; }

.daily-overview-page { max-width: 1500px; }
.daily-overview-page .history-heading p { margin: 4px 0 18px; color: #637a84; }
.daily-overview-filter { margin-bottom: 16px; }
.daily-date-nav { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.daily-date-nav a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #dcecf2; color: #176789; text-decoration: none; font-weight: 900; }
.daily-date-nav a.is-disabled { opacity: .35; pointer-events: none; }
.daily-date-nav span { min-width: 92px; color: #526d78; text-align: center; font-size: 12px; font-weight: 800; }
.daily-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.daily-summary article { padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 4px 15px rgba(18,70,89,.09); }
.daily-summary span, .daily-summary strong, .daily-summary small { display: block; }
.daily-summary span { color: #647b85; font-size: 11px; font-weight: 750; }
.daily-summary strong { margin: 4px 0 2px; color: #086887; font-size: 23px; }
.daily-summary small { color: #7a8c93; font-size: 10px; }
.daily-table-section { margin-top: 19px; }
.daily-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.daily-section-heading span { color: #64808b; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.daily-section-heading h2 { margin: 2px 0 0; font-size: 18px; }
.daily-section-heading > small { color: #6e838b; font-size: 10px; }
.daily-table-wrap { max-height: none; }
.daily-table-wrap tr.is-empty { opacity: .58; }
.compact-data-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.compact-data-table th, .compact-data-table td { height: 34px; padding: 7px 11px; line-height: 1.15; }
.compact-data-table th { color: #244854; font-size: 11px; font-weight: 850; letter-spacing: .015em; }
.compact-data-table td { border-bottom: 1px solid #e3ecef; }
.compact-data-table tbody tr:last-child td { border-bottom: 0; }
.compact-data-table tbody tr:hover { background: #f2f8fa; }
.compact-data-table td strong, .compact-data-table td small { display: block; }
.compact-data-table td small { margin-top: 1px; color: #819198; font-size: 10px; font-weight: 500; }
.energy-meter-link { display: block; color: #176789; text-decoration: none; }
.energy-meter-link:hover strong, .energy-meter-link:focus-visible strong { color: #0d4e69; text-decoration: underline; text-underline-offset: 3px; }
.energy-meter-link:focus-visible { outline: 2px solid #1696c8; outline-offset: 3px; border-radius: 3px; }
.sortable-table th[data-sort] { cursor: pointer; user-select: none; }
.sortable-table th[data-sort]::after { content: " ↕"; color: #7e949d; font-size: 9px; }
.sortable-table th[data-direction="asc"]::after { content: " ↑"; }
.sortable-table th[data-direction="desc"]::after { content: " ↓"; }

.system-logs-page { max-width: 1600px; }
.log-date-navigation { display: flex; align-items: end; gap: 10px; margin-bottom: 18px; }
.log-date-navigation label { display: grid; gap: 5px; color: #536e79; font-size: 12px; font-weight: 800; }
.log-date-navigation select { height: 42px; padding: 0 36px 0 12px; border: 1px solid #b9cdd5; border-radius: 9px; background: #fff; color: #173643; font: inherit; }
.log-date-navigation label, .log-analysis-date label { position: relative; }
.log-date-picker-button { height: 42px; min-width: 150px; padding: 0 12px; border: 1px solid #b9cdd5; border-radius: 9px; background: #fff; color: #173643; font: inherit; font-weight: 750; cursor: pointer; }
.log-date-picker { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; width: min(310px, 85vw); padding: 12px; border: 1px solid #b9cdd5; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px rgba(18,70,89,.2); }
.log-date-picker[hidden] { display: none; }
.log-date-picker > strong { display: block; margin-bottom: 9px; font-size: 13px; }
.log-date-picker > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 280px; overflow: auto; }
.log-date-picker button { padding: 9px 7px; border: 1px solid #c6d8df; border-radius: 8px; background: #f3f8fa; color: #244854; cursor: pointer; font: inherit; font-size: 12px; }
.log-date-picker button:hover, .log-date-picker button.is-selected { border-color: #00658b; background: #dceef4; color: #004d69; font-weight: 850; }
.log-date-navigation > strong { align-self: center; margin-left: 5px; }
.log-date-navigation .log-local-toggle { display: flex; align-self: center; align-items: center; gap: 8px; cursor: pointer; }
.log-date-navigation .log-local-toggle:first-of-type { margin-left: auto; }
.log-local-toggle input { width: 18px; height: 18px; accent-color: #00658b; }
.log-local-toggle small { color: #607984; font-size: 11px; }
.log-own-ips { margin: -7px 0 18px; padding: 10px 13px; border: 1px solid #c8dbe2; border-radius: 10px; background: rgba(255,255,255,.72); color: #496773; font-size: 12px; }
.log-own-ips summary { width: fit-content; cursor: pointer; font-weight: 800; }
.log-own-ips summary strong { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 10px; background: #dceef4; color: #075f7d; font-size: 11px; }
.log-own-ips div { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 7px; }
.log-own-ips code { padding: 5px 8px; border-radius: 7px; background: #eaf3f6; color: #173643; }
.log-own-ips small { color: #627b85; }
.log-day-button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: #00658b; color: #fff; text-decoration: none; font-size: 20px; font-weight: 900; }
.log-day-button.is-disabled { opacity: .35; }
.log-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; min-height: 0; }
.log-panel { min-width: 0; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 6px 22px rgba(18,70,89,.1); }
.log-panel > header { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 17px; background: #dcecf2; }
.log-panel h2 { margin: 0; font-size: 18px; }
.log-panel header span { color: #58727d; font-size: 12px; font-weight: 700; }
.log-output { height: calc(100vh - 275px); min-height: 280px; overflow: auto; padding: 8px 0; background: #172126; color: #dbe9ed; font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.log-output > div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 9px; padding: 3px 12px; border-bottom: 1px solid rgba(255,255,255,.05); }
.log-output time { color: #8fc9dc; }
.log-output code { color: inherit; overflow-wrap: anywhere; white-space: pre-wrap; }
.log-empty { margin: 0; padding: 24px; color: #657d87; }
.log-limit-note { color: #657d87; font-size: 12px; }
.log-analysis-link { display: inline-flex; margin-top: 8px; color: #176789; font-weight: 800; text-decoration: none; }
.log-analysis-page { max-width: 1450px; }
.log-analysis-date { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.log-analysis-date label { display: inline-grid; gap: 5px; color: #536e79; font-size: 12px; font-weight: 800; }
.log-analysis-date .log-local-toggle { display: flex; align-items: center; min-height: 42px; cursor: pointer; }
.log-analysis-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.log-analysis-summary div { padding: 15px; border-radius: 12px; background: #fff; box-shadow: 0 4px 15px rgba(18,70,89,.09); }
.log-analysis-summary span, .log-analysis-summary strong { display: block; }
.log-analysis-summary span { color: #657d87; font-size: 12px; }
.log-analysis-summary strong { margin-top: 5px; font-size: 25px; }
.log-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.log-analysis-card { min-width: 0; padding: 18px; border-radius: 14px; background: #fff; box-shadow: 0 6px 22px rgba(18,70,89,.1); }
.log-analysis-card h2 { margin: 0 0 12px; font-size: 18px; }
.log-analysis-card ol { margin: 0; padding: 0; list-style: none; }
.log-analysis-card li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e3ecef; }
.log-analysis-card li code { overflow-wrap: anywhere; }
.log-analysis-card li strong { color: #00658b; }
.log-analysis-card > p, .log-analysis-card > small { color: #657d87; }
.log-analysis-wide { grid-column: 1 / -1; }
.log-analysis-wide li { grid-template-columns: minmax(0, 1fr) auto auto; }
html.dark .log-date-navigation label { color: #b9cbd1; }
html.dark .log-date-navigation select, html.dark .log-panel, html.dark .log-date-picker-button, html.dark .log-date-picker, html.dark .log-analysis-summary div, html.dark .log-analysis-card { background: #242a2d; color: #eef5f7; }
html.dark .log-date-picker button { background: #303a3f; border-color: #53636a; color: #eef5f7; }
html.dark .log-analysis-card li { border-bottom-color: #3b4549; }
html.dark .log-panel > header { background: #34464d; }
html.dark .log-panel header span { color: #b7c8ce; }

.history-page { max-width: 1320px; margin: 0 auto; }
.history-heading { margin-bottom: 20px; }
.history-filter { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; padding: 18px; background: #fff; border-radius: 14px; box-shadow: 0 6px 22px rgba(18,70,89,.1); }
.history-quick-filter { margin-bottom: 14px; border-left: 5px solid #00658b; }
.history-filter-heading { flex: 1 0 100%; display: flex; gap: 10px; align-items: baseline; color: #173643; }
.history-filter-heading strong { font-size: 17px; }
.history-filter-heading span { color: #71868f; font-size: 12px; }
.history-filter label { display: grid; gap: 6px; color: #536e79; font-size: 13px; font-weight: 700; }
.history-filter select, .history-filter input { height: 42px; min-width: 170px; border: 1px solid #b9cdd5; border-radius: 8px; padding: 0 11px; background: #fff; color: #173643; font: inherit; }
.history-filter select { min-width: 270px; }
.history-filter .history-year-select { min-width: 150px; }
.history-optional { color: #82949b; font-size: 11px; font-weight: 500; }
.history-filter button { height: 42px; padding: 0 20px; border: 0; border-radius: 8px; background: #00658b; color: #fff; font-weight: 800; cursor: pointer; }
.history-range-note { padding-bottom: 12px; color: #6b828c; font-size: 12px; }
.history-message { margin-top: 22px; padding: 22px; border-radius: 12px; background: #fff; color: #5b727d; }
.history-error { background: #fff0ef; color: #9d302a; }
.history-results { margin-top: 20px; min-height: 0; }
.history-results.has-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.history-comparison-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.history-comparison-overview.is-single { grid-template-columns: 1fr; }
.history-combined-table { min-width: 1040px; }
.history-combined-table th:nth-child(5), .history-combined-table td:nth-child(5) { border-left: 5px solid #79a6b7; }
.history-combined-table .history-year-head th { top: 0; background: #c4dfe8; text-align: center; font-size: 15px; }
.history-combined-table .history-year-head th + th { border-left: 5px solid #79a6b7; }
.history-combined-table .history-year-head + tr th { top: 38px; }
.history-column { min-width: 0; }
.history-result-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-result-title div { display: flex; gap: 12px; align-items: baseline; }
.history-result-title span { color: #657d87; }
.history-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 15px; }
.history-weather-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.history-image-download { display:flex; align-items:center; gap:12px; margin:3px 0 16px; }.history-image-download button { min-height:42px; padding:0 17px; border:0; border-radius:10px; background:#08678a; color:#fff; font:inherit; font-weight:850; cursor:pointer; box-shadow:0 4px 14px rgba(8,103,138,.2); }.history-image-download button:hover { background:#075875; }.history-image-download span { color:#657d87; font-size:12px; }
.room-history-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.comparison-explanation { color: #657d87; font-size: 0.8rem; }
.history-summary div { padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(18,70,89,.08); }
.history-summary span, .history-summary strong { display: block; }
.history-summary span { color: #657d87; font-size: 12px; margin-bottom: 5px; }
.history-summary strong { font-size: 21px; }
.history-table-wrap { max-height: none; overflow-x: auto; overflow-y: visible; background: #fff; border-radius: 13px; box-shadow: 0 6px 22px rgba(18,70,89,.1); }
.history-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.history-table th { position: sticky; top: 0; z-index: 1; background: #dcecf2; color: #244854; text-align: right; }
.history-table th:first-child, .history-table td:first-child { text-align: left; }
.history-table th, .history-table td { text-align: right; white-space: nowrap; }
.history-table tbody tr:hover { background: #f2f8fa; }
.tropical-night-icon { display: inline-block; margin-left: .38em; color: #6650a4; font-size: .95em; font-weight: 900; line-height: 1; opacity: .82; vertical-align: .04em; }
.temp-cool { color: #176bc0; font-weight: 700; }
.temp-frost { color: #176bc0; font-weight: 800; background: rgba(96, 165, 250, .10); }
.temp-ice { color: #0756a0; font-weight: 900; background: rgba(59, 130, 246, .16); }
.temp-warm { color: #8a5700; font-weight: 800; background: rgba(250, 204, 21, .22); }
.temp-tropical { color: #c57900; font-weight: 800; }
.temp-hot { color: #a61b1b; font-weight: 850; background: rgba(249, 115, 22, .24); }
.temp-very-hot { background: #c92727; color: #fff; font-weight: 900; }

.extreme-results { margin-top: 22px; }
.extreme-title { margin-bottom: 14px; }
.extreme-records { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.extreme-card { padding: 18px; border-radius: 14px; color: #fff; box-shadow: 0 6px 18px rgba(18,70,89,.12); }
.extreme-card span, .extreme-card strong, .extreme-card small { display: block; }
.extreme-card span { font-size: 13px; opacity: .88; }
.extreme-card strong { margin: 7px 0 5px; font-size: 29px; }
.extreme-card small { opacity: .9; }
.extreme-hot { background: linear-gradient(135deg, #d64a2f, #a81f2c); }
.extreme-cold { background: linear-gradient(135deg, #277cc1, #3151a5); }
.extreme-night { background: linear-gradient(135deg, #7556b8, #513486); }
.extreme-rain { background: linear-gradient(135deg, #188a9c, #11627c); }
.extreme-streaks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.extreme-streaks article { padding: 17px; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(18,70,89,.08); }
.extreme-streaks span, .extreme-streaks strong, .extreme-streaks small { display: block; }
.extreme-streaks span { color: #657d87; font-size: 13px; }
.extreme-streaks strong { margin: 6px 0 4px; font-size: 23px; }
.extreme-streaks small { color: #71868f; }
.extreme-count-section, .extreme-year-section { margin-top: 24px; }
.extreme-count-section h2, .extreme-year-section h2 { margin: 0 0 10px; font-size: 19px; }
.extreme-counts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.extreme-counts div { display: flex; gap: 10px; align-items: center; padding: 13px; border-radius: 11px; background: #fff; }
.extreme-counts strong { font-size: 25px; color: #00658b; }
.extreme-counts span { font-size: 12px; font-weight: 700; }
.extreme-counts small { color: #768991; font-weight: 400; }
.extreme-year-table-wrap { max-height: none; }
.extreme-compare-section { margin: 0 0 20px; }
.extreme-compare-section h2 { margin: 0 0 10px; font-size: 19px; }
.extreme-compare-wrap { max-height: none; }
.extreme-compare-table th:not(:first-child) { text-align: center; }
.extreme-compare-table td:first-child { font-weight: 700; }
.extreme-compare-table td:not(:first-child) { text-align: center; font-weight: 800; }
.extreme-compare-table td small { display: block; margin-top: 3px; color: #73868e; font-weight: 400; }

.time-travel-results { margin-top: 22px; }
.time-travel-intro { display: flex; align-items: center; gap: 16px; margin-bottom: 15px; }
.time-travel-date { display: grid; place-items: center; min-width: 86px; height: 58px; padding: 0 12px; border-radius: 15px; background: linear-gradient(135deg, #6042a0, #287aa0); color: #fff; font-size: 23px; font-weight: 900; }
.time-travel-intro div span, .time-travel-intro div strong { display: block; }
.time-travel-intro div strong { font-size: 20px; }
.time-travel-intro div span { margin-top: 3px; color: #667e88; }
.time-travel-records { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.time-travel-records article { position: relative; overflow: hidden; padding: 17px 19px; border-radius: 14px; background: #fff; box-shadow: 0 5px 17px rgba(18,70,89,.1); }
.time-travel-records article::after { content: "◷"; position: absolute; right: 12px; bottom: -12px; color: #dcebf0; font-size: 60px; }
.time-travel-records span, .time-travel-records strong, .time-travel-records small { position: relative; z-index: 1; display: block; }
.time-travel-records span { color: #657d87; font-size: 13px; }
.time-travel-records strong { margin: 5px 0 2px; font-size: 27px; }
.time-travel-records small { color: #7253a5; font-weight: 800; }
.time-travel-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.time-travel-badges span { padding: 8px 13px; border-radius: 999px; background: #dfeef3; color: #315767; font-size: 13px; font-weight: 700; }
.time-travel-table-wrap { max-height: none; }
.time-travel-table td:first-child { font-size: 13px; }
.time-travel-table td small { display: block; margin-top: 2px; color: #788a91; font-size: 10px; font-weight: 400; }
.trend-up { color: #c1332e; font-weight: 800; }
.trend-down { color: #2472ad; font-weight: 800; }
.weather-character { font-weight: 700; }

.tropical-page { max-width: 1200px; }
.tropical-page .history-heading p { margin: 5px 0 0; color: #637a84; }
.tropical-results { margin-top: 22px; }
.tropical-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tropical-summary article { padding: 16px 17px; border-radius: 14px; background: #fff; box-shadow: 0 5px 17px rgba(18,70,89,.1); }
.tropical-summary span, .tropical-summary strong, .tropical-summary small { display: block; }
.tropical-summary span { color: #657d87; font-size: 12px; }
.tropical-summary strong { margin: 5px 0 3px; color: #63449d; font-size: 25px; }
.tropical-summary small { color: #71858e; }
.tropical-chart-card { margin-top: 18px; padding: 17px; border-radius: 14px; background: #fff; box-shadow: 0 5px 17px rgba(18,70,89,.1); }
.tropical-chart-card > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tropical-chart-card h2, .tropical-years h2 { margin: 0; font-size: 19px; }
.tropical-chart-card > div:first-child span { color: #72858d; font-size: 11px; }
.tropical-chart-scroll { margin-top: 15px; overflow-x: auto; overscroll-behavior-inline: contain; }
.tropical-chart { display: flex; align-items: end; gap: 5px; width: max-content; min-width: 100%; height: 230px; padding: 10px 4px 0; border-bottom: 1px solid #bed0d7; }
.tropical-bar-column { display: grid; grid-template-rows: 17px 170px 22px; align-items: end; width: 22px; height: 100%; color: #506b76; text-align: center; text-decoration: none; font-size: 9px; }
.tropical-bar-column strong { align-self: center; opacity: 0; font-size: 9px; }
.tropical-bar-column:hover strong, .tropical-bar-column:focus strong { opacity: 1; }
.tropical-bar-column i { display: block; width: 15px; height: max(2px, calc(var(--count) / var(--tropical-max) * 165px)); margin: 0 auto; border-radius: 5px 5px 1px 1px; background: linear-gradient(#9a6bd0, #ef9a52); }
.tropical-bar-column span { align-self: center; transform: rotate(-45deg); white-space: nowrap; }
.tropical-years { margin-top: 24px; }
.tropical-years > h2 { margin-bottom: 10px; }
.tropical-year { margin-bottom: 8px; border: 1px solid #d3e1e6; border-radius: 11px; background: #fff; }
.tropical-year summary { display: grid; grid-template-columns: 70px 150px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 15px; cursor: pointer; }
.tropical-year summary strong { color: #563c8a; font-size: 18px; }
.tropical-year summary span { font-weight: 800; }
.tropical-year summary small { justify-self: end; color: #70858e; }
.tropical-night-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 15px 15px; }
.tropical-night-list span { display: flex; gap: 8px; padding: 7px 9px; border-radius: 8px; background: #f3edf9; color: #4d3d67; }
.tropical-night-list time { color: #6e6280; }
.tropical-year > p { margin: 0; padding: 2px 15px 15px; color: #71838b; }
.tropical-note { color: #687e87; font-size: 12px; }

.annual-results { margin-top: 22px; }
.annual-table-wrap { max-height: none; }
.annual-table { min-width: 920px; }
.annual-table th:not(:first-child), .annual-table td:not(:first-child) { text-align: center; }
.annual-table th small { color: #647d87; font-weight: 600; }
.annual-coverage { min-width: 230px; }
.annual-coverage span, .annual-coverage small { display: block; }
.annual-coverage span { font-weight: 850; }
.annual-coverage small { margin-top: 3px; color: #71858e; font-size: 10px; }
.annual-complete { color: #28774c; }
.annual-partial { color: #9a6500; }
.annual-gap { color: #a73530; }

.geosphere-maps-page { display: block; height: calc(100vh - 50px); overflow-y: auto; padding: 18px clamp(12px, 2vw, 28px) 24px; color: #173643; }
.geosphere-maps-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; max-width: 1500px; margin: 0 auto 12px; }
.geosphere-maps-header h1 { margin: 3px 0 0; font-size: clamp(25px, 3vw, 36px); }
.geosphere-map-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.geosphere-map-tabs button, .geosphere-map-tabs a { min-height: 39px; padding: 0 13px; border: 1px solid #a9c4ce; border-radius: 9px; background: #fff; color: #17556d; font: inherit; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.geosphere-map-tabs button.is-active { border-color: #00658b; background: #00658b; color: #fff; }
.geosphere-map-tabs a { display: inline-flex; align-items: center; }
.geosphere-map-frame-card { position: relative; max-width: 1500px; height: max(620px, calc(100vh - 190px)); margin: 0 auto; overflow: hidden; border: 1px solid #b8cdd5; border-radius: 14px; background: #dbe8ed; box-shadow: 0 7px 24px rgba(18,70,89,.13); }
.geosphere-map-frame-card iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.geosphere-map-loading { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; background: rgba(232,242,246,.92); color: #315d6d; font-weight: 800; pointer-events: none; }
.geosphere-map-loading.is-hidden { display: none; }
.geosphere-map-note { max-width: 1500px; margin: 9px auto 0; color: #687e87; font-size: 11px; }
html.dark .geosphere-maps-page { color: #eef5f7; }
html.dark .geosphere-map-tabs button, html.dark .geosphere-map-tabs a { border-color: #53636a; background: #242a2d; color: #eef5f7; }
html.dark .geosphere-map-tabs button.is-active { background: #1683aa; }

@media (max-width: 760px) {
  .geosphere-maps-header { align-items: stretch; flex-direction: column; }
  .geosphere-map-tabs button, .geosphere-map-tabs a { flex: 1 1 auto; justify-content: center; }
  .geosphere-map-frame-card { height: 75vh; min-height: 520px; }
}

html.dark .scripts-page, html.dark .history-page { color: #eaf3f5; }
html.dark .script-group-heading p { color: #9dafb6; }
html.dark .script-group-icon { background: #33454c; color: #9adcf2; }
html.dark .script-card, html.dark .history-filter, html.dark .history-message, html.dark .history-summary div, html.dark .history-table-wrap, html.dark .extreme-streaks article, html.dark .extreme-counts div, html.dark .time-travel-records article, html.dark .tropical-summary article, html.dark .tropical-chart-card, html.dark .tropical-year, html.dark .daily-summary article { background: #242a2d; color: #eef5f7; }
html.dark .history-filter-heading { color: #eef5f7; }
html.dark .history-filter select, html.dark .history-filter input { background: #171b1d; border-color: #53636a; color: #fff; }
html.dark .history-table th { background: #34464d; color: #fff; }
html.dark .history-table th, html.dark .history-table td { border-bottom-color: #3b4549; }
html.dark .history-table tbody tr:hover { background: #30383c; }
html.dark .compact-data-table td { border-bottom-color: #3b4549; }
html.dark .energy-meter-link { color: #75c9e8; }
html.dark .energy-meter-link:hover strong, html.dark .energy-meter-link:focus-visible strong { color: #a8e1f4; }
html.dark .history-image-download button { background:#1683aa; }
html.dark .tropical-night-icon { color: #c4b5fd; opacity: .9; }
html.dark .scripts-topbar-link { color: #fff; }

@media (max-width: 850px) {
  .scripts-topbar-link { min-width: 0; padding: 5px 8px; }
  .scripts-topbar-link + .scripts-topbar-link { margin-left: 2px; }
  .scripts-topbar-label { display: none; }
  .history-summary { grid-template-columns: repeat(2, 1fr); }
  .history-table-wrap { max-height: none; }
  .history-results.has-comparison { grid-template-columns: 1fr; }
  .history-comparison-overview { grid-template-columns: 1fr; }
  .extreme-records, .extreme-streaks { grid-template-columns: repeat(2, 1fr); }
  .extreme-counts { grid-template-columns: repeat(3, 1fr); }
  .time-travel-records { grid-template-columns: 1fr; }
  .tropical-summary { grid-template-columns: repeat(2, 1fr); }
  .daily-summary { grid-template-columns: repeat(2, 1fr); }
  .log-columns { grid-template-columns: 1fr; }
  .log-output { height: 55vh; }
  .log-analysis-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-analysis-grid { grid-template-columns: 1fr; }
  .log-analysis-wide { grid-column: auto; }
}
@media (max-width: 560px) {
  .history-filter { display: grid; }
  .history-filter select, .history-filter input { width: 100%; min-width: 0; }
  .history-summary { grid-template-columns: 1fr; }
  .history-result-title, .history-result-title div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .history-image-download { align-items:stretch; flex-direction:column; }.history-image-download button { width:100%; }
  .extreme-records, .extreme-streaks, .extreme-counts { grid-template-columns: 1fr; }
  .tropical-summary { grid-template-columns: 1fr; }
  .daily-summary { grid-template-columns: 1fr; }
  .daily-date-nav { margin-left: 0; }
  .tropical-year summary { grid-template-columns: 58px minmax(0, 1fr); }
  .tropical-year summary small { grid-column: 1 / -1; justify-self: start; }
}
