body {
  margin: 0;
  padding: 0;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 18.75px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.78)),
    url('../images/MapBackground.png') center center / cover no-repeat fixed;
  color: white;
}

body.admin-page {
  background:
    linear-gradient(rgba(4, 8, 10, 0.92), rgba(4, 8, 10, 0.96)),
    radial-gradient(circle at top left, rgba(0, 204, 255, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(0, 255, 153, 0.14), transparent 30%),
    url('../images/MapBackground.png') center center / cover no-repeat fixed;
}

#website-corner-tag {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10001;
  width: 190px;
  height: 190px;
  overflow: visible;
  pointer-events: none;
}

#website-corner-tag span {
  position: absolute;
  top: 42px;
  right: -18px;
  width: 178px;
  color: white;
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.32);
  transform: rotate(45deg);
  transform-origin: center;
}

#website-corner-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #f10d0d;
  clip-path: polygon(100% 0, 100% 78%, 22% 0);
  filter: drop-shadow(-6px 8px 8px rgba(0, 0, 0, 0.34));
  z-index: -1;
}

#website-corner-tag::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 62px;
  height: 28px;
  background: #9f0707;
  clip-path: polygon(0 0, 100% 100%, 100% 0);
  z-index: -2;
}

#map {
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

.mapboxgl-map,
.mapboxgl-canvas-container,
.mapboxgl-canvas {
  touch-action: none;
}

#map-control-menu,
#status-menu,
#options-menu,
.menu-panel {
  position: absolute;
  z-index: 1;
  background: rgba(0, 0, 0, 0.85);
  padding: 15px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: white;
  width: max-content;
}

#top-left-menus {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
  pointer-events: none;
}

#map-control-menu {
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 18.75px;
}

#options-menu {
  position: static;
  pointer-events: auto;
  order: 1;
}

#status-menu {
  background: rgba(0, 0, 0, 0.5);
  position: static;
  pointer-events: auto;
  order: 2;
}

.menu-panel {
  position: static;
}

#options-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

#map-control-menu button,
#status-menu button,
#options-menu button {
  padding: 10px 10px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 15px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: max-content;
  touch-action: manipulation;
  text-decoration: none;
}

#map-control-menu button {
  margin: 3px;
  text-align: center;
}

#location-button.is-loading {
  cursor: wait;
  opacity: 0.85;
}

#location-loading-popup {
  position: fixed;
  z-index: 4;
  top: 18px;
  left: 50%;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-size: 15px;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
  box-sizing: border-box;
}

#location-loading-popup.is-visible {
  display: flex;
}

#location-loading-popup img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

#status-menu button,
#options-menu button {
  margin: 3px auto;
  display: block;
}

#options-menu button {
  margin: 0;
  display: inline-block;
}

#map-control-menu button:hover,
#status-menu button:hover,
#options-menu button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#map-control-menu button:active,
#status-menu button:active,
#options-menu button:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.98);
}

#status-menu div {
  margin-bottom: 9px;
  color: #fff;
  font-size: 15px;
}

#auth-status {
  font-size: 13px;
  color: #9ad1ff;
  margin-bottom: 10px;
}

#status-menu span:first-child {
  margin-right: 8px;
  color: #ccc;
}

.mapboxgl-popup-content {
  background: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
  width: max-content;
  pointer-events: auto;
  touch-action: manipulation;
}

.mapboxgl-popup,
.mapboxgl-popup-tip,
.mapboxgl-popup-close-button,
.popup-menu,
.popup-menu button {
  pointer-events: auto;
}

.mapboxgl-popup,
.popup-menu,
.popup-menu button,
.mapboxgl-popup-close-button {
  touch-action: manipulation;
}

.popup-menu {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 18.75px;
  text-align: center;
  color: white;
  padding: 7.5px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
  min-width: 180px;
  max-width: min(320px, calc(100vw - 40px));
}

.user-location-name-popup {
  background: #c46612;
  border: 1px solid #ffab4a;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: block;
  font-size: 11px;
  line-height: 1.2;
  margin: 0;
  min-width: auto;
  max-width: 160px;
  padding: 4px 7px;
}

