:root {
  color-scheme: dark;
  --yellow: #ffff00;
  --yellow-soft: #d9df18;
  --cyan: #00ffff;
  --cyan-soft: #57d9dc;
  --amber: #ffb000;
  --blue-hour: #7aa7ff;
  --black: #000;
  --ink: #050606;
  --panel: #0a0b0b;
  --card: #111313;
  --card-raised: #161818;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f6f1;
  --body: #c2c6c1;
  --muted: #858b86;
  --danger: #ff745c;
  --header-height: 76px;
  --panel-width: clamp(390px, 32vw, 500px);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --serif: 'Roboto Slab', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow: hidden;
  background: var(--black);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app-header {
  position: relative;
  z-index: 30;
  height: var(--header-height);
  display: grid;
  grid-template-columns: var(--panel-width) 1fr auto;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 0, 0.16);
  background: rgba(2, 3, 3, 0.97);
}

.brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 24px;
  color: var(--text);
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.brand-mark {
  position: relative;
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 0, 0.55);
  background: var(--yellow);
  color: var(--black);
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 18% 100%, 0 82%);
}

.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.22);
}

.brand-mark::before {
  width: 1px;
  height: 60px;
  transform: rotate(45deg);
}

.brand-mark::after {
  width: 60px;
  height: 1px;
  transform: rotate(45deg);
}

.brand-rotor {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
}

.brand-letter {
  position: relative;
  z-index: 1;
  font: 800 20px/1 var(--serif);
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.brand-copy strong {
  font: 700 18px/1 var(--serif);
}

.brand-copy span {
  color: var(--yellow);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-mission {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
}

.mission-kicker,
.header-status {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-kicker {
  color: var(--yellow);
}

.mission-title {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 22px;
  color: var(--body);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.09);
}

.status-divider {
  width: 1px;
  height: 13px;
  margin: 0 2px;
  background: var(--line-strong);
}

.atlas-shell {
  height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-width);
}

.map-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 42% 45%, rgba(32, 58, 54, 0.8), transparent 45%),
    #080a09;
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 28%, transparent 75%, rgba(0, 0, 0, 0.12));
}

.map-topbar {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.layer-legend,
.map-actions {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 7, 0.86);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
}

.layer-legend {
  gap: 15px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--body);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.03em;
}

.legend-label {
  color: var(--muted);
  text-transform: uppercase;
}

.layer-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  transform: rotate(45deg);
}

.legend-curated {
  border-radius: 50%;
  transform: none;
  border: 1px solid #10110b;
  background: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.18);
}

.legend-community {
  border: 1px solid #102020;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.15);
}

.map-actions {
  min-height: 38px;
}

.map-action {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--body);
  cursor: pointer;
  font: 500 10px/1 var(--mono);
  transition: color 140ms ease, background 140ms ease;
}

.map-action:first-child {
  border-left: 0;
}

.map-action:hover:not(:disabled) {
  background: rgba(255, 255, 0, 0.08);
  color: var(--yellow);
}

.map-action:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.drop-instruction {
  position: absolute;
  z-index: 5;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 0, 0.26);
  background: rgba(5, 7, 7, 0.88);
  color: var(--body);
  font: 500 11px/1.3 var(--mono);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  white-space: nowrap;
}

.drop-instruction strong {
  color: var(--yellow);
  font-weight: 500;
}

.sun-direction-chip {
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 176, 0, 0.4);
  background: rgba(8, 8, 6, 0.88);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

.sun-chip-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #151006;
  box-shadow: 0 0 20px rgba(255, 176, 0, 0.22);
  font-size: 15px;
}

.sun-direction-chip > span:last-child {
  display: grid;
  gap: 3px;
}

.sun-direction-chip small {
  color: var(--muted);
  font: 500 8px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sun-direction-chip strong {
  color: #ffd36b;
  font: 600 10px/1.2 var(--mono);
}

.crosshair {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1px solid var(--yellow);
  border-radius: 50%;
}

.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--yellow);
  transform: translate(-50%, -50%);
}

.crosshair::before {
  width: 17px;
  height: 1px;
}

.crosshair::after {
  width: 1px;
  height: 17px;
}

