:root {
  --panel: #f8faf7;
  --ink: #13201c;
  --muted: #64736d;
  --line: #d9e2dd;
}

* {
  box-sizing: border-box;
}

html,
body,
.shell,
#map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  position: relative;
}

#map {
  background: #102315;
}

.panel {
  position: absolute;
  z-index: 500;
  top: 16px;
  left: 16px;
  width: min(330px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(19, 32, 28, 0.18);
}

.menu-toggle {
  position: absolute;
  z-index: 620;
  top: 14px;
  right: 14px;
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(19, 32, 28, 0.16);
  border-radius: 8px;
  background: rgba(248, 250, 247, 0.94);
  box-shadow: 0 8px 22px rgba(19, 32, 28, 0.18);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.panel-backdrop {
  position: absolute;
  z-index: 540;
  inset: 0;
  display: none;
  background: rgba(8, 20, 18, 0.22);
}

.locate-me {
  position: absolute;
  z-index: 520;
  right: 14px;
  bottom: 86px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(19, 32, 28, 0.16);
  border-radius: 999px;
  background: rgba(248, 250, 247, 0.94);
  box-shadow: 0 8px 22px rgba(19, 32, 28, 0.2);
  cursor: pointer;
}

.action-rail {
  position: absolute;
  z-index: 520;
  right: 14px;
  bottom: 28px;
  display: grid;
  gap: 10px;
}

.action-button {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(19, 32, 28, 0.16);
  border-radius: 999px;
  background: rgba(248, 250, 247, 0.95);
  box-shadow: 0 8px 22px rgba(19, 32, 28, 0.2);
  color: #2f64d6;
  cursor: pointer;
}

.action-button span {
  display: block;
  font-size: 26px;
  line-height: 48px;
  text-align: center;
}

.add-marker-button.is-active {
  background: #2f64d6;
  color: #ffffff;
}

.locate-me span,
.locate-me span::before {
  position: absolute;
  display: block;
  border-radius: 999px;
  content: "";
}

.locate-me span {
  top: 13px;
  left: 13px;
  width: 20px;
  height: 20px;
  border: 2px solid #1976d2;
}

.locate-me span::before {
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  background: #1976d2;
}

.location-pulse,
.boat-location-icon {
  background: transparent;
  border: 0;
}

.boat-location-icon {
  font-size: 27px;
  line-height: 32px;
  text-align: center;
  text-shadow: 0 2px 5px rgba(15, 23, 42, 0.5);
}

.geo-marker-label {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 42px;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  text-shadow: 0 1px 2px #000000, 0 0 3px #000000;
}

.geo-marker-label .marker-symbol {
  display: block;
  font-size: 24px;
  line-height: 25px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.geo-marker-label .marker-name {
  display: block;
}

.menu-sections {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.menu-sections button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-sections button:hover {
  background: rgba(19, 32, 28, 0.06);
}

.marker-editor {
  position: absolute;
  z-index: 680;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 12px;
  padding: 14px 12px 18px;
  border-radius: 18px 18px 0 0;
  background: rgba(253, 247, 255, 0.98);
  box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.28);
}

.marker-editor[hidden] {
  display: none;
}

.marker-editor-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.marker-editor-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.marker-editor-header button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.marker-editor-header .danger {
  color: #b42318;
  text-align: right;
}

.marker-icon-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}

.marker-icon-picker button {
  min-height: 42px;
  border: 1px solid rgba(19, 32, 28, 0.12);
  border-radius: 6px;
  background: rgba(19, 32, 28, 0.08);
  font-size: 25px;
  cursor: pointer;
}

.marker-icon-picker button.is-selected {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 0 0 2px #2f64d6 inset;
}

.marker-name-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.marker-name-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.map-settings {
  position: absolute;
  z-index: 650;
  top: 16px;
  left: 16px;
  width: min(330px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(19, 32, 28, 0.18);
}

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

.settings-toolbar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.settings-toolbar h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.settings-icon-button {
  width: 74px;
  height: 38px;
  border: 1px solid rgba(19, 32, 28, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 15px;
  line-height: 38px;
  cursor: pointer;
}

.map-settings .toggles {
  margin: 12px 14px 14px;
}

body.is-panel-open .leaflet-control-zoom,
body.is-map-settings-open .leaflet-control-zoom,
body.is-points-manager-open .leaflet-control-zoom,
body.is-map-downloads-open .leaflet-control-zoom,
body.is-account-screen-open .leaflet-control-zoom {
  display: none;
}

body.is-auth-locked .panel,
body.is-auth-locked .menu-toggle,
body.is-auth-locked .locate-me,
body.is-auth-locked .action-rail {
  pointer-events: none;
  opacity: 0.35;
}

.points-manager {
  position: absolute;
  z-index: 660;
  top: 16px;
  left: 16px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid #e0d5e4;
  border-radius: 8px;
  background: rgba(255, 248, 255, 0.98);
  color: #241c27;
  box-shadow: 0 14px 34px rgba(20, 12, 28, 0.2);
}

.points-manager[hidden] {
  display: none;
}

.map-downloads {
  position: absolute;
  z-index: 660;
  inset: 0 auto 0 0;
  width: min(720px, 100vw);
  max-height: 100vh;
  overflow: auto;
  border: 0;
  border-right: 1px solid #d7e0d9;
  border-radius: 0;
  background: rgba(248, 250, 247, 0.98);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(19, 32, 28, 0.18);
}

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

.map-downloads-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid #d7e0d9;
  background: rgba(248, 250, 247, 0.98);
}

.map-downloads-toolbar h2 {
  overflow: hidden;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-downloads-icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 26px;
  line-height: 38px;
  cursor: pointer;
}

.map-downloads-search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 14px 16px 18px;
  padding: 0 18px;
  border: 3px solid #337a70;
  border-radius: 999px;
  background: #ffffff;
  color: #337a70;
}

.map-downloads-search input {
  min-height: 58px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
}

.map-downloads-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  padding: 0 16px 24px;
}

.map-card {
  display: grid;
  grid-template-rows: 128px auto 1fr;
  gap: 0;
  min-height: 286px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d7e0d9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(19, 32, 28, 0.08);
}

.map-card-preview {
  display: grid;
  width: 100%;
  height: 128px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(135deg, #eef7f5, #9dd8cf);
  color: #143c37;
  font-size: 46px;
  font-weight: 800;
}

.map-card-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-card-main {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.map-card-main strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.map-card-main span {
  width: fit-content;
  min-width: 74px;
  padding: 6px 12px;
  border-radius: 4px;
  background: #f0eaf7;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.map-card-side {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px 18px;
}

.map-card-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f4ef;
  color: #286655;
  font-size: 12px;
  font-weight: 700;
}

.map-card-action {
  min-width: 148px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: #337a70;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 720px) {
  .map-downloads {
    width: 100vw;
    border-right: 0;
  }

  .map-downloads-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .map-downloads-list {
    grid-template-columns: 1fr;
  }
}

.map-downloads-empty {
  padding: 18px 8px;
  color: var(--muted);
  text-align: center;
}

.paywall-dialog {
  position: absolute;
  z-index: 830;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 22px;
  background: rgba(10, 10, 12, 0.58);
}

.paywall-dialog[hidden] {
  display: none;
}

.paywall-dialog-card {
  width: min(480px, calc(100vw - 44px));
  padding: 28px 30px 20px;
  border-radius: 8px;
  background: #f8faf7;
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.paywall-dialog-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.paywall-dialog-card p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.paywall-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.paywall-dialog-actions button {
  min-width: 84px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #337a70;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.points-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: 42px 1fr 42px 42px 42px;
  align-items: center;
  min-height: 62px;
  padding: 8px 12px;
  border-bottom: 1px solid #e0d5e4;
  background: rgba(255, 248, 255, 0.98);
}

.points-toolbar h2 {
  overflow: hidden;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #241c27;
  font-size: 26px;
  line-height: 38px;
  cursor: pointer;
}

.points-icon-button:disabled {
  opacity: 0.45;
}

.points-search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 0 12px 10px;
  padding: 0 14px;
  border: 2px solid #6f5a8e;
  border-radius: 999px;
  background: #fff8ff;
  color: #6f5a8e;
}

.points-search input {
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #241c27;
  font: inherit;
}

.points-list {
  display: grid;
  gap: 4px;
  padding: 6px 12px 24px;
}

.points-row {
  display: grid;
  grid-template-columns: 70px 1fr 52px;
  gap: 10px;
  align-items: center;
  min-height: 96px;
}

.points-row-icon {
  font-size: 39px;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.22));
}