.user-location-name-map-popup .mapboxgl-popup-content {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.user-location-name-popup.current-user {
  background: #126b32;
  border-color: #2ed36c;
}

.user-location-name-popup.team-member {
  background: #145c9e;
  border-color: #5bb9ff;
}

.user-location-name-popup.other-team {
  background: #c46612;
  border-color: #ffab4a;
}

.user-location-name-popup.no-team {
  background: #9f1f1f;
  border-color: #ff6262;
}

.user-location-name-popup strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-location-name-popup:hover,
.user-location-name-popup:focus,
.user-location-name-popup:focus-visible {
  outline: none;
}

.user-location-name-popup.current-user:hover,
.user-location-name-popup.current-user:focus,
.user-location-name-popup.current-user:focus-visible {
  background: #16883f;
  border-color: #51e581;
  box-shadow: 0 0 0 2px rgba(81, 229, 129, 0.55);
}

.user-location-name-popup.team-member:hover,
.user-location-name-popup.team-member:focus,
.user-location-name-popup.team-member:focus-visible {
  background: #1773c8;
  border-color: #82caff;
  box-shadow: 0 0 0 2px rgba(91, 185, 255, 0.5);
}

.user-location-name-popup.other-team:hover,
.user-location-name-popup.other-team:focus,
.user-location-name-popup.other-team:focus-visible {
  background: #df781c;
  border-color: #ffc06b;
  box-shadow: 0 0 0 2px rgba(255, 171, 74, 0.5);
}

.user-location-name-popup.no-team:hover,
.user-location-name-popup.no-team:focus,
.user-location-name-popup.no-team:focus-visible {
  background: #bd2a2a;
  border-color: #ff8585;
  box-shadow: 0 0 0 2px rgba(255, 98, 98, 0.5);
}

.street-note {
  font-size: 12px;
  color: #ccc;
  margin: 5px 0;
  font-weight: normal;
}

.street-note-highlight {
  color: #ffcc80;
}

.popup-menu button {
  display: block;
  width: 100;
  padding: 7.5px 3.75px;
  margin-bottom: 7.5px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 15;
}

.popup-menu button:disabled,
.status-popup-menu button:disabled,
.auth-card button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.popup-button-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.street-note-history {
  margin: 10px 0;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  max-height: 180px;
  overflow-y: auto;
}

.street-note-history-title {
  margin: 0 0 8px;
  font-size: 12px;
  color: #9ad1ff;
}

.street-note-entry {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.street-note-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.street-note-entry-meta {
  font-size: 11px;
  color: #9ad1ff;
  font-weight: normal;
  margin-bottom: 4px;
}

.street-note-entry-text {
  font-size: 12px;
  line-height: 1.45;
  color: #f2f2f2;
  font-weight: normal;
  word-break: break-word;
}

.street-note-input {
  width: 100%;
  min-height: 72px;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  resize: vertical;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}

.street-note-save {
  width: 100%;
  margin-bottom: 10px;
}

.street-notes-menu {
  width: min(520px, 100%);
}

.street-notes-name {
  margin: 0 0 8px;
}

.street-note-form-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  color: #9ad1ff;
  text-align: left;
}

.plan-btn {
  background-color: #00ccff;
  color: black;
}
.plan-btn:hover {
  background-color: #0099cc;
}

.done-btn {
  background-color: #00ff00;
  color: black;
}

.done-btn:hover {
  background-color: #00cc00;
}

.partial-btn {
  background-color: #ffff00;
  color: black;
}

.partial-btn:hover {
  background-color: #cccc00;
}

.remove-btn {
  background-color: #888;
  color: white;
}

.remove-btn:hover {
  background-color: #666;
}

.edit-btn {
  background-color: #ff8c00;
  color: black;
}

.edit-btn:hover {
  background-color: #cc7000;
}

.cancel-btn {
  background-color: white;
  color: black;
}

.cancel-btn:hover {
  background-color: #e0e0e0;
}

.status-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.status-overlay[hidden] {
  display: none;
}

.modal-open {
  overflow: hidden;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.88);
}

.auth-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 9px;
  color: white;
}

.auth-page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.auth-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #9ad1ff;
  text-transform: uppercase;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form label {
  font-size: 13px;
  color: #ccc;
}

.auth-form input,
.auth-form textarea {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
}

.auth-password-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.auth-password-row input {
  min-width: 0;
  flex: 1;
}

