:root {
  color-scheme: dark;
  --bg: #0f1f2e;
  --panel: #162b3a;
  --panel-2: #203847;
  --panel-3: #102837;
  --text: #edf5f7;
  --muted: #9db1ba;
  --line: #385360;
  --accent: #78d5b7;
  --accent-2: #f3c969;
  --accent-amber: #efa96d;
  --chart-bg: #163246;
  --danger: #ec7b6f;
  --button: #274350;
  --shadow: rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.telegram-blocked {
  display: grid;
  place-items: center;
  padding: 18px;
}

.telegram-block {
  width: min(100%, 440px);
  padding: 22px;
  border: 1px solid rgba(120, 213, 183, 0.28);
  border-radius: 8px;
  background: rgba(22, 43, 58, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.telegram-block-brand {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.telegram-block h1 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.12;
}

.telegram-block p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.telegram-block button {
  width: 100%;
  min-height: 42px;
  border-color: rgba(120, 213, 183, 0.7);
  background: var(--accent);
  color: #082033;
  font-weight: 800;
}

.telegram-block small {
  display: block;
  margin-top: 12px;
  color: rgba(237, 245, 247, 0.58);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-block {
  min-width: 0;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-logo-wind {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.brand-logo-surf {
  width: 34px;
  height: 34px;
  opacity: 0.92;
}

.brand-plus {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.84;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-love {
  color: #ff6f73;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

.wind-headline {
  color: var(--text);
}

.wind-headline.wind-active {
  margin-bottom: 8px;
}

.wind-main-line {
  display: block;
}

.wind-word {
  position: relative;
  display: inline-block;
  text-decoration-color: transparent;
  text-decoration-line: none;
  text-decoration-thickness: 0.08em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.wind-word::after {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  top: 57%;
  height: 0.12em;
  border-radius: 999px;
  background: transparent;
  transform: translateY(-50%);
  transition: background 180ms ease;
}

.wind-blows-word {
  display: none;
}

.wind-active-hint {
  display: none;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.34em;
  font-weight: 700;
  line-height: 1.1;
}

.wind-headline.wind-active .wind-blows-word {
  display: inline;
}

.wind-headline.wind-active .wind-active-hint {
  display: block;
}

.wind-headline.wind-calm .wind-word {
  color: var(--text);
}

.wind-headline.wind-calm .wind-word::after {
  background: #ff6f73;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
}

.admin-entry {
  display: inline-flex;
  align-items: center;
  border-style: solid;
  border-width: 1px;
  border-radius: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-color: rgba(120, 213, 183, 0.42);
  background: rgba(16, 38, 52, 0.72);
  color: rgba(237, 245, 247, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-entry.active {
  border-color: rgba(120, 213, 183, 0.82);
  background: rgba(120, 213, 183, 0.18);
  color: var(--text);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.status.warning .status-dot {
  background: var(--accent-2);
}

.status.error .status-dot {
  background: var(--danger);
}

.header-compass {
  --wind-direction: 0deg;
  --wind-color-a: #4aa8ff;
  --wind-color-b: #78d5b7;
  --wind-color-edge: rgba(237, 245, 247, 0.72);
  width: 126px;
  min-height: 102px;
  display: grid;
  place-items: center;
}

.header-compass-ring {
  position: relative;
  width: 98px;
  height: 98px;
  border: 1.5px solid rgba(237, 245, 247, 0.38);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(22, 43, 58, 0.92) 0 39%, rgba(22, 43, 58, 0.62) 40% 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 31, 46, 0.68), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.header-compass-axis {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(237, 245, 247, 0.22);
  transform: translate(-50%, -50%);
}

.header-compass-axis-x {
  width: 78px;
  height: 1px;
}

.header-compass-axis-y {
  width: 1px;
  height: 78px;
}

.header-compass-axis-ne,
.header-compass-axis-nw {
  width: 1px;
  height: 76px;
  background: rgba(237, 245, 247, 0.12);
}

.header-compass-axis-ne {
  transform: translate(-50%, -50%) rotate(45deg);
}

.header-compass-axis-nw {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.header-compass-cardinal {
  position: absolute;
  z-index: 2;
  color: rgba(237, 245, 247, 0.84);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.48);
}

.header-compass-n {
  left: 50%;
  top: 5px;
  color: #ff6f73;
  transform: translateX(-50%);
}

.header-compass-e {
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.header-compass-s {
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
}

.header-compass-w {
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.header-compass-rhumb {
  position: absolute;
  z-index: 2;
  color: rgba(237, 245, 247, 0.42);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.42);
}

.header-compass-ne {
  right: 17px;
  top: 17px;
}

.header-compass-se {
  right: 17px;
  bottom: 17px;
}

.header-compass-sw {
  left: 17px;
  bottom: 17px;
}

.header-compass-nw {
  left: 17px;
  top: 17px;
}

.header-compass-pointer {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 76px;
  height: 27px;
  padding: 0 15px 0 10px;
  clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%, 8% 50%);
  background: linear-gradient(90deg, var(--wind-color-a), var(--wind-color-b));
  color: #06191d;
  box-shadow: 0 0 0 1px var(--wind-color-edge), 0 7px 12px rgba(0, 0, 0, 0.24);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translate(-100%, -50%) rotate(calc(var(--wind-direction) + 90deg));
  transform-origin: 100% 50%;
}

.header-compass-pointer strong {
  font-size: 14px;
  white-space: nowrap;
}

.header-compass-pointer span {
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.controls {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.control-group {
  min-width: 0;
}

.control-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #102634;
}

.ranges {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.segmented button {
  min-width: 58px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  flex: 0 0 auto;
}

.ranges button {
  position: relative;
  min-width: 52px;
  height: 36px;
  padding: 0 12px;
  border-color: rgba(56, 83, 96, 0.72);
  background: rgba(39, 67, 80, 0.58);
  color: var(--muted);
  flex: 0 0 auto;
}

.ranges button.has-extended-forecast::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(120, 213, 183, 0.16);
}

.segmented button.active {
  background: var(--accent);
  color: #0b201a;
  font-weight: 800;
}

.ranges button.active {
  border-color: rgba(120, 213, 183, 0.86);
  background: rgba(120, 213, 183, 0.16);
  color: var(--text);
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  white-space: nowrap;
}

.direction-metric strong {
  font-size: 31px;
  line-height: 1.12;
  white-space: nowrap;
}

.chart-panel,
.kite-stats-panel,
.tomorrow-wind-panel,
.forecast-panel,
.details,
.kiosk-fleet-panel,
.log-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px var(--shadow);
}

.chart-panel {
  padding: 14px;
  margin-bottom: 14px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.chart-head h2 {
  font-size: 20px;
}

.chart-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

#refreshButton {
  height: 38px;
  padding: 0 12px;
}

.chart-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.forecast-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.forecast-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.forecast-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.forecast-models {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.forecast-model {
  position: relative;
  min-height: 32px;
  padding: 0 11px 0 24px;
  border-color: rgba(56, 83, 96, 0.72);
  background: rgba(39, 67, 80, 0.48);
  color: var(--muted);
  font-size: 13px;
}

.forecast-model::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--model-color);
  opacity: 0.72;
  transform: translateY(-50%);
}

.forecast-model.active {
  border-color: color-mix(in srgb, var(--model-color) 70%, var(--line));
  background: color-mix(in srgb, var(--model-color) 18%, var(--panel));
  color: var(--text);
}

.forecast-model.lab {
  border-style: dashed;
}

.forecast-extend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.forecast-extend-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.forecast-extend-toggle input:checked + .toggle-track {
  border-color: rgba(120, 213, 183, 0.7);
  background: rgba(120, 213, 183, 0.22);
}

.forecast-extend-toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: var(--accent);
}

.forecast-extend-toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.forecast-freshness {
  max-width: 58%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.auto-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.auto-refresh input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  border: 1px solid rgba(157, 177, 186, 0.35);
  border-radius: 999px;
  background: rgba(39, 67, 80, 0.78);
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.auto-refresh input:checked + .toggle-track {
  border-color: rgba(120, 213, 183, 0.7);
  background: rgba(120, 213, 183, 0.22);
}

.auto-refresh input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: var(--accent);
}

.auto-refresh input:focus-visible + .toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#windChart {
  width: 100%;
  height: clamp(290px, 40vh, 460px);
  display: block;
  border-radius: 6px;
  background: var(--chart-bg);
  cursor: crosshair;
  touch-action: none;
}

.extended-forecast {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(56, 83, 96, 0.58);
}

.extended-forecast-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.extended-forecast-head h3 {
  font-size: 15px;
  line-height: 1.2;
}

.extended-forecast-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

#extendedForecastChart {
  width: 100%;
  height: clamp(220px, 24vh, 300px);
  display: block;
  border-radius: 6px;
  background: var(--chart-bg);
  cursor: crosshair;
  touch-action: none;
}

.chart-hover-tooltip {
  position: fixed;
  z-index: 9;
  left: 8px;
  top: 8px;
  width: min(300px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  padding: 10px 12px;
  border: 1px solid rgba(120, 213, 183, 0.42);
  border-radius: 8px;
  background: rgba(12, 29, 41, 0.94);
  box-shadow: 0 14px 28px var(--shadow);
  color: var(--text);
  pointer-events: none;
}

.chart-hover-title,
.chart-hover-row,
.chart-hover-tooltip small {
  display: block;
}

.chart-hover-title {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.15;
}

.chart-hover-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 7px;
  align-items: center;
  min-height: 19px;
  font-size: 12px;
  line-height: 1.25;
}

.chart-hover-row i {
  display: block;
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.chart-hover-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chart-hover-tooltip small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.details {
  padding: 4px 14px;
}

.forecast-panel {
  padding: 14px;
  margin-bottom: 14px;
}

.tomorrow-wind-panel {
  padding: 14px;
  margin-bottom: 14px;
}

.tomorrow-wind-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tomorrow-wind-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.tomorrow-wind-head > span {
  max-width: 48%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.tomorrow-wind-eyebrow {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tomorrow-wind-state {
  min-height: 44px;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid rgba(56, 83, 96, 0.62);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.72);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.tomorrow-wind-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
  gap: 10px;
  margin-top: 12px;
}

.tomorrow-wind-current,
.tomorrow-wind-scorecards article,
.tomorrow-wind-history {
  border: 1px solid rgba(56, 83, 96, 0.72);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.72);
}

.tomorrow-wind-current {
  display: flex;
  min-width: 0;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
}

.tomorrow-wind-current > span,
.tomorrow-wind-scorecards span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.tomorrow-wind-current > strong {
  margin: 7px 0 8px;
  font-size: clamp(31px, 4vw, 42px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.tomorrow-wind-current > small,
.tomorrow-wind-scorecards small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tomorrow-wind-current.signal-yes {
  border-color: rgba(120, 213, 183, 0.65);
  background: rgba(120, 213, 183, 0.1);
}

.tomorrow-wind-current.signal-yes > strong {
  color: var(--accent);
}

.tomorrow-wind-current.signal-no {
  border-color: rgba(157, 177, 186, 0.58);
}

.tomorrow-wind-current.signal-unknown {
  border-color: rgba(243, 201, 105, 0.58);
  background: rgba(243, 201, 105, 0.08);
}

.tomorrow-wind-current.signal-unknown > strong {
  color: var(--accent-2);
}

.tomorrow-wind-scorecards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.tomorrow-wind-scorecards article {
  display: flex;
  min-width: 0;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
}

.tomorrow-wind-scorecards strong {
  margin: 7px 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.tomorrow-wind-details {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 9px 12px;
  border: 1px solid rgba(56, 83, 96, 0.58);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.54);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.tomorrow-wind-shadow {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(120, 213, 183, 0.42);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(120, 213, 183, 0.08), transparent 42%),
    rgba(16, 40, 55, 0.66);
}

.tomorrow-wind-shadow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tomorrow-wind-shadow-head div > span {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tomorrow-wind-shadow-head h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.tomorrow-wind-shadow-head > strong {
  padding: 5px 8px;
  border: 1px solid rgba(243, 201, 105, 0.42);
  border-radius: 999px;
  background: rgba(243, 201, 105, 0.08);
  color: var(--accent-2);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.tomorrow-wind-shadow-intro {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.tomorrow-wind-shadow-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(56, 83, 96, 0.62);
  border-radius: 7px;
}

.tomorrow-wind-shadow-table {
  width: 100%;
  min-width: 390px;
  border-collapse: collapse;
  font-size: 12px;
}

.tomorrow-wind-shadow-table th,
.tomorrow-wind-shadow-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(56, 83, 96, 0.48);
  text-align: right;
}

.tomorrow-wind-shadow-table th:first-child {
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

.tomorrow-wind-shadow-table thead th {
  background: rgba(32, 56, 71, 0.62);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tomorrow-wind-shadow-table tbody td {
  color: var(--text);
  font-weight: 800;
}

.tomorrow-wind-shadow-table tbody td:last-child {
  color: var(--accent);
}

.tomorrow-wind-shadow-table tbody tr:last-child th,
.tomorrow-wind-shadow-table tbody tr:last-child td {
  border-bottom: 0;
}

.tomorrow-wind-shadow-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.tomorrow-wind-shadow-insights article {
  display: flex;
  min-width: 0;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(56, 83, 96, 0.52);
  border-radius: 7px;
  background: rgba(32, 56, 71, 0.46);
}

.tomorrow-wind-shadow-insights span,
.tomorrow-wind-shadow-insights small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.tomorrow-wind-shadow-insights strong {
  margin: 5px 0;
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.tomorrow-wind-shadow-recent {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(56, 83, 96, 0.52);
  border-radius: 7px;
  background: rgba(32, 56, 71, 0.34);
}

.tomorrow-wind-shadow-recent span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tomorrow-wind-shadow-recent p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.tomorrow-wind-history {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px;
}

.tomorrow-wind-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tomorrow-wind-history-head h3 {
  margin: 0;
  font-size: 14px;
}

.tomorrow-wind-history-head span {
  color: var(--muted);
  font-size: 11px;
}

.tomorrow-wind-history-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tomorrow-wind-history-item {
  display: grid;
  grid-template-columns: 72px minmax(96px, 0.45fr) minmax(110px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(32, 56, 71, 0.72);
  font-size: 12px;
}

.tomorrow-wind-history-item > span {
  color: var(--muted);
}

.tomorrow-wind-history-item > strong,
.tomorrow-wind-history-item > small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tomorrow-wind-history-item > small {
  color: var(--muted);
  text-align: right;
}

.tomorrow-wind-history-item.correct > small {
  color: var(--accent);
}

.tomorrow-wind-history-item.incorrect > small {
  color: var(--danger);
}

.tomorrow-wind-history-item.pending > small {
  color: var(--accent-2);
}

.tomorrow-wind-history-list .empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.kite-stats-panel {
  padding: 14px;
  margin-bottom: 14px;
}

.kite-stats-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.kite-stats-head h2 {
  font-size: 20px;
}

.kite-stats-head > div > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.kite-stats-view-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #102634;
}

.kite-stats-view-toggle button {
  min-width: 76px;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.kite-stats-view-toggle button.active {
  background: rgba(120, 213, 183, 0.16);
  color: var(--text);
  font-weight: 800;
}

.kite-stats-months {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.kite-stats-months button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 11px;
  border-color: rgba(56, 83, 96, 0.72);
  background: rgba(39, 67, 80, 0.52);
  color: var(--muted);
  font-size: 12px;
}

.kite-stats-months button.active {
  border-color: rgba(120, 213, 183, 0.78);
  background: rgba(120, 213, 183, 0.13);
  color: var(--text);
  font-weight: 800;
}

.kite-stats-state {
  min-height: 44px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(56, 83, 96, 0.62);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.72);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.kite-stats-state-loading::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(120, 213, 183, 0.12);
}

.kite-stats-state-error {
  border-color: rgba(236, 123, 111, 0.28);
  color: rgba(237, 245, 247, 0.74);
}

.kite-stats-content {
  margin-top: 12px;
}

.kite-stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.kite-stat-card {
  --kite-stat-color: var(--accent);
  min-width: 0;
  min-height: 104px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--kite-stat-color) 34%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--kite-stat-color) 9%, transparent), transparent 72%),
    var(--panel-2);
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--kite-stat-color) 72%, transparent);
}

.kite-day-help-trigger {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.kite-day-help-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--kite-stat-color, var(--accent)) 86%, white);
  outline-offset: 2px;
}

.kite-stat-card.kite-day-help-trigger {
  width: 100%;
}

.kite-stat-card.kite-day-help-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--kite-stat-color) 68%, var(--line));
  box-shadow:
    inset 0 2px 0 color-mix(in srgb, var(--kite-stat-color) 82%, transparent),
    0 0 0 2px color-mix(in srgb, var(--kite-stat-color) 12%, transparent);
}

.kite-stat-card-mint {
  --kite-stat-color: var(--accent);
}

.kite-stat-card-yellow {
  --kite-stat-color: var(--accent-2);
}

.kite-stat-card-amber {
  --kite-stat-color: var(--accent-amber);
}

.kite-stat-card > span,
.kite-stat-card > small {
  display: block;
}

.kite-stat-card > span {
  color: var(--muted);
  font-size: 12px;
}

.kite-day-help-hint {
  display: inline-grid;
  width: 13px;
  height: 13px;
  margin-left: 2px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  opacity: 0.7;
  place-items: center;
  vertical-align: 1px;
}

.kite-stat-card > strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--text);
  font-size: clamp(25px, 2.4vw, 32px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kite-stat-card > small {
  color: rgba(237, 245, 247, 0.66);
  font-size: 11px;
  line-height: 1.32;
}

.kite-stats-tier-breakdown {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 560px);
  margin: 0;
  padding: 0;
  justify-self: start;
}

.kite-stats-tier {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid rgba(120, 213, 183, 0.28);
  border-radius: 7px;
  background: rgba(32, 56, 71, 0.66);
}

.kite-stats-tier-label,
.kite-stats-tier-count {
  min-width: 0;
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kite-stats-tier-label {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  overflow: hidden;
  color: rgba(237, 245, 247, 0.74);
  font-size: 11px;
  line-height: 1;
  text-overflow: ellipsis;
}

.kite-stats-tier-count {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.kite-stats-tier-ideal {
  border-color: rgba(243, 201, 105, 0.5);
  background:
    linear-gradient(180deg, rgba(243, 201, 105, 0.1), transparent),
    rgba(32, 56, 71, 0.7);
}

.kite-stats-tier-ideal .kite-stats-tier-label,
.kite-stats-tier-ideal .kite-tier-star {
  color: var(--accent-2);
}

.kite-stats-tier-ideal .kite-tier-star {
  display: inline-block;
  margin-right: 2px;
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(243, 201, 105, 0.38);
}

.kite-stats-tier-excellent {
  border-color: rgba(120, 213, 183, 0.42);
}

.kite-stats-tier-acceptable {
  border-color: rgba(157, 177, 186, 0.34);
}

.kite-stats-tier[aria-expanded="true"] {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--kite-stat-color, var(--accent)) 12%, transparent), transparent),
    rgba(32, 56, 71, 0.82);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--kite-stat-color, var(--accent)) 10%, transparent);
}

