.dwse-template-shell,
.dwse-search-app,
.dwse-species-profile {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
}
.dwse-species-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(20, 104, 74, .10), rgba(22, 148, 163, .10));
  border: 1px solid rgba(20, 104, 74, .16);
  margin-bottom: 28px;
}
.dwse-kicker {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 800;
  color: #14684a;
  margin: 0 0 8px;
}
.dwse-species-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
}
.dwse-scientific-big,
.dwse-scientific {
  color: #42544c;
}
.dwse-scientific-big {
  font-size: 20px;
  margin: 10px 0 6px;
}
.dwse-dhivehi-big,
.dwse-dhivehi {
  direction: rtl;
  unicode-bidi: plaintext;
}
.dwse-dhivehi-big {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px;
}
.dwse-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  display: block;
  box-shadow: 0 18px 45px rgba(0,0,0,.14);
}
.dwse-profile-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.dwse-taxonomy-aside {
  position: sticky;
  top: 24px;
}
.dwse-taxonomy-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0,0,0,.05);
}
.dwse-taxonomy-box h2 {
  margin: 0;
  padding: 16px 18px;
  background: #14684a;
  color: #fff;
  font-size: 20px;
}
.dwse-taxonomy-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.dwse-taxonomy-box th,
.dwse-taxonomy-box td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-size: 14px;
}
.dwse-taxonomy-box th {
  width: 38%;
  background: rgba(20, 104, 74, .05);
  font-weight: 800;
}
.dwse-content,
.dwse-info-section {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 26px rgba(0,0,0,.04);
}
.dwse-info-section h2 {
  margin-top: 0;
}
.dwse-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.dwse-card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 104, 74, .10);
  color: #14684a;
  font-weight: 700;
  font-size: 12px;
}
.dwse-search-form {
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 34px rgba(0,0,0,.06);
}
.dwse-search-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.dwse-search-form input,
.dwse-search-form select,
.dwse-search-form button {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.16);
  padding: 0 14px;
  font: inherit;
  max-width: 100%;
}
.dwse-search-form button,
.dwse-filter-actions button {
  background: #14684a;
  color: #fff;
  border-color: #14684a;
  font-weight: 800;
  cursor: pointer;
}
.dwse-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}
.dwse-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.dwse-filter-actions a {
  color: #14684a;
  font-weight: 800;
  text-decoration: none;
}
.dwse-results-head {
  margin: 14px 0;
  color: #33443d;
}
.dwse-species-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.dwse-species-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.dwse-card-image {
  display: block;
  aspect-ratio: 4/3;
  background: rgba(20, 104, 74, .08);
  overflow: hidden;
  color: #14684a;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dwse-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.dwse-species-card:hover .dwse-card-image img {
  transform: scale(1.04);
}
.dwse-card-body {
  padding: 16px;
}
.dwse-card-body h3 {
  margin: 0 0 6px;
  font-size: 22px;
}
.dwse-card-body h3 a {
  color: inherit;
  text-decoration: none;
}
.dwse-card-body p {
  margin: 4px 0;
}
.dwse-map-wrap {
  position: relative;
}
.dwse-map {
  width: 100%;
  min-height: 360px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,.12);
  overflow: hidden;
  margin: 18px 0;
  background: rgba(20, 104, 74, .06);
}
.dwse-search-map {
  min-height: 420px;
}
.dwse-popup-title {
  font-weight: 800;
  margin-bottom: 4px;
}
.dwse-popup-scientific {
  color: #51625a;
  margin-bottom: 6px;
}
.dwse-popup a {
  display: inline-block;
  margin-top: 6px;
  color: #14684a;
  font-weight: 800;
  text-decoration: none;
}
.dwse-map-empty,
.dwse-no-results {
  padding: 14px;
  background: rgba(20, 104, 74, .08);
  border-radius: 14px;
}
.dwse-observation-list {
  display: grid;
  gap: 10px;
}
.dwse-observation-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}
.dwse-observation-item span {
  color: #5c6d65;
  font-size: 13px;
}
.dwse-pagination {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
.dwse-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  text-decoration: none;
  color: #14684a;
  font-weight: 800;
}
.dwse-pagination a.is-active {
  background: #14684a;
  color: #fff;
}
@media (max-width: 900px) {
  .dwse-species-hero,
  .dwse-profile-layout {
    grid-template-columns: 1fr;
  }
  .dwse-taxonomy-aside {
    position: static;
  }
  .dwse-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dwse-species-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 580px) {
  .dwse-template-shell,
  .dwse-search-app,
  .dwse-species-profile {
    padding: 14px 10px;
  }
  .dwse-species-hero {
    padding: 18px;
    border-radius: 20px;
  }
  .dwse-search-main,
  .dwse-filter-grid,
  .dwse-species-grid {
    grid-template-columns: 1fr;
  }
  .dwse-search-form input,
  .dwse-search-form select,
  .dwse-search-form button {
    width: 100%;
  }
}

