* {
  box-sizing: border-box;
}

:root {
  --sky-50: #f5fbff;
  --sky-100: #e7f4fb;
  --sky-200: #cfe7f7;
  --sky-300: #add6ef;
  --sky-600: #2f7ea7;
  --sky-700: #1f5f82;
  --ink-900: #173042;
  --ink-700: #2e4b5f;
  --card: #ffffff;
  --line: #c7dbea;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
  color: var(--ink-900);
  background: radial-gradient(circle at 18% 8%, #ffffff 0%, #e8f6ff 34%, #d8ecfb 100%);
  line-height: 1.6;
}

.home-page {
  --sky-50: #fff3e1;
  --sky-100: #ffe2c5;
  --sky-200: #f6cfaa;
  --sky-300: #d7bea7;
  --sky-600: #b06f4a;
  --sky-700: #8a5539;
  --ink-900: #3f2f28;
  --ink-700: #6f5648;
  --card: #fff8ee;
  --line: #d9c2ab;
  background:
    radial-gradient(circle at 74% 10%, rgba(255, 178, 102, 0.45) 0%, rgba(255, 178, 102, 0) 34%),
    linear-gradient(160deg, #f1d7bb 0%, #d7e0de 40%, #c7dce8 100%);
}

.home-page .site-header::after {
  background:
    linear-gradient(180deg, rgba(58, 35, 25, 0.28) 0%, rgba(58, 35, 25, 0.08) 42%, rgba(58, 35, 25, 0) 100%),
    linear-gradient(90deg, rgba(37, 22, 15, 0.2) 0%, rgba(37, 22, 15, 0) 48%);
}

.home-page nav a {
  color: #fff6ec;
  text-shadow: 0 1px 2px rgba(32, 17, 10, 0.6);
}

.home-page nav a:hover {
  border-bottom-color: #ffe3c1;
}

.home-page .nav-links-dropdown > summary {
  color: #fff6ec;
  text-shadow: 0 1px 2px rgba(32, 17, 10, 0.6);
}

.home-page .nav-links-dropdown > summary:hover {
  border-bottom-color: #ffe3c1;
}

.home-page .nav-links-menu {
  border-color: rgba(255, 227, 193, 0.72);
  background: rgba(74, 40, 24, 0.94);
}

.home-page .hero,
.home-page .panel,
.home-page .status-strip,
.home-page .chart-placeholder {
  box-shadow: 0 10px 22px rgba(88, 52, 36, 0.12);
}

.weather-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 25%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0) 22%),
    linear-gradient(140deg, #d8edfa 0%, #c0e6f7 36%, #d8f4ff 68%, #effcff 100%);
}

.weather-page .content {
  position: relative;
}

.weather-page .content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(18, 86, 118, 0.08) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.3;
}

.weather-page.home-page {
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 174, 102, 0.3) 0%, rgba(255, 174, 102, 0) 30%),
    linear-gradient(160deg, #efd1b3 0%, #d8ddd7 42%, #c7d8e1 100%);
}

.weather-page.home-page .content::before {
  background-image: radial-gradient(circle at 1px 1px, rgba(96, 64, 44, 0.08) 1px, transparent 0);
}

.weather-page.home-page .weather-chart {
  border-color: #c8ac92;
  box-shadow: 0 14px 28px rgba(88, 52, 36, 0.15);
}