.kite-stats-tier-ideal {
  --kite-stat-color: var(--accent-2);
}

.kite-stats-tier-excellent {
  --kite-stat-color: var(--accent);
}

.kite-stats-tier-acceptable {
  --kite-stat-color: var(--muted);
}

.kite-day-help-popover {
  --kite-day-help-color: var(--accent);
  position: fixed;
  z-index: 12;
  top: var(--kite-day-help-top, 72px);
  left: var(--kite-day-help-left, 14px);
  width: var(--kite-day-help-width, min(304px, calc(100vw - 20px)));
  max-width: calc(100vw - 20px);
  padding: 11px 12px 11px 14px;
  border: 1px solid color-mix(in srgb, var(--kite-day-help-color) 44%, var(--line));
  border-radius: 10px;
  background: rgba(12, 29, 41, 0.98);
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--kite-day-help-color) 86%, transparent),
    0 14px 30px rgba(0, 0, 0, 0.34);
  color: var(--text);
}

.kite-day-help-popover[data-kind="ideal"] {
  --kite-day-help-color: var(--accent-2);
}

.kite-day-help-popover[data-kind="under"] {
  --kite-day-help-color: var(--accent-amber);
}

.kite-day-help-popover[data-kind="acceptable"] {
  --kite-day-help-color: var(--muted);
}