.auth-form .auth-password-toggle {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 13px;
}

.auth-confirm-password-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-confirm-password-group[hidden] {
  display: none;
}

.auth-form textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}

.auth-form button,
.auth-link-button {
  margin-top: 8px;
  padding: 10px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 15px;
}

.auth-form button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.auth-link-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.auth-form button:hover,
.auth-link-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.auth-form button:active,
.auth-link-button:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.98);
}

.auth-message {
  min-height: 20px;
  font-size: 13px;
  color: #9ad1ff;
}

.auth-message.error {
  color: #ff8d8d;
}

.admin-shell {
  min-height: 100vh;
  padding: 24px;
  box-sizing: border-box;
}

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

.help-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: auto;
}

.help-section {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.help-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.help-section p {
  margin: 0 0 10px;
  line-height: 1.6;
}

.help-example-photo {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.help-example-photo img,
.help-example-photo.is-missing::before {
  width: 100%;
  min-height: 220px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(rgba(4, 8, 10, 0.34), rgba(4, 8, 10, 0.78)),
    url('../images/MapBackground.png') center center / cover no-repeat;
  box-sizing: border-box;
}

.help-example-photo img {
  display: block;
  max-height: 420px;
  object-fit: cover;
}

.help-example-photo.is-missing::before {
  content: 'Add example photo';
  display: grid;
  place-items: center;
  color: #e8f4f7;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-example-photo figcaption {
  color: #9ad1ff;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.5;
}

.admin-header {
  position: static;
  width: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  text-align: left;
}

.admin-title {
  margin: 0;
  font-size: 32px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 204, 255, 0.16);
  border: 1px solid rgba(0, 204, 255, 0.5);
  color: #89e6ff;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-header-actions .admin-badge,
.admin-header-actions .admin-nav-button {
  height: 44px;
  box-sizing: border-box;
}

.admin-header-actions .admin-badge {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.admin-header-actions .admin-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-nav-button,
.admin-mini-button,
.admin-action-button {
  width: auto;
  margin: 0;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-nav-button:not(.remove-btn) {
  background: rgba(128, 0, 128, 0.9);
  color: white;
}

.admin-nav-button:not(.remove-btn):hover {
  background: rgba(0, 170, 85, 0.95);
}

#refresh-users-button,
#refresh-logs-button,
#refresh-projects-button,
#refresh-notes-button,
#refresh-team-button,
#refresh-stats-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#refresh-users-button:hover,
#refresh-logs-button:hover,
#refresh-projects-button:hover,
#refresh-notes-button:hover,
#refresh-team-button:hover,
#refresh-stats-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#project-button {
  background: #9ad1ff;
  color: #04080a;
}

#project-button:hover {
  background: #7fc5ff;
}

#clear-data-button,
#sign-out-button {
  background: rgba(200, 40, 40, 0.9);
  color: white;
}

#clear-data-button:hover,
#sign-out-button:hover {
  background: rgba(230, 30, 30, 1);
}

.admin-mini-button,
.admin-action-button {
  padding: 8px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 13px;
}

.admin-mini-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.admin-action-button.edit-btn {
  background: #ff8c00;
  color: #041014;
}

.admin-action-button.edit-btn:hover {
  background: #ffb347;
}

.admin-action-button.role-btn {
  background: #00aa55;
  color: white;
}

.admin-action-button.make-admin-btn {
  background: #00aa55;
  color: white;
}

.admin-action-button.make-admin-btn:hover {
  background: #00cf70;
}

.admin-action-button.make-leader-btn {
  background: #0077cc;
  color: white;
}

.admin-action-button.make-leader-btn:hover {
  background: #1597f2;
}

.admin-action-button.make-member-btn {
  background: #7a1fa2;
  color: white;
}

.admin-action-button.make-member-btn:hover {
  background: #9c36c8;
}

.admin-action-button.remove-btn {
  background: #c82828;
  color: white;
}

.admin-action-button.remove-btn:hover {
  background: #e63a3a;
}

.success-btn {
  background: #188a42;
  color: white;
}

.success-btn:hover {
  background: #21a653;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.notes-page-layout {
  display: grid;
  gap: 24px;
}

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

