@font-face {
  font-family: Overpass;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/overpass-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Overpass;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/overpass-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Overpass;
  font-weight: 700;
  font-display: swap;
  src: url(vendor/fonts/overpass-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Overpass;
  font-weight: 700;
  font-display: swap;
  src: url(vendor/fonts/overpass-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Overpass;
  font-weight: 800;
  font-display: swap;
  src: url(vendor/fonts/overpass-latin-ext-800-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Overpass;
  font-weight: 800;
  font-display: swap;
  src: url(vendor/fonts/overpass-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #0e2233;
  --ink-soft: #46596a;
  --paper: #ffffff;
  --panel: #eef3f6;
  --line: #c6d2da;
  --magenta: #a8007a;
  --red: #c8102e;
  --amber: #f5b800;
  --green: #17764a;
  --slate: #54646f;
  --gutter: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.35 Overpass, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

button, input { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }

.app {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "notice" "map" "panel";
  height: 100dvh;
}

.notice {
  grid-area: notice;
  margin: 0;
  padding: calc(6px + env(safe-area-inset-top)) var(--gutter) 6px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
}

.notice h1 { display: inline; margin: 0; font: inherit; font-weight: 800; }
.notice p { display: inline; margin: 0; }

.map { grid-area: map; min-height: 0; }

.map-tools {
  grid-area: map;
  justify-self: end;
  align-self: start;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 6px;
  margin: 10px;
}

.switch {
  display: flex;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.wx-status {
  margin: 0;
  padding: 3px 7px 1px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.switch button {
  min-height: 40px;
  padding: 2px 14px 0;
  border: 0;
  background: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.panel {
  grid-area: panel;
  max-height: 72dvh;
  overflow-y: auto;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}

/* A válasz: teljes szélességű jelzősáv, a pilóta egy pillantással lássa */
.verdict {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 10px var(--gutter) 8px;
  background: var(--band);
  color: var(--band-ink);
}

.verdict[data-level="red"] { --band: var(--red); --band-ink: #fff; }
.verdict[data-level="yellow"] { --band: var(--amber); --band-ink: var(--ink); }
.verdict[data-level="green"] { --band: var(--green); --band-ink: #fff; }
.verdict[data-level="unknown"] { --band: var(--slate); --band-ink: #fff; }
.verdict[data-level="wait"] { --band: var(--panel); --band-ink: var(--ink-soft); }

.verdict h2 { margin: 0; font-size: 24px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; }
.verdict p { margin: 2px 0 0; font-size: 15px; line-height: 1.2; }

.figure { text-align: right; line-height: 1; white-space: nowrap; }
.figure b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.figure span { font-size: 13px; }

.details { padding: 8px var(--gutter) 10px; border-bottom: 1px solid var(--line); }

.reasons { margin: 0 0 6px; padding: 0; list-style: none; line-height: 1.25; }
.reasons li { padding: 2px 0 2px 16px; position: relative; }
.reasons li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--magenta);
  transform: rotate(45deg);
}

.check-mds { margin: 0 0 6px; font-weight: 700; line-height: 1.25; }

.wind:not(:empty) { margin: 0 0 6px; padding: 5px 0; border-block: 1px solid var(--line); }
.wind p { margin: 0; }
.wind-main { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.wind-arrow {
  flex: none;
  width: 20px;
  height: 20px;
  background: var(--ink);
  clip-path: polygon(50% 0, 92% 92%, 50% 72%, 8% 92%);
}
.wind-strong { color: var(--red); font-weight: 700; }
.wind-source { font-size: 14px; color: var(--ink-soft); }

.flight:not(:empty) { margin: 0 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.flight-head { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-weight: 700; }
.flight-head[data-verdict="go"] b { color: var(--green); }
.flight-head[data-verdict="caution"] b { color: #9a6b00; }
.flight-head[data-verdict="no"] b { color: var(--red); }
.flight-items { margin: 3px 0 0; padding: 0 0 0 16px; font-size: 15px; line-height: 1.25; }
.flight-items li[data-level="stop"] { color: var(--red); font-weight: 700; }
.flight-more summary { min-height: 30px; padding-top: 5px; color: var(--magenta); font-weight: 700; cursor: pointer; }
.forecast { width: 100%; margin: 6px 0; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.forecast th { text-align: left; font-weight: 700; color: var(--ink-soft); }
.forecast td, .forecast th { padding: 2px 8px 2px 0; border-bottom: 1px solid var(--line); }
.forecast .over td { color: var(--red); font-weight: 700; }

.coords { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.coords code { font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; flex: 1; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 3px 8px 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.action.primary { background: var(--ink); color: #fff; }

.link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--magenta);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.controls { display: grid; gap: 8px; padding: 10px var(--gutter) 8px; background: var(--panel); }

.field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 10px; }
.field label { font-weight: 700; font-size: 15px; }
.field output { font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; color: var(--magenta); }

.field input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  accent-color: var(--magenta);
}

.toggle { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 14px; line-height: 1.25; cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--magenta); }

.drone { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.drone select, .drone input {
  min-width: 0;
  min-height: 40px;
  padding: 2px 6px 0;
  border: 1px solid var(--ink-soft);
  border-radius: 0;
  background: var(--paper);
  font-size: 16px;
  font-weight: 400;
}
.drone select { flex: 1; }
.drone input { width: 74px; }

.locate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }

.locate button {
  min-height: 44px;
  padding: 3px 10px 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.locate #gps { background: var(--ink); color: #fff; }

.locate input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 3px 8px 0;
  border: 1px solid var(--ink-soft);
  border-radius: 0;
  background: var(--paper);
  font-size: 16px;
}

.status { margin: 0; font-size: 14px; color: var(--ink-soft); }
.status[data-error] { color: var(--red); font-weight: 700; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 10px; margin: 0; font-size: 13px; color: var(--ink-soft); }
.foot-links { display: flex; gap: 12px; }

/* Telefonon a találat mellett csak a találatot befolyásoló vezérlők maradnak */
@media (max-width: 899px) {
  .has-result .locate, .has-result .status, .has-result .foot, .has-result .drone { display: none; }
}

/* A térképre rajzolt mérőjelek bíborban, ahogy a repülési térképeken */
.reticle { width: 44px; height: 44px; pointer-events: none; }

.leader-label {
  padding: 2px 6px 0;
  background: var(--magenta);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.maplibregl-ctrl-attrib { font-family: inherit; font-size: 11px; line-height: 1.25; }

.about {
  width: min(640px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  padding: 8px 18px 20px;
  border: 2px solid var(--ink);
  color: var(--ink);
}

.about::backdrop { background: rgb(14 34 51 / 55%); }
.about h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.about h3 { margin: 18px 0 4px; font-size: 18px; font-weight: 700; }
.about p { margin: 0 0 8px; max-width: 70ch; }
.about .close { float: right; min-height: 44px; }

.status-error { color: var(--red); font-weight: 700; }
.login-buttons { display: grid; gap: 10px; justify-items: start; margin: 10px 0; }
.action.apple { width: 260px; background: #000; border-color: #000; color: #fff; }
.account-list { margin: 0; padding: 0; list-style: none; }
.account-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.account-list .link { text-align: left; }
.link.quiet { color: var(--ink-soft); font-weight: 400; flex: none; }
.link.danger { color: var(--red); }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.card-actions { display: flex; gap: 16px; margin: 6px 0 0; }
.entry { width: min(420px, calc(100vw - 20px)); }
.entry-fields { display: grid; gap: 10px; margin: 10px 0 14px; }
.entry-field { display: grid; gap: 3px; font-weight: 700; }
.entry-field input {
  min-height: 44px;
  padding: 3px 8px 0;
  border: 1px solid var(--ink-soft);
  border-radius: 0;
  font-size: 16px;
  font-weight: 400;
}

.legend { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; }
.legend dt { padding: 2px 8px 0; align-self: start; font-weight: 800; }
.legend dd { margin: 0; }
.key-red { background: var(--red); color: #fff; }
.key-yellow { background: var(--amber); }
.key-green { background: var(--green); color: #fff; }

/* Szöveges oldalak */
.doc-head { padding: 10px var(--gutter); background: var(--ink); color: #fff; font-weight: 800; }
.doc-head a { text-decoration: none; }

.doc { max-width: 68ch; margin: 0 auto; padding: 20px var(--gutter) 32px; font-size: 17px; line-height: 1.5; }
.doc h1 { margin: 8px 0 12px; font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.doc h2 { margin: 28px 0 6px; font-size: 21px; line-height: 1.2; font-weight: 700; }
.doc p, .doc ol { margin: 0 0 10px; }
.doc li { margin-bottom: 4px; }
.doc .lead { font-size: 19px; line-height: 1.4; }
.doc .action { display: inline-flex; padding: 3px 18px 0; margin: 6px 0 4px; }
.doc .legend { margin-bottom: 10px; }
.doc-warning { margin-top: 28px; padding: 10px 12px 8px; border-left: 6px solid var(--magenta); background: var(--panel); font-size: 16px; }
.doc-foot { max-width: 68ch; margin: 0 auto; padding: 0 var(--gutter) 28px; font-size: 14px; color: var(--ink-soft); }

@media (min-width: 900px) {
  .app {
    grid-template-columns: 400px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "notice map" "panel map";
  }

  .notice { font-size: 14px; }

  .panel {
    max-height: none;
    display: flex;
    flex-direction: column;
    border-top: 0;
    border-right: 2px solid var(--ink);
  }

  .controls { order: -1; }
  .verdict h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: no-preference) {
  .verdict { transition: background-color 0.15s; }
}