.kite-day-help-popover > strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.kite-day-help-popover > p {
  margin: 5px 0 0;
  color: rgba(237, 245, 247, 0.76);
  font-size: 12px;
  line-height: 1.42;
}

.kite-stats-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.kite-stats-insights.season-view {
  grid-template-columns: minmax(0, 1fr);
}

.kite-stats-season-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(56, 83, 96, 0.72);
  border-radius: 8px;
  background: rgba(32, 56, 71, 0.68);
}

.kite-stats-subhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.kite-stats-subhead span,
.kite-stats-subhead small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.kite-stats-subhead strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.15;
}

.kite-stats-subhead > small {
  max-width: 55%;
  text-align: right;
}

.kite-season-meter {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(157, 177, 186, 0.14);
}

.kite-season-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.kite-season-months {
  display: grid;
  gap: 6px;
}

.kite-season-month {
  padding: 8px;
  border: 1px solid rgba(56, 83, 96, 0.54);
  border-radius: 7px;
  background: rgba(16, 40, 55, 0.62);
}

.kite-season-month > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.kite-season-month span,
.kite-season-month small {
  color: var(--muted);
  font-size: 11px;
}

.kite-season-month strong {
  font-size: 13px;
}

.kite-season-month > small {
  display: block;
  margin: 3px 0 7px;
}