.projects-list {
  --project-card-height: 140px;
  --project-list-gap: 14px;
  display: flex;
  flex-direction: column;
  gap: var(--project-list-gap);
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--project-card-height);
  box-sizing: border-box;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card.expanded {
  flex-direction: column;
  align-items: stretch;
}

.project-card.expanded .project-card-actions {
  align-self: flex-end;
}

.project-card.pinned {
  background: rgba(0, 204, 255, 0.1);
  border-color: rgba(0, 204, 255, 0.35);
}

.project-card > div {
  flex: 1;
  min-width: 0;
}

.project-card > .admin-mini-button {
  flex-shrink: 0;
}

.project-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-pin-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.project-pin-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.project-pin-button.pinned {
  background: rgba(154, 209, 255, 0.2);
  border-color: rgba(154, 209, 255, 0.7);
}

.project-description {
  margin: 0 0 8px;
  color: #e6f3f8;
  font-size: 13px;
  line-height: 1.5;
  font-weight: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card.expanded .project-description {
  display: block;
  overflow: visible;
}

.project-description-toggle {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: -2px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ad1ff;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: bold;
}

.project-description-toggle:hover {
  color: #cce8ff;
  text-decoration: underline;
}

.project-description-toggle[hidden] {
  display: none;
}

.project-admins {
  margin: 0 0 6px;
  color: #f4dc9d;
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card .street-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.notes-summary-card {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notes-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.notes-summary-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ad1ff;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-chat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-chat-message {
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-chat-message .street-note-entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.team-chat-message-meta-actions {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin-left: auto;
  position: relative;
}

.team-chat-actions {
  position: relative;
}

.team-chat-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.team-chat-menu-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.team-chat-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 2;
  display: grid;
  min-width: 104px;
  padding: 6px;
  border-radius: 6px;
  background: rgba(4, 8, 10, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.team-chat-action-menu[hidden] {
  display: none;
}

.team-chat-action-menu button {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: white;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.team-chat-action-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.team-chat-action-menu button.remove-btn {
  color: #ffb1b1;
}

.team-chat-team-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 140, 0, 0.18);
  border: 1px solid rgba(255, 140, 0, 0.48);
  color: #ffcc80;
  font-size: 11px;
  line-height: 1.2;
}

.team-chat-author {
  color: #f8fbff;
  font-weight: 700;
}

.team-chat-team-tag.own-team {
  background: rgba(0, 204, 255, 0.16);
  border-color: rgba(0, 204, 255, 0.5);
  color: #b8f1ff;
}

.team-chat-team-tag.current-user-team {
  background: rgba(0, 207, 112, 0.18);
  border-color: rgba(0, 207, 112, 0.56);
  color: #a7f5cf;
}

.team-chat-team-tag.no-team {
  background: rgba(200, 40, 40, 0.22);
  border-color: rgba(230, 58, 58, 0.58);
  color: #ffb1b1;
}

.team-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-top: 14px;
}

.team-chat-form textarea {
  min-height: 72px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  resize: vertical;
}

.team-chat-form button {
  align-self: stretch;
}

.team-switch-panel {
  display: grid;
  grid-template-columns: auto minmax(220px, 360px);
  align-items: center;
  gap: 12px;
}

.team-switch-label {
  color: #9ad1ff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.team-switch-select {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(6, 18, 28, 0.96);
  color: white;
  padding: 8px 10px;
  font-family: 'Space Mono', monospace;
}

.team-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-member-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.team-member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.team-leader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.team-members-edit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-member-edit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.team-member-edit-row small {
  color: #9ad1ff;
  font-size: 12px;
  text-align: right;
}

.team-role-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-role-admin {
  background: rgba(0, 204, 255, 0.16);
  border: 1px solid rgba(0, 204, 255, 0.45);
  color: #9aeaff;
}

.team-role-leader {
  background: rgba(255, 140, 0, 0.16);
  border: 1px solid rgba(255, 140, 0, 0.45);
  color: #ffcc80;
}

.team-role-member {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e0e0e0;
}

.user-team-badge {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  min-height: 22px;
  box-sizing: border-box;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 204, 255, 0.16);
  border: 1px solid rgba(0, 204, 255, 0.42);
  color: #b8f1ff;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.user-team-badge.current-team {
  background: rgba(0, 207, 112, 0.16);
  border-color: rgba(0, 207, 112, 0.48);
  color: #a7f5cf;
}

.admin-team-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-team-history.muted {
  color: #9aa4ad;
  font-size: 12px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.street-chart-panel {
  display: block;
}

.street-pie-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 22px;
  align-items: center;
}

.street-pie-wrap {
  position: relative;
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

.street-pie-chart {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.34));
}

.street-pie-track,
.street-pie-empty {
  stroke: rgba(255, 255, 255, 0.1);
}

.street-pie-segment {
  stroke-linecap: butt;
  stroke-dashoffset: var(--segment-offset);
  transform-origin: center;
  animation: street-pie-draw 850ms ease-out both;
}

.street-pie-partial {
  animation-delay: 120ms;
}

.street-pie-done {
  animation-delay: 220ms;
}

.street-pie-center {
  position: absolute;
  inset: 23%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(4, 8, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.street-pie-center strong {
  font-size: 30px;
  line-height: 1;
}

.street-pie-center span {
  margin-top: 7px;
  color: #9ad1ff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.street-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.street-pie-legend .stats-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.street-pie-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--legend-color);
  box-shadow: 0 0 14px var(--legend-color);
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.stats-row strong {
  font-size: 18px;
  white-space: nowrap;
}

.runner-stats-row {
  align-items: flex-start;
}

.runner-rank-name {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.runner-rank {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(154, 209, 255, 0.16);
  border: 1px solid rgba(154, 209, 255, 0.4);
  color: #9ad1ff;
  font-size: 12px;
}

.runner-name {
  padding-top: 5px;
  text-align: left;
  word-break: break-word;
}

.runner-status-counts {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.runner-status-pill,
.runner-total {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.runner-status-pill strong,
.runner-total strong {
  font-size: 14px;
}

.runner-total {
  color: #e0e0e0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@keyframes street-pie-draw {
  from {
    stroke-dashoffset: calc(var(--segment-offset) + 289.03);
  }

  to {
    stroke-dashoffset: var(--segment-offset);
  }
}

@media (prefers-reduced-motion: reduce) {
  .street-pie-segment {
    animation: none;
  }
}

@media (max-width: 760px) {
  .street-pie-layout {
    grid-template-columns: 1fr;
  }

  .street-pie-wrap {
    width: min(210px, 100%);
  }
}

@media (max-width: 620px) {
  .team-chat-form,
  .team-switch-panel,
  .team-member-edit-row {
    grid-template-columns: 1fr;
  }

  .team-member-card,
  .team-member-actions,
  .team-leader-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .team-member-actions button,
  .team-leader-actions button {
    width: 100%;
  }

  .team-member-edit-row small {
    text-align: left;
  }
}

.notes-filter-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ad1ff;
}

.notes-filter-control select {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}

.notes-street-card {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notes-street-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.notes-street-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.notes-street-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notes-count-badge,
.notes-status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notes-count-badge {
  background: rgba(255, 140, 0, 0.16);
  border: 1px solid rgba(255, 140, 0, 0.45);
  color: #ffcc80;
}

.notes-status-badge {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.status-planned {
  background: rgba(0, 204, 255, 0.16);
  color: #9aeaff;
}

.status-done {
  background: rgba(0, 255, 0, 0.16);
  color: #adffad;
}

.status-partial {
  background: rgba(255, 255, 0, 0.14);
  color: #fff6a0;
}

.status-unmarked {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
}

.notes-street-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notes-page-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.notes-remove-button {
  margin-top: 0;
  width: auto;
  flex-shrink: 0;
}

.notes-page-entry {
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-panel {
  position: static;
  width: auto;
  min-width: 0;
  text-align: left;
}

.danger-panel {
  border: 1px solid rgba(255, 141, 141, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 141, 141, 0.06);
}

.danger-panel .street-note {
  color: #ffb1b1;
}

.admin-modal-overlay {
  align-items: flex-start;
  overflow-y: auto;
}

.admin-modal-panel {
  width: min(480px, 100%);
  margin: auto;
  box-sizing: border-box;
}

.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.admin-modal-actions button {
  width: auto;
  margin: 0;
}

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

.admin-panel-heading h2 {
  margin: 0;
  font-size: 20px;
}

.admin-panel-heading-text {
  min-width: 0;
}

.admin-panel-heading-text .street-note {
  margin: 6px 0 0;
  white-space: normal;
}

.terminal-view {
  min-height: 420px;
  max-height: 65vh;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: rgba(3, 12, 18, 0.96);
  border: 1px solid rgba(0, 204, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.terminal-line {
  display: grid;
  grid-template-columns: 180px 70px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.terminal-time {
  color: #7ba6ba;
}

.terminal-level {
  font-weight: bold;
}

.level-info {
  color: #79f7c7;
}

.level-warning {
  color: #ffe082;
}

.level-error {
  color: #ff8d8d;
}

.terminal-message,
.terminal-empty {
  color: #e6f3f8;
}

.admin-table-wrap {
  overflow-x: auto;
}

.project-share-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-share-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.project-share-preview,
.project-share-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.project-share-tools label {
  font-size: 13px;
  color: #ccc;
}

.project-share-tools input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}

.project-share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.project-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.project-share-link-row button,
.project-key-row button {
  margin: 0;
  white-space: nowrap;
}

.project-share-image-actions,
.project-share-close-actions {
  margin-top: 0;
}

.project-share-image-actions button {
  flex: 1 1 150px;
}

.project-share-canvas {
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.project-share-popup {
  width: min(860px, 92vw);
}

.project-share-popup .project-share-canvas {
  margin: 0 auto;
  display: block;
}

.project-share-popup .auth-message {
  margin: 0;
  min-height: 18px;
  text-align: left;
}

#copy-project-share-link-button,
#copy-project-key-button,
#download-share-image-button {
  background: rgba(0, 150, 70, 0.9);
  color: white;
}

#copy-project-share-link-button:hover,
#copy-project-key-button:hover,
#download-share-image-button:hover {
  background: rgba(0, 185, 85, 0.98);
}

#generate-share-image-button.close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#generate-share-image-button.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.project-share-popup .remove-btn {
  background: rgba(128, 0, 128, 0.9);
  color: white;
}

.project-share-popup .remove-btn:hover {
  background: rgba(158, 34, 158, 0.98);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: middle;
}

.admin-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-role-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6f3f8;
  font-size: 13px;
  cursor: pointer;
}

.admin-role-toggle input {
  margin: 0;
}

.admin-role-icon {
  line-height: 1;
}

.admin-role-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.admin-empty-state {
  color: #ccc;
  text-align: center;
}

.bulk-selection-box {
  position: absolute;
  z-index: 3;
  border: 2px dashed #ff66b3;
  background: rgba(255, 102, 179, 0.15);
  pointer-events: none;
  box-sizing: border-box;
}

.status-popup-menu {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 30px;
  text-align: center;
  color: white;
  padding: 15px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  white-space: normal;
  word-wrap: break-word;
  max-width: 90vw;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.status-popup-menu street-notes-menu .status-popup-menu p {
  margin: 7.5px 0;
}

.status-info {
  margin: 15px 0;
  font-size: 14px;
  text-align: center;
}

.status-info div {
  margin-bottom: 9px;
  color: #fff;
  font-size: 16px;
  text-align: center;
}

.status-info span:first-child {
  margin-right: 8px;
  color: #ccc;
}

.status-popup-menu button {
  padding: 9px 12px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 15px;
  border: none;
  border-radius: 4px;
  margin: 3px auto;
  display: block;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  min-width: 90px;
}

.status-popup-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-menu-popup {
  width: fit-content;
  min-width: 260px;
}

.project-menu-actions {
  width: fit-content;
  min-width: 240px;
  max-width: 100%;
  margin: 18px auto 0;
  flex-direction: column;
  align-items: stretch;
}

.project-menu-action-box {
  width: auto;
  padding: 10px;
  border: 3px rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  background: #000;
  box-sizing: border-box;
}

.project-menu-actions button {
  width: 100%;
  min-width: 220px;
  box-sizing: border-box;
  color: white;
}

.clear-data-button {
  background: rgba(255, 80, 80, 0.85);
  color: white;
}

.status-popup-menu .clear-data-button:hover {
  background: rgba(255, 80, 80, 1);
}

.status-popup-menu .close-btn {
  background: rgba(128, 0, 128, 0.9);
  color: white;
}

.status-popup-menu .close-btn:hover {
  background: rgba(0, 170, 85, 0.95);
}

.status-popup-menu button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.status-popup-menu button:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.98);
}

#project-menu-admin-button,
#project-menu-account-button {
  background: rgba(0, 120, 255, 0.9);
}

#project-menu-admin-button:hover,
#project-menu-account-button:hover {
  background: rgba(0, 145, 255, 0.95);
}

#project-menu-contact-button {
  background: #ff8c00c0;
}

#project-menu-contact-button:hover {
  background: #ffb247de;
}

#project-menu-guide-button,
#project-menu-team-button,
#project-menu-stats-button,
#project-menu-notes-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#project-menu-team-button {
  position: relative;
}

#project-menu-team-button .team-chat-notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid rgba(20, 20, 20, 0.92);
  border-radius: 999px;
  background: #ff3b30;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1;
}

#project-menu-team-button .team-chat-notification-badge[hidden] {
  display: none;
}