.points-row-main {
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #241c27;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.points-row-main strong {
  min-height: 20px;
  font-weight: 700;
}

.points-row-main span {
  color: #4b3f50;
}

.points-row-map {
  width: 46px;
  height: 46px;
  border: 1px solid #d7cdd9;
  border-radius: 8px;
  background: #ffffff;
  color: #241c27;
  font-size: 26px;
  cursor: pointer;
}

.points-empty {
  margin: 32px 0;
  color: #6f6372;
  text-align: center;
}

.points-list-note {
  margin: 16px 6px 4px;
  color: #6f6372;
  font-size: 14px;
  text-align: center;
}

.points-menu-popover {
  position: absolute;
  top: 54px;
  right: 12px;
  width: min(320px, calc(100vw - 28px));
  padding: 8px 0;
  border: 1px solid #e0d5e4;
  border-radius: 4px;
  background: #f8f0fa;
  box-shadow: 0 8px 22px rgba(20, 12, 28, 0.24);
}

.points-menu-popover[hidden] {
  display: none;
}

.points-menu-popover button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: #241c27;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.points-menu-popover button:disabled {
  color: #8d8190;
  cursor: default;
}

.export-ready-dialog {
  position: absolute;
  z-index: 800;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 14, 21, 0.62);
}

.export-ready-dialog[hidden] {
  display: none;
}