.kite-stats-quality {
  margin-top: 9px;
  color: rgba(157, 177, 186, 0.82);
  font-size: 11px;
  line-height: 1.35;
}

.kite-stats-method {
  position: relative;
  display: inline-flex;
}

.kite-stats-method summary {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(120, 213, 183, 0.42);
  border-radius: 999px;
  background: rgba(120, 213, 183, 0.1);
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  place-items: center;
}

.kite-stats-method summary::-webkit-details-marker {
  display: none;
}

.kite-stats-method summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kite-stats-method[open] summary {
  background: var(--accent);
  color: #082033;
}

.kite-stats-method-card {
  position: absolute;
  z-index: 9;
  top: calc(100% + 8px);
  left: 0;
  width: min(440px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(120, 213, 183, 0.38);
  border-radius: 8px;
  background: rgba(12, 29, 41, 0.98);
  box-shadow: 0 14px 28px var(--shadow);
}

.kite-stats-method-card > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.kite-stats-method-card p {
  color: rgba(237, 245, 247, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.kite-stats-method-card p + p {
  margin-top: 7px;
}

.title-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.help-popover {
  position: relative;
  display: inline-flex;
}

.help-button {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(120, 213, 183, 0.42);
  background: rgba(120, 213, 183, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.help-popup {
  position: fixed;
  z-index: 8;
  top: var(--help-popup-top, 72px);
  left: var(--help-popup-left, 14px);
  width: var(--help-popup-width, min(320px, calc(100vw - 28px)));
  max-width: calc(100vw - 28px);
  padding: 10px 11px;
  border: 1px solid rgba(120, 213, 183, 0.38);
  border-radius: 8px;
  background: rgba(12, 29, 41, 0.96);
  box-shadow: 0 14px 28px var(--shadow);
  color: var(--text);
  font-size: 12px;
  line-height: 1.42;
}

.forecast-benchmark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.forecast-score {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(56, 83, 96, 0.72);
  border-radius: 8px;
  background: var(--panel-2);
}

.forecast-score span,
.forecast-score small {
  display: block;
}

.forecast-score span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-score span {
  color: var(--muted);
  font-size: 12px;
}

.forecast-score strong {
  display: block;
  margin: 2px 0;
  font-size: 26px;
  line-height: 1;
}

.forecast-score small,
.forecast-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
}

.forecast-log {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.forecast-log-item {
  display: grid;
  grid-template-columns: 92px 104px 1fr;
  gap: 8px;
  min-height: 34px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(56, 83, 96, 0.58);
  border-radius: 8px;
  background: rgba(32, 56, 71, 0.68);
}

.forecast-log-item span,
.forecast-log-item small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-log-item strong {
  font-size: 13px;
  white-space: nowrap;
}

.details dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
}

.details div {
  min-width: 0;
  padding: 12px 10px;
}

.details dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.details dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kiosk-fleet-panel {
  margin-top: 14px;
  padding: 18px;
}

.kiosk-fleet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.kiosk-fleet-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.kiosk-fleet-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.kiosk-fleet-head > span {
  flex: 0 0 auto;
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.kiosk-fleet-panel.stale .kiosk-fleet-head > span {
  color: var(--accent-2);
}

.kiosk-fleet-summary {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.7fr);
  gap: 12px;
  margin-bottom: 14px;
}

.kiosk-fleet-overview {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--panel-2);
}

.kiosk-fleet-overview.success {
  border-left-color: var(--accent);
}

.kiosk-fleet-overview.warning {
  border-left-color: var(--accent-2);
}

.kiosk-fleet-overview.danger {
  border-left-color: var(--danger);
}

.kiosk-fleet-overview-label,
.kiosk-fleet-overview > strong {
  display: block;
}

.kiosk-fleet-overview-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kiosk-fleet-overview > strong {
  font-size: 20px;
  line-height: 1.2;
}

.kiosk-fleet-overview p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.kiosk-fleet-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.kiosk-fleet-facts > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.68);
}

.kiosk-fleet-facts dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.kiosk-fleet-facts dd {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.kiosk-fleet-facts small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.kiosk-fleet-settings {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.kiosk-fleet-message {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.kiosk-fleet-message strong {
  font-size: 16px;
}

.kiosk-fleet-message span {
  color: var(--muted);
  font-size: 13px;
}

.kiosk-fleet-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kiosk-fleet-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--muted);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.68);
}

.kiosk-fleet-card.success {
  border-top-color: var(--accent);
}

.kiosk-fleet-card.warning {
  border-top-color: var(--accent-2);
}

.kiosk-fleet-card.danger {
  border-top-color: var(--danger);
}

.kiosk-fleet-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 29px;
  margin-bottom: 12px;
}