#project-menu-guide-button:hover,
#project-menu-team-button:hover,
#project-menu-stats-button:hover,
#project-menu-notes-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#project-menu-switch-button {
  background: rgba(0, 150, 70, 0.9);
}

#project-menu-switch-button:hover {
  background: rgba(128, 0, 128, 0.9);
}

.mapboxgl-popup-close-button {
  color: white;
  font-size: 14px;
}

.user-location-marker {
  font-size: 12px;
  color: red;
  text-shadow: 0 0 2px black;
}

body.welcome-page {
  min-height: 100vh;
  background: #071013;
  color: white;
  overflow-x: hidden;
}

.welcome-shell {
  min-height: 100vh;
  background: #071013;
}

.welcome-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  box-sizing: border-box;
  background:
    linear-gradient(
      90deg,
      rgba(3, 7, 8, 0.92) 0%,
      rgba(3, 7, 8, 0.7) 48%,
      rgba(3, 7, 8, 0.32) 100%
    ),
    url('../images/MapBackground.png') center center / cover no-repeat;
}

.welcome-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.welcome-brand,
.welcome-nav-link,
.welcome-primary-action,
.welcome-secondary-action {
  color: white;
  text-decoration: none;
}

.welcome-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.welcome-brand img {
  width: 34px;
  height: 34px;
}