.map-setup {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 72px 34px 54px;
  overflow: auto;
  background:
    linear-gradient(rgba(5, 8, 7, 0.76), rgba(5, 8, 7, 0.92)),
    repeating-radial-gradient(ellipse at 28% 55%, transparent 0 21px, rgba(0, 255, 255, 0.07) 22px 23px, transparent 24px 38px),
    linear-gradient(135deg, #0a1210, #040505 70%);
}

.map-setup::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.setup-card {
  position: relative;
  width: min(680px, 100%);
  padding: 48px 50px 40px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-top: 3px solid var(--yellow);
  background: rgba(7, 9, 9, 0.92);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.58);
}

.setup-index {
  position: absolute;
  top: 17px;
  right: 19px;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.1em;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--yellow);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.setup-card h1,
.panel-welcome h1,
.panel-titlebar h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
}

.setup-card h1 {
  max-width: 560px;
  font-size: clamp(31px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.setup-card h1 span {
  color: var(--muted);
}

.setup-copy {
  max-width: 590px;
  margin: 24px 0 0;
  color: var(--body);
  line-height: 1.7;
}

code {
  padding: 2px 5px;
  border: 1px solid rgba(0, 255, 255, 0.15);
  background: rgba(0, 255, 255, 0.055);
  color: var(--cyan);
  font: 500 0.83em/1.4 var(--mono);
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.button-primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
}

.button-primary:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--black);
}

.button-quiet {
  color: var(--body);
}

.button-compact {
  min-height: 39px;
  padding: 0 15px;
}

.setup-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 22px;
  margin-top: 31px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 10px/1.3 var(--mono);
  list-style: none;
}

.setup-readiness li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ready-mark {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.08);
}

.map-error {
  position: absolute;
  z-index: 8;
  right: 18px;
  bottom: 20px;
  left: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 116, 92, 0.35);
  background: rgba(24, 9, 7, 0.92);
  color: #ffc6bc;
  font: 500 11px/1.5 var(--mono);
}

.map-unavailable .drop-instruction {
  display: none;
}

.briefing-panel {
  position: relative;
  z-index: 10;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 0, 0.13);
  background: var(--panel);
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

.briefing-panel::before {
  content: '';
  position: fixed;
  z-index: -1;
  width: var(--panel-width);
  height: 210px;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 0, 0.035), transparent 65%);
}

.briefing-panel::-webkit-scrollbar {
  width: 5px;
}

.briefing-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.17);
}

.panel-welcome {
  position: relative;
  min-height: 100%;
  padding: 64px 34px 34px;
  overflow: hidden;
}

.panel-welcome::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: 80px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(0, 255, 255, 0.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(0, 255, 255, 0.025),
    0 0 0 84px rgba(0, 255, 255, 0.015);
  pointer-events: none;
}

.welcome-number {
  position: absolute;
  top: 17px;
  right: 25px;
  color: rgba(255, 255, 255, 0.055);
  font: 800 88px/1 var(--serif);
}