.kiosk-fleet-card-head h3 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.kiosk-fleet-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.kiosk-fleet-card.success .kiosk-fleet-status {
  border-color: rgba(120, 213, 183, 0.58);
  background: rgba(120, 213, 183, 0.12);
}

.kiosk-fleet-card.warning .kiosk-fleet-status {
  border-color: rgba(243, 201, 105, 0.6);
  background: rgba(243, 201, 105, 0.12);
}

.kiosk-fleet-card.danger .kiosk-fleet-status {
  border-color: rgba(236, 123, 111, 0.66);
  background: rgba(236, 123, 111, 0.13);
}

.kiosk-fleet-card-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.kiosk-fleet-card-facts > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  column-gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(56, 83, 96, 0.7);
}

.kiosk-fleet-card-facts dt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.kiosk-fleet-card-facts dd {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.kiosk-fleet-card-facts small {
  grid-column: 2;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.kiosk-fleet-card-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.kiosk-fleet-card-settings span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.kiosk-fleet-card-settings span.enabled {
  border-color: rgba(120, 213, 183, 0.42);
  color: var(--text);
}

.kiosk-fleet-technical {
  margin-top: 11px;
  border-top: 1px solid rgba(56, 83, 96, 0.7);
}

.kiosk-fleet-technical summary,
.kiosk-fleet-other summary {
  min-height: 44px;
  padding: 13px 2px 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.kiosk-fleet-technical summary:focus-visible,
.kiosk-fleet-other summary:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kiosk-fleet-technical dl {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 2px 0 6px 16px;
}

.kiosk-fleet-technical dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

.kiosk-fleet-technical dt,
.kiosk-fleet-technical dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.kiosk-fleet-technical dd {
  overflow-wrap: anywhere;
}

.kiosk-fleet-list .empty {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.kiosk-fleet-other {
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 40, 55, 0.45);
}

.kiosk-fleet-other details > p {
  margin: 0 0 12px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.kiosk-fleet-other ul {
  display: grid;
  gap: 7px;
  margin: 0 0 14px 18px;
  padding: 0;
  list-style: none;
}

.kiosk-fleet-other li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.kiosk-fleet-other li span {
  color: var(--muted);
  text-align: right;
}

.log-panel {
  padding: 14px;
}

.log-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.log-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.event-filters {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.event-filters button {
  min-height: 30px;
  padding: 0 10px;
  border-color: rgba(56, 83, 96, 0.72);
  background: rgba(39, 67, 80, 0.54);
  color: var(--muted);
  font-size: 12px;
}

.event-filters button.active {
  border-color: rgba(120, 213, 183, 0.76);
  background: rgba(120, 213, 183, 0.16);
  color: var(--text);
  font-weight: 800;
}

.log-head h2 {
  font-size: 20px;
}

.log-head p,
#logMeta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.event-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.event-item {
  display: grid;
  grid-template-columns: 78px 92px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(56, 83, 96, 0.72);
  border-radius: 8px;
  background: var(--panel-2);
}

.event-item.warning {
  border-color: rgba(243, 201, 105, 0.62);
}

.event-item.error {
  border-color: rgba(236, 123, 111, 0.72);
}

.event-time {
  display: inline-flex;
  flex-direction: column;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  white-space: nowrap;
}

.event-date {
  margin-top: 3px;
  color: rgba(166, 187, 198, 0.72);
  font-size: 10px;
  font-weight: 600;
}

.event-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 78px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(120, 213, 183, 0.16);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.event-badge.badge-receive {
  background: rgba(120, 213, 183, 0.15);
  color: #86e7c9;
}

.event-badge.badge-forward {
  background: rgba(119, 200, 232, 0.16);
  color: #89d5ef;
}

.event-badge.badge-probe {
  background: rgba(167, 148, 255, 0.15);
  color: #b9adff;
}

.event-badge.badge-warning {
  background: rgba(243, 201, 105, 0.16);
  color: var(--accent-2);
}

.event-badge.badge-error {
  background: rgba(236, 123, 111, 0.14);
  color: var(--danger);
}

.event-badge.badge-event {
  background: rgba(157, 177, 186, 0.14);
  color: var(--muted);
}

.event-main {
  min-width: 0;
}

.event-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-wind {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.event-log-empty {
  color: var(--muted);
  padding: 16px 4px 4px;
}

.app-footer {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.app-footer span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(56, 83, 96, 0.58);
  border-radius: 5px;
  background: rgba(39, 67, 80, 0.46);
}

.admin-dialog {
  width: min(100% - 28px, 390px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.admin-dialog::backdrop {
  background: rgba(4, 12, 18, 0.68);
}

.admin-card {
  padding: 18px;
  border: 1px solid rgba(120, 213, 183, 0.34);
  border-radius: 8px;
  background: #102634;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.admin-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-dialog-head h2 {
  font-size: 18px;
}

.admin-close {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.admin-password-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.admin-password-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 24, 34, 0.88);
  color: var(--text);
  font: inherit;
}

.admin-password-field input:focus {
  border-color: rgba(120, 213, 183, 0.82);
  outline: 0;
}

.admin-message {
  min-height: 18px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
}

.admin-message.ok {
  color: var(--accent);
}

.admin-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.admin-dialog-actions button {
  min-height: 36px;
  padding: 0 13px;
}

.admin-login-page {
  display: grid;
  place-items: center;
  padding: 18px;
}

.admin-login-bootstrap {
  width: min(100%, 390px);
}

.admin-login-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.admin-login-bootstrap .admin-dialog-head h1 {
  margin: 0;
  font-size: 22px;
}

.admin-login-bootstrap .admin-dialog-actions {
  align-items: center;
  justify-content: space-between;
}

.admin-login-bootstrap .admin-dialog-actions a {
  color: var(--muted);
  font-size: 12px;
}

#adminLoginSubmit {
  border-color: rgba(120, 213, 183, 0.72);
  background: var(--accent);
  color: #082033;
  font-weight: 800;
}

#adminSubmitButton {
  border-color: rgba(120, 213, 183, 0.72);
  background: var(--accent);
  color: #082033;
  font-weight: 800;
}

@media (max-width: 980px) {
  .kiosk-fleet-summary {
    grid-template-columns: 1fr;
  }

  .kiosk-fleet-settings {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 18px, 640px);
    padding-top: 14px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .status {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .topbar-actions .status {
    flex: 1 1 auto;
    width: auto;
  }

  .brand-row {
    gap: 7px;
  }

  .brand-logo-wind {
    width: 24px;
    height: 24px;
  }

  .brand-logo-surf {
    width: 30px;
    height: 30px;
  }

  h1 {
    font-size: 30px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .forecast-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .forecast-freshness {
    max-width: none;
    text-align: left;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .forecast-benchmark {
    grid-template-columns: 1fr;
  }

  .tomorrow-wind-content {
    grid-template-columns: 1fr;
  }

  .tomorrow-wind-history {
    grid-column: auto;
  }

  .kite-stats-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kite-stats-insights.season-view {
    grid-template-columns: 1fr;
  }

  .kite-stats-method-card {
    position: fixed;
    top: 72px;
    right: 9px;
    left: 9px;
    width: auto;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  .forecast-log-item {
    grid-template-columns: 82px 92px 1fr;
  }

  .metric {
    min-height: 86px;
  }

  .metric strong {
    font-size: 28px;
  }

  .direction-metric strong {
    font-size: 28px;
  }

  .details dl {
    grid-template-columns: 1fr 1fr;
  }

  .kiosk-fleet-panel {
    padding: 14px;
  }

  .kiosk-fleet-head {
    flex-direction: column;
    gap: 8px;
  }

  .kiosk-fleet-head > span {
    max-width: none;
    text-align: left;
  }

  .kiosk-fleet-facts {
    grid-template-columns: 1fr;
  }

  .kiosk-fleet-list {
    grid-template-columns: 1fr;
  }

  .kiosk-fleet-other li {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .kiosk-fleet-other li span {
    text-align: left;
  }

  .event-item {
    grid-template-columns: 68px 82px 1fr;
  }

  .event-wind {
    grid-column: 3;
  }
}

@media (max-width: 430px) {
  .tomorrow-wind-head {
    flex-direction: column;
    gap: 7px;
  }

  .tomorrow-wind-head > span {
    max-width: none;
    text-align: left;
  }

  .tomorrow-wind-scorecards {
    grid-template-columns: 1fr;
  }

  .tomorrow-wind-scorecards article {
    min-height: 108px;
  }

  .tomorrow-wind-shadow-head {
    flex-direction: column;
  }

  .tomorrow-wind-shadow-insights {
    grid-template-columns: 1fr;
  }

  .tomorrow-wind-shadow-table {
    min-width: 0;
    table-layout: fixed;
  }

  .tomorrow-wind-shadow-table th,
  .tomorrow-wind-shadow-table td {
    padding: 7px 6px;
    font-size: 11px;
  }

  .tomorrow-wind-history-item {
    grid-template-columns: 58px minmax(84px, 1fr);
  }

  .tomorrow-wind-history-item > small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .kite-stats-head {
    flex-direction: column;
  }

  .kite-stats-view-toggle {
    width: 100%;
  }

  .kite-stats-view-toggle button {
    flex: 1 1 50%;
  }

  .kite-stat-card {
    min-height: 104px;
    padding: 10px;
  }

  .kite-stat-card > strong {
    font-size: 25px;
  }

  .kite-stats-tier {
    min-height: 40px;
    gap: 3px;
    padding-inline: 6px;
  }

  .kite-stats-tier-label {
    font-size: 10.5px;
  }

  .kite-stats-subhead {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .kite-stats-subhead > small {
    max-width: none;
    text-align: left;
  }

  .header-compass {
    width: 118px;
    min-height: 98px;
    justify-items: end;
  }

  .header-compass-ring {
    width: 94px;
    height: 94px;
  }

  .header-compass-axis-x {
    width: 74px;
  }

  .header-compass-axis-y {
    height: 74px;
  }

  .header-compass-axis-ne,
  .header-compass-axis-nw {
    height: 72px;
  }

  .header-compass-pointer {
    width: 72px;
    height: 26px;
    padding-inline: 9px 14px;
  }

  .header-compass-cardinal {
    font-size: 12px;
  }

  .details dl {
    grid-template-columns: 1fr;
  }

  .log-head {
    flex-direction: column;
  }

  .log-actions {
    align-items: stretch;
    width: 100%;
  }

  .event-filters {
    justify-content: flex-start;
  }

  .forecast-log-item {
    grid-template-columns: 1fr;
  }

  .event-item {
    grid-template-columns: 1fr auto;
    align-items: flex-start;
  }

  .event-time,
  .event-badge,
  .event-main,
  .event-wind {
    grid-column: auto;
  }

  .event-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 350px) {
  .kite-stats-tier-breakdown {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .kite-stats-tier {
    min-height: 38px;
    padding-inline: 8px;
  }
}
