/* src/styles.css */
:root {
  color-scheme: dark;
  --bg: #05070f;
  --bg-2: #0c1122;
  --card: #111832;
  --border: #1e2846;
  --text: #e6ecff;
  --dim: #93a0c4;
  --faint: #5d6788;
  --aurora: #7be8c0;
  --aurora-deep: #28c48b;
  --amber: #ffc46b;
  --red: #ff6b6b;
  --blue: #6bb8ff;
  --violet: #a98cff;
}
* {
  box-sizing: border-box;
}
html,
body,
#root {
  height: 100%;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family:
    "Avenir Next",
    "Segoe UI",
    "Helvetica Neue",
    sans-serif;
  font-size: 14px;
  overflow: hidden;
}
button,
select {
  font: inherit;
  color: inherit;
}
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  grid-template-rows: 56px minmax(0, 1fr);
  height: 100%;
}
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 15, 0.92);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: -0.03em;
}
.brand h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.brand span {
  color: var(--faint);
  font-size: 12px;
}
.topbar .spacer {
  flex: 1;
}
.seg {
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  background: transparent;
  border: 0;
  color: var(--faint);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.seg button.on {
  background: var(--card);
  color: var(--text);
}
.refresh {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.refresh:hover {
  border-color: var(--aurora);
}
.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #03060e;
}
.map-slot {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.map-slot svg,
.stage svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hud {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.hud > * {
  pointer-events: auto;
}
.gps-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.gps-btn.on {
  border-color: #4db4ff;
  color: #d7f0ff;
}
.photo-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}
.photo-pin {
  position: absolute;
  pointer-events: auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #111 center / cover no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(123, 232, 192, 0.35);
  transform: translate(-50%, -50%);
  padding: 0;
  cursor: pointer;
}
.photo-pin.open {
  z-index: 16;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 3px #7be8c0;
}
.photo-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(4, 8, 16, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.photo-modal img {
  max-width: min(92vw, 720px);
  max-height: min(70vh, 720px);
  border-radius: 18px;
}
.photo-modal .meta {
  color: #dce6f8;
  margin-top: 10px;
  text-align: center;
}
.zoom-btns {
  position: absolute;
  right: 16px;
  top: 58px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zoom-btns button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(12, 17, 34, 0.9);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.chips,
.hours {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip,
.hour {
  background: rgba(12, 17, 34, 0.86);
  border: 1px solid var(--border);
  color: var(--faint);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.chip.on {
  color: var(--aurora);
  border-color: #2d6b55;
  background: rgba(18, 42, 36, 0.9);
}
.chip.on.clouds {
  color: #dce6f8;
  border-color: #5d6788;
}
.chip.on.dark {
  color: var(--blue);
  border-color: #355f88;
}
.chip.on.places {
  color: var(--amber);
  border-color: #8a6a32;
}
.hour.on {
  color: var(--text);
  border-color: var(--aurora);
}
.legend-float {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(12, 17, 34, 0.86);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--dim);
  backdrop-filter: blur(10px);
  line-height: 1.55;
}
.legend-float b {
  color: var(--text);
  font-weight: 600;
}
.side {
  border-left: 1px solid var(--border);
  background: var(--bg);
  overflow: auto;
  padding: 18px;
}
.score-block {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 8px;
}
.score {
  font-size: 72px;
  font-weight: 200;
  letter-spacing: -3px;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.score-meta {
  padding-bottom: 8px;
}
.score-meta .verdict {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.muted {
  color: var(--dim);
}
.faint {
  color: var(--faint);
}
.cap {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 18px 0 8px;
}
.factors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.factor {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.factor .n {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.wind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.wind .bz {
  grid-column: 1 / -1;
}
.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 18px;
}
.south {
  color: var(--aurora);
}
.north {
  color: var(--red);
}
.spark {
  display: block;
  margin-top: 8px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
  margin-bottom: 4px;
}
.bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  background: #0a1020;
  border-radius: 3px;
  cursor: pointer;
  min-width: 0;
}
.bar-fill {
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 3px;
}
.bar.on {
  outline: 1px solid var(--aurora);
}
.alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}
.hint {
  margin-top: 14px;
  line-height: 1.45;
}
.fab-post {
  display: none;
}
.composer {
  position: absolute;
  right: 16px;
  bottom: 88px;
  z-index: 30;
  width: min(360px, calc(100% - 32px));
  background: rgba(8, 12, 24, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.composer-head,
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.composer-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
}
.place {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.nights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.night {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.degraded {
  color: var(--amber);
  font-size: 12px;
  margin-top: 12px;
}
.loading,
.error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--dim);
}
.error {
  color: var(--amber);
  padding: 40px;
  text-align: center;
}
@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 44px minmax(0, 1fr) minmax(120px, 28vh);
  }
  .topbar {
    padding: 0 8px;
    gap: 6px;
    overflow-x: auto;
  }
  .brand span,
  .topbar .seg {
    display: none;
  }
  .side {
    border-left: 0;
    border-top: 1px solid var(--border);
    overflow: auto;
  }
  .score {
    font-size: 44px;
  }
  .fab-post {
    display: block;
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 25;
    border: 0;
    background: var(--aurora-deep);
    color: #04140e;
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
  .composer {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
  }
  .photo-pin {
    width: 52px !important;
    height: 52px !important;
  }
  .legend-float {
    display: none;
  }
  .hud {
    position: static;
    pointer-events: auto;
    padding: 8px 10px 10px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    gap: 8px;
    flex-shrink: 0;
  }
  .hours {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hours::-webkit-scrollbar {
    display: none;
  }
  .chip,
  .hour {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 12px;
  }
  .legend-float {
    top: 8px;
    left: 8px;
    max-width: min(58vw, 240px);
    padding: 6px 8px;
    font-size: 10px;
  }
  .gps-btn {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 11px;
  }
  .zoom-btns {
    right: 8px;
    top: 48px;
  }
  .zoom-btns button {
    width: 44px;
    height: 44px;
  }
}