.panel-welcome h1 {
  position: relative;
  font-size: clamp(36px, 3.2vw, 51px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.panel-welcome > p:not(.eyebrow):not(.welcome-note) {
  position: relative;
  max-width: 370px;
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.location-picker {
  position: relative;
  display: grid;
  margin-top: 24px;
}

.location-picker .button {
  min-width: 64px;
}

.welcome-guide {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 45px;
  border-top: 1px solid var(--line);
}

.welcome-guide > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.welcome-guide span {
  color: var(--yellow);
  font: 500 10px/1.5 var(--mono);
}

.welcome-guide p {
  margin: 0;
  color: var(--body);
  font-size: 13px;
}

.welcome-note {
  position: relative;
  margin: 35px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--cyan);
  color: var(--muted);
  font: 500 10px/1.7 var(--mono);
}

.panel-detail {
  min-height: 100%;
  animation: panel-enter 240ms ease both;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.panel-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 27px 27px 24px;
  border-bottom: 1px solid var(--line);
}

.place-type,
.source-pill,
.comment-count {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(0, 255, 255, 0.24);
  background: rgba(0, 255, 255, 0.05);
  color: var(--cyan);
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.place-type.curated {
  border-color: rgba(255, 255, 0, 0.28);
  background: rgba(255, 255, 0, 0.055);
  color: var(--yellow);
}

.panel-titlebar h1 {
  max-width: 380px;
  margin-top: 11px;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.coordinate-line {
  margin: 10px 0 0;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.04em;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 300 25px/1 var(--sans);
  transition: color 140ms ease, border-color 140ms ease;
}

.icon-button:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.place-description {
  margin: 0;
  padding: 20px 27px 0;
  color: var(--body);
  line-height: 1.65;
}

.place-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 27px 22px;
  margin: 0;
  list-style: none;
}

.place-tags:empty {
  display: none;
}

.place-tag {
  padding: 4px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.briefing-section {
  padding: 25px 27px 28px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-number {
  color: var(--yellow);
  font: 600 9px/1 var(--mono);
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font: 700 17px/1.15 var(--serif);
}

.text-button {
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  background: transparent;
  color: var(--cyan-soft);
  cursor: pointer;
  font: 500 9px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-button:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.weather-loading {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font: 500 10px/1.5 var(--mono);
}

.loading-line {
  width: 34px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.loading-line::after {
  content: '';
  width: 50%;
  height: 100%;
  display: block;
  background: var(--yellow);
  animation: scan 1s ease-in-out infinite alternate;
}

@keyframes scan {
  from { transform: translateX(-100%); }
  to { transform: translateX(200%); }
}

.section-message {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  color: var(--body);
  font-size: 12px;
}

.section-message strong {
  color: var(--text);
  font: 600 11px/1.3 var(--mono);
  text-transform: uppercase;
}

.section-message-error {
  border-color: rgba(255, 116, 92, 0.28);
  background: rgba(255, 116, 92, 0.04);
}

.weather-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
  padding: 2px 0 20px;
}

.weather-lead > div:first-child {
  display: grid;
  gap: 2px;
}

.weather-temperature {
  color: var(--text);
  font: 600 clamp(42px, 4vw, 61px)/0.95 var(--serif);
  letter-spacing: -0.055em;
}

.weather-condition {
  color: var(--body);
  font-size: 12px;
}

.weather-wind {
  display: grid;
  gap: 6px;
  padding-left: 15px;
  border-left: 1px solid var(--line-strong);
}

.weather-wind span,
.weather-wind small {
  color: var(--muted);
  font: 500 9px/1.2 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.weather-wind strong {
  color: var(--cyan);
  font: 500 18px/1.2 var(--mono);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric-grid > div {
  padding: 12px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.metric-grid dt {
  color: var(--muted);
  font: 500 8px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 6px 0 0;
  color: var(--text);
  font: 500 15px/1.2 var(--mono);
}

.data-timestamp {
  margin: 14px 0 0;
  color: var(--muted);
  font: 500 9px/1.45 var(--mono);
}

.data-attribution {
  display: inline-flex;
  gap: 5px;
  margin-top: 7px;
  color: var(--cyan-soft);
  font: 500 9px/1.4 var(--mono);
  text-decoration: none;
}

/* Filmmaker field kit */
.filmmaker-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 176, 0, 0.035), transparent 42%),
    linear-gradient(25deg, transparent 65%, rgba(122, 167, 255, 0.025));
}

.filmmaker-section::after {
  content: '';
  position: absolute;
  top: 0;
  right: 11px;
  width: 5px;
  height: 56px;
  opacity: 0.42;
  background: repeating-linear-gradient(to bottom, var(--amber) 0 5px, transparent 5px 9px);
  pointer-events: none;
}

.filmmaker-heading {
  align-items: flex-start;
}

.member-kit-pill {
  max-width: 136px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 176, 0, 0.25);
  background: rgba(255, 176, 0, 0.045);
  color: #e8b852;
  font: 500 8px/1.4 var(--mono);
  letter-spacing: 0.055em;
  text-align: right;
  text-transform: uppercase;
}

.planner-controls,
.scout-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.planner-controls {
  margin-top: 17px;
}

.planner-controls label,
.scout-form-grid label {
  display: grid;
  justify-content: stretch;
  gap: 6px;
  margin: 0;
}

.planner-timezone {
  margin: 8px 0 0;
  color: var(--muted);
  font: 500 8px/1.4 var(--mono);
}

.light-window-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.light-window {
  display: grid;
  gap: 7px;
  min-height: 68px;
  padding: 12px;
  background: #0a0c0c;
}

.light-window span {
  font: 500 8px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.light-window strong {
  color: var(--text);
  font: 500 11px/1.35 var(--mono);
}

.light-window-blue span {
  color: var(--blue-hour);
}

.light-window-gold span {
  color: var(--amber);
}

.sun-plan-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 176, 0, 0.21);
  background:
    radial-gradient(circle at 52px 50%, rgba(255, 176, 0, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.014);
}

.sun-compass {
  position: relative;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255, 255, 255, 0.08) 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, rgba(255, 255, 255, 0.08) 50%, transparent 50.5%);
}

.sun-compass::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.compass-north {
  position: absolute;
  z-index: 3;
  top: -7px;
  left: 50%;
  padding: 2px 4px;
  background: #0b0c0c;
  color: var(--muted);
  font: 500 7px/1 var(--mono);
  transform: translateX(-50%);
}

.sun-needle {
  position: absolute;
  z-index: 2;
  top: 7px;
  bottom: 46px;
  left: calc(50% - 1px);
  width: 2px;
  background: linear-gradient(var(--amber), rgba(255, 176, 0, 0.2));
  box-shadow: 0 0 8px rgba(255, 176, 0, 0.38);
  transform-origin: 50% 39px;
  transition: transform 220ms ease;
}

.sun-needle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -3px;
  border-right: 4px solid transparent;
  border-bottom: 7px solid var(--amber);
  border-left: 4px solid transparent;
}

.sun-compass b {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #161006;
  font: 400 11px/1 var(--sans);
  transform: translate(-50%, -50%);
}

.sun-plan-readout {
  min-width: 0;
}

.planned-light-phase {
  color: var(--amber);
  font: 600 8px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sun-plan-readout > strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font: 600 25px/1 var(--serif);
  letter-spacing: -0.025em;
}

.sun-plan-readout dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 0;
}

.sun-plan-readout dl > div {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.sun-plan-readout dt {
  color: var(--muted);
  font: 500 7px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sun-plan-readout dd {
  margin: 5px 0 0;
  color: var(--body);
  font: 500 11px/1 var(--mono);
}

.solar-note {
  margin: 10px 0 0;
  color: var(--muted);
  font: 500 8px/1.55 var(--mono);
}

.light-jump-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.button-light-jump {
  min-height: 37px;
  padding: 0 9px;
  border-color: rgba(255, 176, 0, 0.23);
  color: #e9c26a;
  font-size: 8px;
}

.button-light-jump:hover {
  border-color: var(--amber);
  color: #ffd36b;
}

.scout-composer {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.012);
}

.scout-composer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 14px;
  color: var(--text);
  cursor: pointer;
  font: 600 12px/1.3 var(--serif);
  list-style: none;
}

.scout-composer summary::-webkit-details-marker {
  display: none;
}

.scout-composer summary span {
  display: grid;
  gap: 3px;
}

.scout-composer summary small {
  color: var(--amber);
  font: 500 7px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scout-composer summary i {
  color: var(--amber);
  font: normal 400 20px/1 var(--sans);
  transition: transform 160ms ease;
}

.scout-composer[open] summary i {
  transform: rotate(45deg);
}

.scout-log-form {
  display: grid;
  padding: 15px 14px 16px;
  border-top: 1px solid var(--line);
}

.scout-log-form > label:not(:first-child),
.scout-log-form > .scout-form-grid {
  margin-top: 12px;
}

.scout-log-form > .button {
  margin-top: 13px;
}

.scout-log-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 0 9px;
  color: var(--muted);
  font: 500 8px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scout-log-heading strong {
  color: #e9bd59;
  font-weight: 500;
}

.scout-log-list {
  display: grid;
  gap: 9px;
}

.scout-log-card {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  background: rgba(255, 255, 255, 0.015);
}

.scout-log-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scout-log-card h3 {
  margin: 0;
  color: var(--text);
  font: 600 13px/1.35 var(--serif);
  overflow-wrap: anywhere;
}

.scout-log-type {
  flex: 0 0 auto;
  padding: 4px 6px;
  border: 1px solid rgba(122, 167, 255, 0.22);
  color: var(--blue-hour);
  font: 500 7px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scout-log-light {
  margin: 8px 0 0;
  color: #eac875;
  font: 500 8px/1.5 var(--mono);
}

.scout-log-card p {
  margin: 9px 0 0;
  color: var(--body);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.scout-log-card p span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font: 500 7px/1.3 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.scout-log-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 7px/1.4 var(--mono);
}

.scout-log-delete {
  padding: 0;
  border: 0;
  background: transparent;
  color: #d88a7c;
  cursor: pointer;
  font: 500 7px/1.4 var(--mono);
  text-transform: uppercase;
}

.scout-log-delete:hover {
  color: var(--danger);
}

.source-pill,
.comment-count {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.source-pill-community {
  border-color: rgba(0, 255, 255, 0.2);
  color: var(--cyan-soft);
}

.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.legal-card {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.legal-card-wide {
  grid-column: 1 / -1;
}

.legal-card.caution {
  background: rgba(255, 196, 0, 0.035);
}

.legal-card.fail {
  background: rgba(255, 116, 92, 0.045);
}

.legal-label {
  display: block;
  color: var(--muted);
  font: 500 8px/1.2 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.legal-card strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font: 600 13px/1.3 var(--serif);
}

.legal-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.legal-card p a {
  color: var(--cyan-soft);
  text-underline-offset: 3px;
}

.official-checks {
  margin-top: 15px;
  padding: 14px;
  border-left: 2px solid var(--yellow);
  background: rgba(255, 255, 0, 0.025);
}

.official-checks p {
  margin: 0 0 9px;
  color: var(--body);
  font: 600 9px/1.2 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.official-checks > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
}

.official-checks a {
  color: var(--yellow-soft);
  font: 500 10px/1.3 var(--mono);
  text-decoration: none;
}

.official-checks a:hover,
.data-attribution:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-intro {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--body);
  font: 500 9px/1.3 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

label span {
  color: var(--muted);
  font-weight: 400;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #070808;
  color: var(--text);
  caret-color: var(--yellow);
}

input {
  min-height: 39px;
  padding: 0 11px;
}

select {
  min-height: 39px;
  padding: 0 29px 0 11px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 16px,
    calc(100% - 10px) 16px;
  background-repeat: no-repeat;
  background-size: 4px 4px, 4px 4px;
}

textarea {
  min-height: 94px;
  padding: 10px 11px;
  line-height: 1.55;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #5c625e;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 255, 255, 0.55);
  outline: 0;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.form-error {
  margin: 8px 0 0;
  color: #ff9f90;
  font: 500 9px/1.5 var(--mono);
}

.portfolio-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  background: rgba(0, 255, 255, 0.035);
  color: var(--cyan-soft);
  font: 500 10px/1.4 var(--mono);
  text-decoration: none;
}

.portfolio-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.comments-list {
  display: grid;
  gap: 10px;
}

.comment-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 500 8px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-meta strong {
  overflow: hidden;
  color: var(--cyan-soft);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-body {
  margin: 9px 0 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comments-empty {
  margin: 0;
  padding: 19px 14px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.comment-form {
  display: grid;
  margin-top: 17px;
}

.comment-form label:not(:first-child) {
  margin-top: 12px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.form-footer > span {
  color: var(--muted);
  font: 500 8px/1 var(--mono);
}

.pin-actions {
  padding: 20px 27px;
  border-top: 1px solid var(--line);
}

.danger-button {
  width: 100%;
  min-height: 39px;
  border: 1px solid rgba(255, 116, 92, 0.25);
  background: rgba(255, 116, 92, 0.025);
  color: #ff9e8d;
  cursor: pointer;
  font: 500 9px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.danger-button:hover {
  border-color: var(--danger);
  background: rgba(255, 116, 92, 0.07);
}

.panel-disclaimer {
  padding: 23px 27px 30px;
  border-top: 1px solid rgba(255, 255, 0, 0.16);
  background: rgba(255, 255, 0, 0.02);
  color: var(--muted);
  font: 500 9px/1.65 var(--mono);
}

.panel-disclaimer strong {
  color: var(--yellow-soft);
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 100;
  right: calc(var(--panel-width) + 20px);
  bottom: 22px;
  max-width: 340px;
  padding: 12px 15px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  background: rgba(5, 9, 9, 0.95);
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font: 500 10px/1.5 var(--mono);
}

/* Mapbox controls and data layers */
.mapboxgl-ctrl-top-left {
  top: 66px;
  left: 8px;
}

.mapboxgl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: rgba(5, 7, 7, 0.88);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.mapboxgl-ctrl-group button {
  width: 34px;
  height: 34px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.mapboxgl-ctrl button .mapboxgl-ctrl-icon {
  filter: invert(1) brightness(1.4);
  opacity: 0.72;
}

.mapboxgl-ctrl-attrib {
  border-radius: 0;
  background: rgba(5, 7, 7, 0.75);
  color: var(--muted);
}

.mapboxgl-ctrl-attrib a {
  color: var(--body);
}

.mapboxgl-canvas {
  cursor: crosshair;
}

@media (max-width: 1180px) {
  :root {
    --panel-width: 410px;
  }

  .app-header {
    grid-template-columns: var(--panel-width) 1fr;
  }

  .header-status {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 64px;
  }

  body {
    overflow: hidden;
  }

  .app-header {
    grid-template-columns: auto 1fr;
  }

  .brand {
    padding: 0 15px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .header-mission {
    justify-content: flex-end;
    padding: 0 15px;
  }

  .mission-title {
    display: none;
  }

  .atlas-shell {
    position: relative;
    display: block;
  }

  .map-stage {
    position: absolute;
    inset: 0;
  }

  .briefing-panel {
    position: absolute;
    z-index: 12;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    height: min(50vh, 460px);
    border: 1px solid rgba(255, 255, 0, 0.2);
    box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.54);
    transition: height 180ms ease;
  }

  .briefing-panel.has-selection {
    height: min(70vh, 680px);
  }

  .briefing-panel::before {
    position: absolute;
    width: 100%;
  }

  .panel-welcome {
    min-height: 100%;
    padding: 32px 26px 25px;
  }

  .panel-welcome h1 {
    font-size: 34px;
  }

  .panel-welcome > p:not(.eyebrow):not(.welcome-note),
  .welcome-guide,
  .welcome-note {
    display: none;
  }

  .map-topbar {
    right: 10px;
    left: 10px;
  }

  .map-actions {
    display: none;
  }

  .drop-instruction {
    top: 70px;
    bottom: auto;
  }

  .sun-direction-chip {
    top: 115px;
    right: 10px;
    bottom: auto;
  }

  .map-setup {
    align-items: start;
    padding: 68px 18px calc(50vh + 25px);
  }

  .setup-card {
    padding: 37px 28px 29px;
  }

  .setup-card h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .toast {
    right: 20px;
    top: 142px;
    bottom: auto;
    left: 20px;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .brand-copy span,
  .mission-kicker {
    display: none;
  }

  .header-mission::after {
    content: 'PA · ATLAS 03';
    color: var(--yellow);
    font: 500 9px/1 var(--mono);
    letter-spacing: 0.08em;
  }

  .layer-legend {
    width: 100%;
    justify-content: center;
    gap: 12px;
    padding: 0 9px;
  }

  .legend-label {
    display: none !important;
  }

  .drop-instruction {
    font-size: 9px;
  }

  .briefing-panel {
    right: 0;
    bottom: 0;
    left: 0;
    height: 43vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .briefing-panel.has-selection {
    height: 72vh;
  }

  .panel-titlebar,
  .briefing-section,
  .pin-actions,
  .panel-disclaimer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .place-description,
  .place-tags {
    padding-right: 20px;
    padding-left: 20px;
  }

  .weather-lead {
    grid-template-columns: 1fr;
  }

  .weather-wind {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .member-kit-pill {
    display: none;
  }

  .sun-plan-card {
    grid-template-columns: 86px 1fr;
    gap: 11px;
    padding: 13px;
  }

  .sun-compass {
    width: 78px;
    height: 78px;
  }

  .sun-needle {
    top: 7px;
    bottom: 39px;
    transform-origin: 50% 32px;
  }

  .scout-form-grid {
    grid-template-columns: 1fr;
  }

  .legal-card-wide {
    grid-column: auto;
  }

  .setup-card {
    padding: 35px 21px 25px;
  }

  .setup-actions {
    display: grid;
  }

  .setup-readiness {
    display: grid;
  }

  .map-setup {
    padding-bottom: calc(43vh + 14px);
  }
}
