* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  background: #edf3ea;
  color: #163126;
  overflow: hidden;
}

.layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: 100vh;
  overflow: hidden;
}

.panel {
  height: 100vh;
  padding: 20px;
  background: rgba(250, 252, 248, 0.96);
  border-right: 1px solid rgba(22, 49, 38, 0.08);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel__header h1 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.panel__links {
  margin: 0 0 10px;
}

.panel__links a {
  color: #24523e;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.panel__eyebrow {
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: #557266;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge--muted {
  background: #e5ece5;
  color: #4f6458;
}

.badge--ok {
  background: #d8f7e3;
  color: #0a7a3d;
}

.group {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(34, 63, 49, 0.07);
}

.group__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #5d786c;
  margin-bottom: 12px;
}

.group__status {
  min-height: 18px;
  margin: -4px 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #5e786d;
}

.row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: #ebf0ea;
  color: #193226;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, opacity 120ms ease;
}

.btn--primary {
  background: #103f2f;
  color: #fff;
}

.btn--accent {
  background: #0ea5a4;
  color: #fff;
}

.btn.is-active {
  outline: 2px solid #ffb300;
}

.btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #557266;
}

.field input,
.field select {
  min-height: 38px;
  border: 1px solid rgba(22, 49, 38, 0.12);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
}

.field--check {
  flex-direction: row;
  align-items: center;
}

.hint {
  font-size: 12px;
  color: #678276;
  line-height: 1.5;
}

.hint--ok {
  color: #0a7a3d;
}

.hint--warn {
  color: #8d4b08;
}

.stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(22, 49, 38, 0.06);
}

.stat:last-child {
  border-bottom: 0;
}

.stat span {
  color: #668073;
  font-size: 13px;
}

.stat strong {
  font-size: 14px;
}

.log {
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f7f1;
  font-size: 12px;
  line-height: 1.5;
  color: #486257;
  white-space: pre-wrap;
}

.log--debug {
  max-height: 280px;
  background: #111917;
  color: #d6f3df;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.log--floating {
  min-height: 260px;
  max-height: min(44vh, 420px);
  font-size: 13px;
  line-height: 1.6;
}

.jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.jump-chip {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #eef6ea;
  color: #244132;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.jump-chip--start {
  background: #fff0c9;
}

.jump-chip--finish {
  background: #ffe2b8;
}

.map-shell {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.floating-debug-log {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 600;
  width: min(460px, calc(100vw - 480px));
  min-width: 360px;
  max-width: 520px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 22px 60px rgba(17, 33, 26, 0.22);
  backdrop-filter: blur(16px);
}

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

.floating-debug-log__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #4a6a5e;
}

.floating-debug-log__clear {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 33, 26, 0.1);
  color: #244132;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#map {
  width: 100%;
  height: 100vh;
}

.leaflet-container {
  background: #dfeadb;
}

.course-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-marker__control {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid #cc0077;
  color: #cc0077;
  background: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.course-marker__start {
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid #cc0077;
  filter: drop-shadow(0 3px 10px rgba(22, 49, 38, 0.22));
}

.course-marker__finish {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 4px solid #cc0077;
  background: rgba(255, 255, 255, 0.76);
}

.course-marker__finish::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  border: 3px solid #cc0077;
}