.welcome-nav-actions,
.welcome-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.welcome-nav-link {
  padding: 9px 11px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.welcome-nav-link:hover,
.welcome-primary-action:hover,
.welcome-secondary-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.welcome-hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 96px auto 64px;
}

.welcome-hero-content h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1.02;
}

.welcome-lede {
  max-width: 690px;
  margin: 22px 0 0;
  color: #e8f4f7;
  font-size: 20px;
  line-height: 1.55;
  font-weight: normal;
}

.welcome-actions {
  margin-top: 32px;
}

.welcome-primary-action,
.welcome-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 15px;
}

.welcome-primary-action {
  background: #00aa55;
  color: white;
}

.welcome-primary-action:hover {
  background: #00bd61;
}

.welcome-secondary-action {
  background: #9ad1ff;
  color: #04080a;
}

.welcome-secondary-action:hover {
  background: #b7ddff;
}

.welcome-use-cases {
  width: min(1180px, calc(100% - 48px));
  margin: -36px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}

.welcome-feature {
  min-height: 180px;
  padding: 22px;
  border-radius: 8px;
  box-sizing: border-box;
  background: rgba(4, 12, 14, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.welcome-feature-mark {
  display: block;
  width: 46px;
  height: 5px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.welcome-feature h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.welcome-feature p {
  margin: 0;
  color: #d8e7ea;
  font-size: 14px;
  line-height: 1.55;
  font-weight: normal;
}

/* Hide bulk area selection on mobile and keep the rest of the UI compact. */
@media (max-width: 680px), (hover: none) and (pointer: coarse) {
  #bulk-select-toggle {
    display: none;
  }

  #map-control-menu,
  #status-menu,
  #options-menu,
  .popup-menu,
  .menu-panel {
    width: max-content;
    max-width: calc(100vw - 30px);
    padding: 10px 10px;
    gap: 5px;
  }

  #map-control-menu {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    left: 50%;
    transform: translateX(-50%);
  }

  #map-control-menu button,
  #status-menu button,
  #options-menu button {
    min-width: auto;
    width: max-content;
    display: inline-block;
    padding: 10px 10px;
    font-size: 15px;
  }

  #status-menu,
  #options-menu {
    text-align: left;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 15px;
  }

  #status-menu {
    padding: 6.25px;
    font-size: 9.375px;
    top: 15px;
    right: 15px;
  }

  #status-menu div {
    margin-bottom: 5.625px;
    font-size: 9.375px;
  }

  #status-menu span:first-child {
    margin-right: 5px;
  }

  #options-menu {
    display: inline-flex;
    flex-wrap: wrap;
  }

  #top-left-menus {
    top: 15px;
    left: 15px;
    right: 15px;
    gap: 10px;
  }

  .popup-menu {
    min-width: auto;
    font-size: 10px;
  }

  .user-location-name-popup {
    font-size: 12px;
    max-width: min(180px, calc(100vw - 40px));
    padding: 5px 8px;
  }

  .project-menu-popup {
    width: 75%;
    max-width: 75vw;
    padding: 11px;
    font-size: 22.5px;
  }

  .project-menu-popup .status-info {
    margin: 11px 0;
    font-size: 10.5px;
  }

  .project-menu-popup .status-info div {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .project-menu-popup .status-popup-actions {
    gap: 9px;
  }

  .project-menu-popup .project-menu-actions {
    width: min(270px, 100%);
    margin-top: 14px;
  }

  .project-menu-popup button {
    min-width: 68px;
    padding: 7px 9px;
    font-size: 15px;
  }

  .notes-street-header {
    flex-direction: column;
  }

  .notes-street-badges {
    justify-content: flex-start;
  }

  .notes-filter-control {
    width: 100%;
    justify-content: space-between;
  }

  .stats-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .runner-status-counts {
    justify-content: flex-start;
  }

  .popup-button-container {
    gap: 10px;
    font-size: 10px;
  }

  #status-menu-data {
    text-align: left;
    font-size: 9.375px;
  }

  .admin-shell {
    padding: 15px;
    padding-bottom: 56px;
    padding-bottom: max(56px, calc(15px + env(safe-area-inset-bottom)));
  }

  .admin-shell .menu-panel,
  .admin-shell .admin-panel {
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }

  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .projects-list {
    --project-card-height: 178px;
  }

  .project-card {
    flex-direction: column;
    align-items: stretch;
  }

  .project-card-actions {
    align-self: flex-end;
    justify-content: flex-end;
  }

  .project-share-link-row {
    grid-template-columns: 1fr;
  }

  .project-key-row {
    grid-template-columns: 1fr;
  }

  .project-share-popup {
    width: min(520px, 92vw);
  }

  .project-share-layout {
    grid-template-columns: 1fr;
  }

  .project-share-preview {
    order: 1;
  }

  .project-share-fields {
    order: 2;
  }

  .project-share-close-actions {
    order: 3;
  }

  .project-share-image-actions {
    align-items: stretch;
  }

  .project-share-image-actions button,
  .project-share-close-actions button {
    width: 100%;
  }

  .terminal-line {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .welcome-hero {
    min-height: 82vh;
    padding: 18px;
    background:
      linear-gradient(rgba(3, 7, 8, 0.84), rgba(3, 7, 8, 0.9)),
      url('../images/MapBackground.png') center center / cover no-repeat;
  }

  .welcome-nav {
    align-items: flex-start;
  }

  .welcome-brand {
    font-size: 15px;
  }

  .welcome-nav-actions {
    justify-content: flex-end;
    gap: 8px;
  }

  .welcome-nav-link {
    padding: 8px 9px;
    font-size: 12px;
  }

  .welcome-hero-content {
    margin: 58px 0 42px;
  }

  .welcome-hero-content h1 {
    font-size: 42px;
  }

  .welcome-lede {
    font-size: 16px;
  }

  .welcome-actions {
    align-items: stretch;
  }

  .welcome-primary-action,
  .welcome-secondary-action {
    width: 100%;
  }

  .welcome-use-cases {
    width: calc(100% - 30px);
    grid-template-columns: 1fr;
    margin-top: -28px;
    padding-bottom: 32px;
  }

  .welcome-feature {
    min-height: 0;
  }
}