.export-ready-card {
  width: min(420px, calc(100vw - 40px));
  padding: 22px 22px 16px;
  border-radius: 24px;
  background: #211924;
  color: #fff8ff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
}

.export-ready-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.export-ready-card p {
  color: #fff8ff;
  font-size: 16px;
}

.export-ready-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.export-ready-actions button {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #f5dcff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.account-screen {
  position: absolute;
  z-index: 780;
  inset: 0;
  overflow: auto;
  background: #fff8ff;
  color: #241c27;
}

.account-screen[hidden],
.account-view[hidden],
.account-dialog[hidden] {
  display: none;
}

.account-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  min-height: 64px;
  padding: 8px 18px;
  background: rgba(255, 248, 255, 0.96);
}

.account-screen[data-view="login"] .account-toolbar {
  display: none;
}

.account-toolbar h2,
.account-view h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
}

.account-icon-button,
.account-danger-button,
.account-link-button {
  border: 0;
  background: transparent;
  color: #241c27;
  font: inherit;
  cursor: pointer;
}

.account-icon-button {
  width: 42px;
  height: 42px;
  font-size: 34px;
  line-height: 38px;
}

.account-danger-button {
  color: #9f2f35;
}

.account-view {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 42px 20px 72px;
  box-sizing: border-box;
}

.account-login-view h2 {
  text-align: center;
}

.account-logo {
  display: grid;
  min-height: 190px;
  align-content: center;
  justify-content: center;
  margin: 42px 0 24px;
  color: #ef6b1f;
  font-style: italic;
  text-transform: uppercase;
}

.account-logo span {
  color: #128ed1;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 50px;
  text-shadow: 0 2px 0 #111827;
}

.account-logo strong {
  margin-left: 74px;
  font-size: 34px;
  line-height: 34px;
  text-shadow: 0 2px 0 #111827;
}

.telegram-login-container {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.fish-record-marker {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(14, 48, 74, 0.35);
  font-size: 22px;
}

.auth-form {
  display: grid;
  width: 100%;
  gap: 18px;
}

.auth-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 66px;
  padding: 14px 18px 12px 54px;
  box-sizing: border-box;
  border: 2px solid #6f5a8e;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #4b3f50;
  overflow: visible;
}

.auth-field span {
  position: absolute;
  z-index: 1;
  top: -10px;
  left: 20px;
  margin: 0;
  padding: 0 8px;
  background: #fff8ff;
  font-size: 12px;
  line-height: 18px;
  color: #6f5a8e;
}

.auth-field::before {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #4b3f50;
  font-size: 23px;
  line-height: 1;
}

.auth-field:has(input[type="email"])::before {
  content: "✉";
}

.auth-field:has(input[type="password"])::before {
  content: "▣";
}

.auth-field input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #241c27;
  font: inherit;
  font-size: 20px;
  line-height: 1.35;
}