.weather-page.home-page .weather-chart-synoptic,
.weather-page.home-page .weather-chart-forecast,
.weather-page.home-page .weather-chart-grafana {
  background: linear-gradient(165deg, #fff8ef 0%, #f4e4d4 48%, #e7d5c4 100%);
}

.weather-page.home-page .weather-chart h3 {
  color: #6f4533;
}

.weather-page.home-page .synoptic-viewer {
  border: 1px solid #c8ac92;
  background: linear-gradient(180deg, #fbf2e8 0%, #f2decb 65%, #e8d4c1 100%);
}

.weather-page.home-page .synoptic-image {
  background: #ebddce;
  border: 1px solid #c4a88f;
}

.weather-page.home-page .synoptic-source-select,
.weather-page.home-page .synoptic-speed-select {
  background: linear-gradient(180deg, #fffaf2, #efdcc9);
  color: #6b4635;
  border: 1px solid #bb987b;
}

.weather-page.home-page .select-arrow {
  color: #5f3b2c;
}

.weather-page.home-page .select-wrap::before {
  background: #d8bea4;
}

.weather-page.home-page .synoptic-playback-btn,
.weather-page.home-page .synoptic-fullscreen-btn,
.weather-page.home-page .synoptic-arrow {
  border-color: #9f7359;
  color: #fff7f0;
  background: linear-gradient(135deg, #9d6548, #b47a5a);
}

.weather-page.home-page .synoptic-arrow:hover,
.weather-page.home-page .synoptic-playback-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #88533b, #9d6548);
}

.site-header {
  padding: 1.25rem 1rem;
  background: #8db7cf;
  min-height: 190px;
  color: #f8fdff;
  position: relative;
  overflow: visible;
  box-shadow: 0 12px 32px rgba(15, 45, 71, 0.4);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/banner.png?v=20260311") no-repeat center 72%;
  background-size: cover;
  z-index: 0;
}

.weather-page .site-header::before {
  background: url("/banner-weather-v2.png?v=20260314") no-repeat center 72%;
  background-size: cover;
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(26, 90, 138, 0.1) 0%, rgba(102, 168, 212, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0;
  position: relative;
  z-index: 2;
}

.site-header h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tagline {
  margin: 0 0 0.9rem;
  color: #d8eef9;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0;
}

nav a {
  color: #eaf7ff;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}

.nav-links-dropdown > summary {
  color: #eaf7ff;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}

nav a:hover {
  border-bottom-color: #eaf7ff;
}

.nav-links-dropdown > summary:hover {
  border-bottom-color: #eaf7ff;
}

.nav-links-dropdown {
  position: relative;
}

.nav-links-dropdown > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.nav-links-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-links-dropdown > summary::after {
  content: "▼";
  font-size: 0.62rem;
  line-height: 1;
  transform: translateY(1px);
}

.nav-links-dropdown[open] > summary::after {
  content: "▲";
}

.nav-links-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 11.2rem;
  border: 1px solid rgba(234, 247, 255, 0.58);
  border-radius: 10px;
  background: rgba(24, 59, 81, 0.94);
  box-shadow: 0 10px 20px rgba(10, 26, 36, 0.35);
  overflow: hidden;
  z-index: 60;
}

.nav-links-menu a {
  display: block;
  padding: 0.42rem 0.62rem;
  border-bottom: none;
  color: #f4fbff;
}

.nav-links-menu a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-bottom: none;
}

.site-version {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(234, 247, 255, 0.72);
  color: #f4fbff;
  background: rgba(16, 54, 76, 0.45);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-page .site-version {
  border-color: rgba(255, 227, 193, 0.88);
  color: #fff6ec;
  background: rgba(78, 42, 25, 0.52);
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem 2rem;
}

.hero,
.panel,
.status-strip,
.weather-grid,
.weather-chart,
.weather-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(20, 64, 87, 0.07);
}

.hero {
  padding: 1.1rem 1rem 1.2rem;
  margin-bottom: 1rem;
}

.chart-placeholder {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(20, 64, 87, 0.07);
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.chart-placeholder .label {
  margin: 0 0 0.75rem;
  color: var(--sky-700);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.chart-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  color: var(--sky-700);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.hero h2 {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.grid-three {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.panel {
  padding: 1rem;
}

.panel h3 {
  margin-top: 0;
}

.mini {
  color: var(--ink-700);
  font-size: 0.92rem;
}

.panel a {
  color: var(--sky-700);
  font-weight: 600;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0.8rem;
}

.label {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.value {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.weather-banner {
  background: linear-gradient(135deg, #ffffff 0%, #e6f5ff 55%, #c9e9fa 100%);
  padding: 1rem;
  margin-bottom: 1rem;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.weather-card {
  padding: 0.8rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fdff, #eaf6fd);
  border: 1px solid var(--line);
}

.weather-card-wind {
  background: linear-gradient(160deg, #eefbff, #c9f0ff);
  border-color: #79c8ea;
}

.weather-card-gust {
  background: linear-gradient(160deg, #f2f5ff, #d9e0ff);
  border-color: #8ea3f4;
}

.weather-card-pressure {
  background: linear-gradient(160deg, #effff7, #ccf3df);
  border-color: #73c99d;
}

.weather-card-trend {
  background: linear-gradient(160deg, #fff5ec, #ffe0c6);
  border-color: #f1a46d;
}

.weather-card h3 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-card p {
  margin: 0.2rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.weather-chart {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  margin-bottom: 1rem;
  border-color: #9dcce5;
  box-shadow: 0 14px 28px rgba(19, 85, 119, 0.12);
}

.weather-chart::before {
  content: "";
  position: absolute;
  left: -12%;
  top: -75%;
  width: 56%;
  height: 240%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
  transform: rotate(15deg);
  pointer-events: none;
}

.weather-chart-forecast {
  background: linear-gradient(165deg, #ffffff 0%, #ecf8ff 46%, #dbf3ff 100%);
}

.weather-chart-synoptic {
  background: linear-gradient(165deg, #ffffff 0%, #ecf6ff 44%, #d9efff 100%);
}

.weather-chart-ai {
  background: linear-gradient(165deg, #ffffff 0%, #eef7ff 40%, #ddeeff 100%);
}

.weather-chart h3 {
  margin-bottom: 0.45rem;
  color: #124a66;
  letter-spacing: 0.01em;
}

/* ── Section collapse toggle ── */
.section-toggle {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  background: rgba(18, 74, 102, 0.1);
  color: #124a66;
  border: 1px solid rgba(18, 74, 102, 0.22);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}

.section-toggle:hover {
  background: rgba(18, 74, 102, 0.22);
}

.weather-chart.collapsed .section-toggle {
  transform: rotate(0deg); /* already showing + */
}

.weather-chart.collapsed .section-body {
  display: none;
}

.weather-chart.collapsed {
  padding-bottom: 0.8rem;
}

.chart-accents {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.chart-accents span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(205, 236, 251, 0.95));
  border: 1px solid #90c9e5;
  box-shadow: 0 3px 10px rgba(25, 99, 133, 0.16);
  font-size: 0.84rem;
  animation: drift-icon 4.8s ease-in-out infinite;
}

.chart-accents span:nth-child(2) {
  animation-delay: 0.8s;
}

.chart-accents span:nth-child(3) {
  animation-delay: 1.5s;
}

.chart-accents-forecast span {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(224, 245, 255, 0.95));
}

.chart-placeholder {
  margin-top: 0.7rem;
  border: 2px dashed #8dbfdd;
  border-radius: 10px;
  min-height: 160px;
  background: repeating-linear-gradient(
    -45deg,
    #f3fbff,
    #f3fbff 12px,
    #ebf6fd 12px,
    #ebf6fd 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-700);
  text-align: center;
  padding: 0.75rem;
}

.chart-forecast {
  background: repeating-linear-gradient(
    -45deg,
    #edf9ff,
    #edf9ff 12px,
    #d8f0fb 12px,
    #d8f0fb 24px
  );
}

.chart-synoptic {
  background: repeating-linear-gradient(
    -45deg,
    #eef5ff,
    #eef5ff 12px,
    #dae9ff 12px,
    #dae9ff 24px
  );
}


.synoptic-viewer {
  margin-top: 0.7rem;
  border: 1px solid #8dbfdd;
  border-radius: 12px;
  padding: 0.7rem;
  background: linear-gradient(180deg, #f8fcff 0%, #eaf5ff 65%, #e2f1ff 100%);
}

.synoptic-image {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #e4eef9;
  border: 1px solid #adc6dd;
  border-radius: 10px;
  display: block;
}

/* ── synoptic toolbar (title + source dropdown) ── */
.synoptic-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.synoptic-toolbar .mini { margin: 0; }

.mini {
  margin: 0;
  color: #2f5972;
  font-size: 0.88rem;
}

.ai-prompt-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0;
}

.ai-preset-wrap .synoptic-source-select {
  width: 14rem;
}

.ai-admin-wrap .synoptic-source-select {
  width: 12.8rem;
}

.ai-prompt-input {
  width: 100%;
  border: 1px solid #9cc2dc;
  border-radius: 10px;
  background: #f6fbff;
  color: #14374b;
  font: inherit;
  line-height: 1.45;
  padding: 0.62rem 0.7rem;
  resize: vertical;
  min-height: 92px;
}

.ai-prompt-input:focus {
  outline: 2px solid #8dcfee;
}

.ai-prompt-input[readonly] {
  background: #eef5fa;
  color: #4d6373;
}

.ai-status {
  margin-top: 0.45rem;
}

.ai-responses {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.55rem;
}

.ai-response-card {
  position: relative;
  border: 1px solid #a8cbe2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
  padding: 0.55rem 2.2rem 0.55rem 0.65rem;
}

.ai-response-toggle {
  position: absolute;
  top: 0.48rem;
  right: 0.5rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgba(18, 74, 102, 0.24);
  border-radius: 50%;
  background: rgba(18, 74, 102, 0.1);
  color: #124a66;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ai-response-toggle:hover {
  background: rgba(18, 74, 102, 0.22);
}

.ai-response-card.collapsed .ai-response-content {
  display: none;
}

.ai-response-card.is-error {
  border-color: #ce8f93;
  background: linear-gradient(180deg, #fff8f8 0%, #ffeef0 100%);
}

.ai-response-header {
  color: #174764;
  font-weight: 700;
  font-size: 0.9rem;
}

.ai-response-meta {
  margin-top: 0.1rem;
  color: #3e6883;
  font-size: 0.78rem;
}

.ai-response-text {
  margin: 0.35rem 0 0;
  font: inherit;
  color: #1f3e51;
}

.ai-response-text h2,
.ai-response-text h3,
.ai-response-text h4 {
  margin: 0.35rem 0 0.3rem;
  color: #184962;
  line-height: 1.3;
}

.ai-response-text h2 { font-size: 1rem; }
.ai-response-text h3 { font-size: 0.94rem; }
.ai-response-text h4 { font-size: 0.9rem; }

.ai-response-text p {
  margin: 0.3rem 0;
}

.ai-response-text ul {
  margin: 0.35rem 0 0.35rem 1.1rem;
  padding: 0;
}

.ai-response-text li {
  margin: 0.2rem 0;
}

.ai-response-text code {
  background: rgba(31, 111, 156, 0.12);
  border-radius: 4px;
  padding: 0.02rem 0.3rem;
  font-size: 0.92em;
}

.ai-response-text a {
  color: #1f6f9c;
  text-decoration: underline;
}

.synoptic-controls-bottom {
  margin-top: 0;
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.synoptic-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.synoptic-controls-bottom .synoptic-toolbar-controls {
  gap: 0.34rem;
}

.synoptic-controls-bottom .select-wrap-source .synoptic-source-select {
  width: 15.2rem;
}

.synoptic-controls-bottom .select-wrap-speed .synoptic-speed-select {
  width: 5.15rem;
}

.synoptic-controls-bottom .synoptic-playback-btn {
  min-width: 4rem;
}

.synoptic-controls-bottom .synoptic-fullscreen-btn {
  min-width: 5.2rem;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-arrow {
  position: absolute;
  right: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  line-height: 1;
  color: #12485f;
  pointer-events: none;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
}

.select-wrap::before {
  content: "";
  position: absolute;
  right: 1.9rem;
  top: 0;
  width: 1px;
  height: 100%;
  background: #b8d8ea;
  pointer-events: none;
}

.synoptic-source-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: linear-gradient(180deg, #f7fdff, #dff1fb);
  color: #0f4d68;
  border: 1px solid #4f97bc;
  border-radius: 8px;
  padding: 0.35rem 2.2rem 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.synoptic-source-select:focus { outline: 2px solid #8dcfee; }

.synoptic-speed-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: linear-gradient(180deg, #f7fdff, #dff1fb);
  color: #0f4d68;
  border: 1px solid #4f97bc;
  border-radius: 8px;
  padding: 0.35rem 2.2rem 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
}

.synoptic-speed-select:focus {
  outline: 2px solid #8dcfee;
}

.synoptic-source-select option {
  color: #123e56;
  background: #f4fbff;
}

.synoptic-speed-select option {
  color: #123e56;
  background: #f4fbff;
}

.synoptic-playback-btn {
  border: 1px solid #4f97bc;
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  min-width: 4.3rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #f4fbff;
  background: linear-gradient(135deg, #1b698f, #2e89b8);
  cursor: pointer;
}

.synoptic-playback-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #145571, #1f6f93);
}

.synoptic-playback-btn:focus {
  outline: 2px solid #8dcfee;
}

.synoptic-fullscreen-btn {
  border: 1px solid #4f97bc;
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  min-width: 5.8rem;
  font-weight: 700;
  font-size: 0.84rem;
  color: #f4fbff;
  background: linear-gradient(135deg, #245d80, #347da8);
  cursor: pointer;
}

.synoptic-fullscreen-btn:focus {
  outline: 2px solid #8dcfee;
}

.synoptic-viewer {
  position: relative;
}

.synoptic-fs-overlay {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 30;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(179, 220, 242, 0.6);
  background: rgba(12, 43, 63, 0.68);
  backdrop-filter: blur(6px);
  transition: opacity 0.2s ease;
}

.synoptic-fs-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.synoptic-fs-btn,
.synoptic-fs-speed-select {
  border: 1px solid rgba(146, 205, 236, 0.72);
  border-radius: 999px;
  color: #eaf7ff;
  background: rgba(24, 86, 122, 0.74);
  font-weight: 700;
  cursor: pointer;
}

.synoptic-fs-btn {
  min-width: 2.45rem;
  height: 2.2rem;
  padding: 0 0.75rem;
}

.synoptic-fs-speed-select {
  appearance: none;
  height: 2.2rem;
  padding: 0 1.6rem 0 0.7rem;
  background: rgba(24, 86, 122, 0.74) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23eaf7ff' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 0.55rem center;
  background-size: 10px;
}

.synoptic-fs-speed-select option {
  color: #123e56;
  background: #f4fbff;
}

.synoptic-viewer.is-fullscreen {
  background: #051723;
  border: none;
  border-radius: 0;
  padding: 0;
}

.synoptic-viewer.is-fullscreen .synoptic-image {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border: none;
  border-radius: 0;
  background: #051723;
}

.synoptic-viewer.is-fullscreen .synoptic-timeline-wrap,
.synoptic-viewer.is-fullscreen .synoptic-footer {
  display: none;
}

.synoptic-viewer.is-fullscreen .synoptic-fs-overlay {
  display: flex;
}

/* ── timeline scrubber ── */
.synoptic-timeline-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.synoptic-arrow {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid #5c95bd;
  border-radius: 50%;
  background: #1f6f9c;
  color: #f4fbff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.synoptic-arrow:hover { background: #175c82; }

.synoptic-arrow,
.synoptic-source-select,
.synoptic-speed-select,
.synoptic-playback-btn,
.synoptic-fullscreen-btn,
.tl-marker {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.synoptic-arrow:hover,
.synoptic-source-select:hover,
.synoptic-speed-select:hover,
.synoptic-playback-btn:hover,
.synoptic-fullscreen-btn:hover,
.tl-marker:hover {
  box-shadow: 0 5px 14px rgba(23, 92, 130, 0.25);
}

.synoptic-timeline {
  flex: 0 1 82%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0.5rem 0 1.8rem;   /* bottom room for labels */
}

.tl-track {
  position: relative;
  height: 5px;
  background: #c8dff0;
  border-radius: 3px;
  cursor: grab;
}
.tl-track.tl-dragging,
.tl-track.tl-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.tl-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: #1f6f9c;
  border-radius: 3px;
  transition: width 0.2s ease;
  pointer-events: none;
}

.tl-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #1f6f9c;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
  z-index: 1;
}
.tl-marker:hover {
  transform: translate(-50%, -50%) scale(1.35);
}
.tl-marker.active {
  background: #1f6f9c;
  transform: translate(-50%, -50%) scale(1.25);
}

.tl-tick-label {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1f5d82;
  pointer-events: none;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.tl-tick-label.tl-day-marker {
  font-size: 0.8rem;
  font-weight: 700;
  color: #144763;
  background: linear-gradient(135deg, #e7f5ff 0%, #d8edf9 100%);
  padding: 0.18rem 0.46rem;
  box-shadow: 0 1px 3px rgba(31, 89, 130, 0.14);
  border: 1px solid #8fc1dc;
}

.synoptic-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.45rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.synoptic-footer-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.synoptic-label {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #d7eafb;
  color: #204b66;
  font-weight: 700;
  font-size: 0.85rem;
}

.synoptic-footer a {
  font-size: 0.8rem;
  color: #1f6f9c;
  font-weight: 600;
  text-decoration: none;
}
.synoptic-footer a:hover { text-decoration: underline; }

.site-footer {
  padding: 1rem;
  text-align: center;
  color: var(--ink-700);
}

@keyframes drift-icon {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@media (max-width: 900px) {
  .grid-three,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header,
  .header-inner {
    min-height: 98px;
  }

  .site-header::before {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
  }

  nav {
    gap: 0.7rem;
    font-size: 0.88rem;
  }

  .site-version {
    font-size: 0.66rem;
    padding: 0.06rem 0.36rem;
  }

  .content {
    padding: 0.9rem 0.7rem 1.2rem;
  }

  .hero,
  .panel,
  .status-strip,
  .weather-chart,
  .chart-placeholder {
    border-radius: 12px;
  }

  .weather-chart {
    padding: 0.75rem 0.65rem 0.8rem;
  }

  .weather-chart h3 {
    font-size: 1.02rem;
  }

  .synoptic-toolbar {
    align-items: flex-start;
    gap: 0.55rem;
  }

  .synoptic-controls-bottom {
    margin-top: 0;
    width: 100%;
    margin-left: 0;
  }

  .synoptic-toolbar-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(86px, auto);
    gap: 0.45rem;
  }

  .select-wrap-source {
    grid-column: 1 / -1;
  }

  .select-wrap-source,
  .select-wrap-speed,
  .synoptic-playback-btn,
  .synoptic-fullscreen-btn {
    min-height: 44px;
  }

  .select-wrap-source .synoptic-source-select,
  .select-wrap-speed .synoptic-speed-select {
    width: 100%;
    min-height: 44px;
    font-size: 0.92rem;
  }

  .select-wrap-speed .synoptic-speed-select {
    font-size: 0.9rem;
  }

  .synoptic-playback-btn,
  .synoptic-fullscreen-btn {
    width: 100%;
    min-width: 0;
    font-size: 0.9rem;
    padding: 0.4rem 0.55rem;
  }

  .ai-prompt-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .ai-preset-wrap {
    grid-column: 1 / 2;
  }

  .ai-preset-wrap .synoptic-source-select,
  .ai-admin-wrap .synoptic-source-select {
    width: 100%;
    min-height: 42px;
  }

  .synoptic-viewer {
    padding: 0.5rem;
  }

  .synoptic-image {
    max-height: 56vh;
  }

  .synoptic-timeline-wrap {
    gap: 0.35rem;
  }

  .synoptic-arrow {
    width: 2.2rem;
    height: 2.2rem;
  }

  .synoptic-timeline {
    padding-bottom: 1.45rem;
  }

  .tl-marker:nth-child(even) .tl-tick-label {
    display: none;
  }

  .tl-tick-label {
    font-size: 0.67rem;
    top: 13px;
  }

  .synoptic-footer {
    align-items: stretch;
    gap: 0.45rem;
  }

  .synoptic-footer-main {
    justify-content: space-between;
    width: 100%;
  }

  .wind-chart-toolbar {
    gap: 0.55rem;
    padding: 0;
  }

  .wind-current-val {
    font-size: 1.25rem;
    min-width: 0;
  }

  .weather-grid {
    grid-template-columns: 1fr;
  }

  .chart-accents span {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.78rem;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .site-header,
  .header-inner {
    min-height: 74px;
  }

  nav {
    gap: 0.55rem;
    font-size: 0.84rem;
  }

  .site-version {
    font-size: 0.62rem;
  }

  .content {
    padding-top: 0.6rem;
  }

  .synoptic-image {
    max-height: 68vh;
  }
}

/* ── Wind chart ─────────────────────────────────────────── */
.wind-chart-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.wind-current-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sky-700);
  letter-spacing: 0.02em;
  min-width: 5rem;
}

.wind-status {
  font-size: 0.78rem;
  color: var(--ink-700);
  opacity: 0.7;
  flex: 1;
}

.wind-chart-wrap {
  position: relative;
  width: 100%;
  max-height: 280px;
}

.wind-chart-wrap canvas {
  display: block;
  width: 100% !important;
  max-height: 280px;
}

.grafana-embed-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.grafana-embed {
  display: block;
  width: 100%;
  min-height: 200px;
  border: 0;
}