/* iNaturalist-style observation card */
.dwse-observation-profile,
.dwse-observation-cards {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 12px;
  box-sizing: border-box;
}
.dwse-observation-cards {
  display: grid;
  gap: 22px;
}
.dwse-inat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.14);
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto 20px;
}
.dwse-inat-header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,.10);
}
.dwse-inat-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(20,104,74,.10);
}
.dwse-inat-user {
  display: grid;
  gap: 3px;
}
.dwse-inat-user strong {
  font-size: 20px;
  line-height: 1.15;
}
.dwse-inat-user span {
  color: #263b31;
  font-size: 15px;
}
.dwse-inat-nav {
  display: flex;
  gap: 8px;
}
.dwse-inat-nav span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #7db41e;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}
.dwse-inat-nav span + span {
  opacity: .38;
}
.dwse-inat-species {
  padding: 14px 22px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.dwse-inat-species a {
  color: #14684a;
  font-weight: 800;
  text-decoration: none;
  font-size: 18px;
}
.dwse-inat-species em {
  color: #5a6a62;
}
.dwse-inat-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px 22px 14px;
  font-size: 14px;
  color: #1f2b26;
}
.dwse-inat-meta strong {
  color: #111;
}
.dwse-inat-card .dwse-inat-map {
  margin: 0 22px;
  border-radius: 0;
  min-height: 220px;
  border: 1px solid rgba(0,0,0,.12);
}
.dwse-inat-location {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 22px 18px;
  font-size: 15px;
  color: #1f2b26;
}
.dwse-inat-location a {
  color: #2574c7;
  text-decoration: none;
  font-weight: 700;
}
.dwse-inat-note {
  margin: -8px 22px 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 193, 7, .16);
  color: #5d4b06;
  font-size: 13px;
}
.dwse-pin-icon {
  background: transparent !important;
  border: 0 !important;
}
.dwse-pin-icon span {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  background: #1976d2;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 7px rgba(0,0,0,.35);
}
.dwse-pin-icon span:after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  left: 6px;
  top: 6px;
}
.dwse-pin-icon.is-general span {
  background: #f39c12;
}
.dwse-pin-icon.is-location span {
  background: #16815f;
}
.dwse-map-fit-btn {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(0,0,0,.18);
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
}
.dwse-map-fit-btn:hover {
  background: #f4f4f4;
}
.dwse-popup-row {
  margin: 3px 0;
}
.dwse-popup-note {
  display: inline-block;
  margin: 6px 0 2px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(243,156,18,.16);
  color: #76500a;
  font-size: 12px;
  font-weight: 700;
}
.dwse-editor-preview {
  border: 1px solid rgba(20,104,74,.20);
  padding: 12px;
  background: rgba(20,104,74,.025);
}
@media (max-width: 580px) {
  .dwse-inat-header,
  .dwse-inat-meta,
  .dwse-inat-location {
    padding-left: 14px;
    padding-right: 14px;
  }
  .dwse-inat-card .dwse-inat-map {
    margin-left: 14px;
    margin-right: 14px;
  }
  .dwse-inat-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Location information block under maps */
.dwse-location-card {
  margin: 0 22px 22px;
  border: 1px solid rgba(20,104,74,.14);
  border-top: 0;
  background: linear-gradient(180deg, rgba(20,104,74,.035), #fff 44%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.dwse-location-card-head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px 10px;
}
.dwse-location-pin {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,104,74,.10);
  color: #14684a;
  font-size: 20px;
}
.dwse-location-kicker {
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 800;
  color: #668276;
}
.dwse-location-card h3 {
  margin: 0;
  color: #17231e;
  font-size: 19px;
  line-height: 1.25;
}
.dwse-location-details-link {
  border: 1px solid rgba(37,116,199,.22);
  background: rgba(37,116,199,.06);
  color: #2574c7;
  text-decoration: none;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.dwse-location-info-text {
  margin: 2px 18px 12px;
  color: #34443d;
  line-height: 1.55;
}
.dwse-location-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 16px;
}
.dwse-location-facts span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(20,104,74,.055);
  color: #20322a;
  font-size: 13px;
}
.dwse-location-facts strong {
  color: #14684a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.dwse-map-info-panel {
  margin: -6px 0 24px;
  padding: 18px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
}
.dwse-map-info-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.dwse-map-info-head h3 {
  margin: 0;
  font-size: 21px;
}
.dwse-map-info-head span {
  color: #66776f;
  font-size: 13px;
  font-weight: 700;
}
.dwse-map-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.dwse-map-info-item {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid rgba(20,104,74,.13);
  border-radius: 16px;
  background: rgba(20,104,74,.035);
  color: inherit;
  text-decoration: none;
}
.dwse-map-info-item strong {
  color: #14684a;
  line-height: 1.25;
}
.dwse-map-info-item span {
  color: #1e2d27;
  font-weight: 700;
}
.dwse-map-info-item small {
  color: #63756d;
}
.dwse-map-info-item p {
  margin: 4px 0 0;
  color: #3f5149;
  line-height: 1.45;
}
.dwse-map-info-more {
  margin: 12px 0 0;
  color: #61736b;
  font-size: 13px;
}
.dwse-popup-info {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,.10);
  color: #384840;
  line-height: 1.4;
}
@media (max-width: 580px) {
  .dwse-location-card {
    margin-left: 14px;
    margin-right: 14px;
  }
  .dwse-location-card-head {
    grid-template-columns: auto minmax(0,1fr);
  }
  .dwse-location-details-link {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .dwse-location-facts,
  .dwse-map-info-grid {
    grid-template-columns: 1fr;
  }
}
.dwse-location-card .dwse-inat-note {
  margin: 0 18px 16px;
}

/* v1.5 map section: clear title, search box and better context */
.dwse-map-section {
  margin: 22px 0 28px;
  border: 1px solid rgba(20,104,74,.14);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(20,104,74,.045), #fff 52%);
  box-shadow: 0 12px 34px rgba(0,0,0,.055);
  overflow: hidden;
}
.dwse-info-section .dwse-map-section {
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}
.dwse-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 0;
}
.dwse-map-kicker {
  margin: 0 0 5px;
  color: #14684a;
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 900;
}
.dwse-map-header h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  color: #10241b;
}
.dwse-map-header p:not(.dwse-map-kicker) {
  max-width: 720px;
  margin: 8px 0 0;
  color: #4d6259;
  line-height: 1.55;
}
.dwse-map-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20,104,74,.09);
  color: #14684a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.dwse-map-section .dwse-map-wrap {
  padding: 0 22px 22px;
}
.dwse-map-section .dwse-map {
  margin: 16px 0 0;
  border-radius: 22px;
  border-color: rgba(20,104,74,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
}
.dwse-map-search-control {
  width: min(360px, calc(100vw - 72px));
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.16);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.dwse-map-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}
.dwse-map-search-row input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;
  padding: 0 10px;
  font: inherit;
}
.dwse-map-search-row button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: #14684a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.dwse-map-search-hint {
  margin-top: 7px;
  color: #61736b;
  font-size: 12px;
}
.dwse-map-search-results {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-height: 210px;
  overflow: auto;
}
.dwse-map-search-result {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid rgba(20,104,74,.18);
  border-radius: 10px;
  background: #fff;
  color: #17231e;
  cursor: pointer;
}
.dwse-map-search-result:hover,
.dwse-map-search-result:focus {
  border-color: #14684a;
  box-shadow: 0 0 0 1px #14684a;
  outline: none;
}
.dwse-map-search-result span {
  color: #66776f;
  font-size: 12px;
}
.dwse-map-search-status {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(20,104,74,.07);
  color: #14684a;
  font-weight: 700;
}
.dwse-map-search-status.is-error {
  background: rgba(214,54,56,.08);
  color: #9d2323;
}
.dwse-search-pin-icon span {
  display: block;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2574c7;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
@media (max-width: 640px) {
  .dwse-map-header {
    flex-direction: column;
    padding: 16px 16px 0;
  }
  .dwse-map-section .dwse-map-wrap {
    padding: 0 14px 16px;
  }
  .dwse-map-search-control {
    width: min(310px, calc(100vw - 42px));
  }
}