.account-primary-button,
.account-secondary-button,
.account-sync-button,
.account-logout-button {
  width: 100%;
  min-height: 60px;
  border-radius: 9px;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.account-primary-button {
  margin-top: 18px;
  border: 0;
  background: #6f5a9b;
  color: #ffffff;
}

.account-secondary-button {
  width: 100%;
  margin-top: 34px;
  border: 1px solid #4b3f50;
  background: transparent;
  color: #6f6372;
}

.account-link-button {
  display: block;
  margin: 28px auto 0;
  color: #6f6372;
  text-decoration: underline;
}

.account-message {
  min-height: 22px;
  color: #6f6372;
  text-align: center;
}

.account-message.is-error {
  color: #b42318;
}

.account-register-view {
  padding-top: 220px;
}

.account-profile-view {
  display: grid;
  justify-items: center;
  gap: 44px;
  padding-top: 52px;
}

.account-avatar {
  display: grid;
  width: 96px;
  height: 96px;
  align-items: center;
  justify-items: center;
  border-radius: 999px;
  background: #259ee6;
  color: #d6e7f2;
  font-size: 58px;
  line-height: 1;
}

.account-profile-view h2 {
  font-weight: 700;
  text-align: center;
  word-break: break-word;
}

.account-network {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 18px;
  margin-top: 54px;
  font-size: 25px;
}

.account-card {
  width: 100%;
  padding: 26px 20px;
  border: 1px solid #eadfea;
  border-radius: 8px;
  background: rgba(255, 248, 255, 0.86);
  box-shadow: 0 3px 8px rgba(20, 12, 28, 0.12);
  text-align: center;
}

.account-card p {
  margin: 4px 0;
  font-size: 20px;
}

.account-sync-button {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 1px solid #eadfea;
  background: rgba(255, 248, 255, 0.84);
  color: #7a657e;
}

.account-logout-button {
  margin-top: 40px;
  border: 0;
  background: transparent;
  color: #6f6372;
}

.account-dialog {
  position: absolute;
  z-index: 820;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 22px;
  background: rgba(10, 10, 12, 0.58);
}

.account-dialog-card {
  width: min(500px, calc(100vw - 44px));
  padding: 28px 30px 20px;
  border-radius: 22px;
  background: #1e1721;
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.account-dialog-card h2 {
  margin: 0 0 18px;
  font-size: 25px;
}

.account-dialog-card p {
  font-size: 20px;
}

.account-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  margin-top: 28px;
}

.account-dialog-actions button {
  min-width: 84px;
  border: 0;
  background: transparent;
  color: #f0d9ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #b9ecff, #2d83dc 58%, #081f5c);
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
}

p,
.metrics span,
.legend-labels {
  color: var(--muted);
  font-size: 12px;
}

.error {
  color: #b42318;
}

.toggles {
  display: grid;
  gap: 8px;
}

.toggles label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  font-size: 14px;
}

.metrics {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.legend {
  margin-top: 12px;
}

.legend-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b9ecff, #62c6ff, #2d83dc, #174ea6, #081f5c);
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.depth-label {
  border-radius: 3px;
  background: rgba(248, 250, 247, 0.86);
  color: #0f172a;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

@media (max-width: 720px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
  }

  .panel-backdrop {
    display: block;
  }

  .panel-backdrop[hidden] {
    display: none;
  }

  .panel {
    z-index: 600;
    top: 0;
    left: 0;
    width: min(340px, calc(100vw - 64px));
    height: 100vh;
    max-height: none;
    padding: 18px 16px;
    border-width: 0 1px 0 0;
    border-radius: 0;
    transform: translateX(calc(-100% - 24px));
    transition: transform 180ms ease;
  }

  body.is-panel-open .panel {
    transform: translateX(0);
  }

  body.is-panel-open .menu-toggle {
    right: 12px;
  }

  .map-settings {
    top: 0;
    left: 0;
    width: min(340px, calc(100vw - 64px));
    height: 100vh;
    max-height: none;
    border-width: 0 1px 0 0;
    border-radius: 0;
  }

  .points-manager {
    top: 0;
    left: 0;
    width: min(360px, calc(100vw - 48px));
    height: 100vh;
    max-height: none;
    border-width: 0 1px 0 0;
    border-radius: 0;
  }

  .map-downloads {
    top: 0;
    left: 0;
    width: min(360px, calc(100vw - 48px));
    height: 100vh;
    max-height: none;
    border-width: 0 1px 0 0;
    border-radius: 0;
  }

  .map-card {
    grid-template-columns: 58px 1fr;
  }

  .map-card-preview {
    width: 50px;
    height: 50px;
  }

  .map-card-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
  }

  .locate-me {
    right: 14px;
    bottom: 88px;
  }

  .action-rail {
    right: 14px;
    bottom: 24px;
  }

  .toggles {
    gap: 10px;
  }

  .toggles label {
    min-height: 34px;
    font-size: 16px;
  }
}
