* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Karla', sans-serif;
  background: #ECE7DE;
  color: #1f1e18;
}

h1, h2, h3, .brand {
  font-family: 'Quicksand', sans-serif;
}

#map {
  position: absolute;
  inset: 0;
}

.top-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.icon-button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  flex: none;
  border: none;
  border-radius: 50%;
  background: #FBF6EA;
  color: #1f1e18;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-chips {
  pointer-events: auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  padding: 2px;
}

.filter-chip {
  flex: none;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: #FBF6EA;
  color: #1f1e18;
  font-family: 'Karla', sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

.filter-chip.active {
  opacity: 1;
}

.filter-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.fab {
  position: absolute;
  bottom: 24px;
  right: 20px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #E8A33D;
  color: #1f1e18;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.pin-marker {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #FBF6EA;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 30, 24, 0.35);
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet-backdrop.hidden {
  display: none;
}

.bottom-sheet {
  width: 100%;
  max-width: 480px;
  background: #F2F1EB;
  border-radius: 20px 20px 0 0;
  padding: 20px 22px 28px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.bottom-sheet .category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #FBF6EA;
  margin-bottom: 10px;
}

.bottom-sheet h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.bottom-sheet .note {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

.bottom-sheet .author {
  font-size: 13px;
  color: #6d6a5c;
}

.bottom-sheet .close-btn {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  color: #6d6a5c;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.attribution {
  position: absolute;
  bottom: 4px;
  left: 8px;
  z-index: 900;
  font-size: 10px;
  color: #6d6a5c;
  background: rgba(251, 246, 234, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
}

.status-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #6d6a5c;
  text-align: center;
  padding: 20px;
}

.add-pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(31, 30, 24, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.add-pin-overlay.hidden {
  display: none;
}

.add-pin-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 88vh;
  background: #F2F1EB;
  border-radius: 20px 20px 0 0;
  padding: 24px 22px;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: none;
  font-size: 18px;
  color: #6d6a5c;
  cursor: pointer;
}

.add-pin-step.hidden {
  display: none;
}

.add-pin-step h2 {
  margin: 0 0 16px;
  font-size: 20px;
  padding-right: 30px;
}

#search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#search-input, #note-input, #author-input {
  width: 100%;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #d8d3c4;
  border-radius: 10px;
  background: #FBF6EA;
  color: #1f1e18;
}

#search-form button {
  flex: none;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: #E8A33D;
  color: #1f1e18;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.search-status {
  font-size: 13px;
  color: #6d6a5c;
  min-height: 18px;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-result-item {
  width: 100%;
  text-align: left;
  padding: 12px 10px;
  border: none;
  border-bottom: 1px solid #e4e1d6;
  background: none;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  color: #1f1e18;
  cursor: pointer;
}

.back-btn {
  border: none;
  background: none;
  color: #6d6a5c;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}

.hint {
  font-size: 13px;
  color: #6d6a5c;
  margin: 0 0 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.category-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid #e4e1d6;
  border-radius: 12px;
  background: #FBF6EA;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1f1e18;
  cursor: pointer;
}

.category-tile .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

#note-input {
  height: 100px;
  resize: vertical;
  margin-bottom: 14px;
  font-family: 'Karla', sans-serif;
}

label[for="author-input"] {
  display: block;
  font-size: 13px;
  color: #6d6a5c;
  margin-bottom: 6px;
}

#author-input {
  margin-bottom: 20px;
}

.save-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #E8A33D;
  color: #1f1e18;
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.home-screen {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 22px;
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.brand-seal {
  width: 68px;
  height: 68px;
  border-radius: 50%;
}

.brand-header .brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-pro {
  color: #1f1e18;
}

.brand-map {
  color: #1F5A73;
}

.brand-theus {
  color: #E8A33D;
}

[data-menu-el] h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.map-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.map-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #FBF6EA;
  border-radius: 12px;
}

.map-list-name {
  flex: 1;
  text-align: left;
  border: none;
  background: none;
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1f1e18;
  cursor: pointer;
  padding: 0;
}

.map-list-copy {
  flex: none;
  border: none;
  background: none;
  color: #1F5A73;
  font-family: 'Karla', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.empty-hint {
  font-size: 14px;
  color: #6d6a5c;
  margin-bottom: 20px;
}

.primary-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #E8A33D;
  color: #1f1e18;
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

[data-menu-el="create-step"] input,
[data-menu-el="link-banner-step"] input {
  width: 100%;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid #d8d3c4;
  border-radius: 10px;
  background: #FBF6EA;
  color: #1f1e18;
}

.link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.link-row input {
  margin-bottom: 0;
}

.link-row button {
  flex: none;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #1F5A73;
  color: #FBF6EA;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(31, 30, 24, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.menu-overlay.hidden {
  display: none;
}

.menu-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: #F2F1EB;
  border-radius: 20px 20px 0 0;
  padding: 24px 22px;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #d8d3c4;
  border-radius: 12px;
  background: #FBF6EA;
  color: #1f1e18;
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kml-preview-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
}

.kml-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #FBF6EA;
  border-radius: 10px;
}

.kml-row-name {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kml-row select {
  flex: none;
  font-family: 'Karla', sans-serif;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid #d8d3c4;
  border-radius: 8px;
  background: #fff;
  color: #1f1e18;
}
