@charset "UTF-8";

:root {
  --bg: #97a0aa;
  --panel: #d5dae0;
  --panel-soft: #eef1f4;
  --line: #7c858e;
  --text: #1f242a;
  --muted: #46505a;
  --accent: #695a2a;
  --point: #92d4d9;
  --point-dla: #f5b24d;
  --point-selected: #ff6f61;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #bcc3ca 0, #aab1b9 220px, #98a0a9 100%);
}

button,
input,
select {
  font: inherit;
}

a {
  color: #3d5872;
}

.archive-notice {
  padding: 8px 12px;
  background: linear-gradient(180deg, #eef2f6 0, #d5dbe1 100%);
  border-bottom: 1px solid #88929d;
  color: #26313b;
  font-size: 0.84rem;
  line-height: 1.55;
}

.archive-notice strong {
  color: #4c411f;
}

.archive-notice a {
  margin-left: 12px;
  font-weight: 700;
}

.obs-shell {
  width: min(1560px, calc(100% - 12px));
  margin: 0 auto;
  padding: 6px 0 14px;
}

.obs-header,
.obs-toolbar,
.obs-side,
.obs-map-panel,
.results-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #e8ecf0 0, #d1d6dc 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.18);
}

.obs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

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

.obs-header h1,
.results-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.obs-header h1 {
  font-size: clamp(1.35rem, 1.8vw, 2rem);
  line-height: 1.08;
}

.intro,
.results-head p,
.map-note,
.selection-card,
.stats-card,
.selection-empty {
  color: var(--muted);
  line-height: 1.6;
}

.intro {
  margin: 6px 0 0;
  max-width: 84ch;
  font-size: 0.93rem;
  line-height: 1.45;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.header-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 4px;
  text-decoration: none;
  color: #243241;
  border: 1px solid #8e97a0;
  background: linear-gradient(180deg, #f8f9fb 0, #d8dde3 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-size: 0.84rem;
}

.obs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 8px 10px;
  margin-top: 6px;
}

.field {
  display: grid;
  gap: 3px;
  min-width: 122px;
}

.field-search {
  flex: 1 1 220px;
}

.field span {
  color: var(--accent);
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.field input,
.field select,
.map-actions button,
.reset-button,
.zoom-controls button {
  min-height: 30px;
  border: 1px solid #8f99a3;
  border-radius: 3px;
  background: linear-gradient(180deg, #f8fafc 0, #e1e5ea 100%);
  color: var(--text);
  padding: 0 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
}

.field-toggle {
  min-width: 76px;
}

.field-toggle input {
  width: 100%;
}

.zoom-controls {
  display: inline-flex;
  gap: 8px;
}

.map-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.map-actions button,
.zoom-controls button {
  min-width: 36px;
  font-size: 0.84rem;
}

.map-actions button,
.reset-button {
  cursor: pointer;
}

.obs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: 10px;
  margin-top: 8px;
}

.obs-side,
.results-panel {
  padding: 10px;
}

.stats-card,
.selection-card {
  padding: 10px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f5f7fa 0, #e0e5ea 100%);
  border: 1px solid #a4adb7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.selection-card {
  margin-top: 8px;
}

.selection-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
}

.selection-card p {
  margin: 0;
  font-size: 0.87rem;
}

.selection-card dl {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  gap: 6px 10px;
  margin: 10px 0 0;
  font-size: 0.84rem;
}

.selection-card dt {
  color: var(--accent);
}

.selection-card dd {
  margin: 0;
  color: var(--text);
}

.obs-map-panel {
  padding: 8px;
}

.map-scroll {
  overflow: auto;
  border-radius: 3px;
  background: #616a75;
  border: 1px solid #5a626c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  max-height: min(86vh, 920px);
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
}

.map-scroll.is-dragging {
  cursor: grabbing;
}

.map-stage {
  position: relative;
  width: 781px;
  height: 661px;
}

.map-stage img,
.map-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.iris-shape {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 0.75;
}

.assoc-point {
  fill: var(--point);
  fill-opacity: 0.7;
  stroke: rgba(0, 0, 0, 0.28);
  stroke-width: 0.4;
  cursor: pointer;
  transition: fill-opacity 0.16s ease, r 0.16s ease;
}

.assoc-point.is-dla {
  fill: var(--point-dla);
  fill-opacity: 0.85;
}

.assoc-point.is-selected {
  fill: var(--point-selected);
  fill-opacity: 1;
}

.assoc-point:hover {
  fill-opacity: 1;
}

.map-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 210px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fffffc 0, #ece7d8 100%);
  border: 1px solid #8f8a72;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  color: #23201a;
  pointer-events: none;
}

.map-tooltip[hidden] {
  display: none;
}

.map-tooltip::after {
  content: "";
  position: absolute;
  left: 22px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: 1px solid #8f8a72;
  border-bottom: 1px solid #8f8a72;
  transform: rotate(45deg);
}

.map-tooltip[data-placement="top"]::after {
  bottom: -8px;
}

.map-tooltip[data-placement="bottom"]::after {
  top: -8px;
  transform: rotate(225deg);
}

.map-tooltip strong,
.map-tooltip span {
  display: block;
}

.map-tooltip strong {
  font-size: 0.98rem;
}

.map-tooltip span {
  margin-top: 4px;
  color: #5a5140;
  font-size: 0.88rem;
  line-height: 1.45;
}

.map-note {
  margin: 6px 0 0;
  font-size: 0.8rem;
}

.results-head h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: Tahoma, Verdana, Arial, sans-serif;
}

.results-head p {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.results-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: min(82vh, 900px);
  overflow: auto;
}

.result-item {
  width: 100%;
  text-align: left;
  padding: 10px 11px;
  border-radius: 4px;
  border: 1px solid #aab2bb;
  background: linear-gradient(180deg, #fafbfd 0, #e6eaef 100%);
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.result-item.is-selected {
  border-color: #8a7740;
  background: linear-gradient(180deg, #fff8d8 0, #ede0a8 100%);
}

.result-title {
  display: block;
  font-weight: 700;
}

.result-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.empty-state {
  padding: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f7f9fb 0, #e3e7ec 100%);
  color: var(--muted);
  border: 1px solid #a7afb8;
}

body[data-mode="simple"] .obs-layout {
  grid-template-columns: minmax(0, 1fr);
}

body[data-mode="simple"] .results-panel,
body[data-mode="simple"] .field--advanced {
  display: none;
}

body[data-mode="simple"] .obs-side {
  order: 2;
}

@media (max-width: 1100px) {
  .obs-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .obs-side,
  .results-panel {
    order: 2;
  }

  .obs-map-panel {
    order: 1;
  }
}

@media (max-width: 720px) {
  .obs-shell {
    width: calc(100% - 16px);
    padding-top: 8px;
  }

  .obs-header,
  .obs-toolbar,
  .obs-side,
  .obs-map-panel,
  .results-panel {
    padding: 10px;
    border-radius: 6px;
  }

  .obs-toolbar {
    gap: 10px;
  }

  .field,
  .field-search {
    flex-basis: 100%;
    min-width: 0;
  }

  .zoom-controls,
  .map-actions,
  .reset-button {
    width: 100%;
  }

  .map-actions button,
  .zoom-controls button {
    flex: 1;
  }

  .map-scroll {
    max-height: 60vh;
  }
}
