:root {
  --primary-color: #2e8b57;
  --primary-dark: #1e5631;
  --secondary-color: #ffd700;
  --accent-color: #ff6b6b;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-bg: #f8f9fa;
  --dark-bg: #343a40;
  --text-primary: #2c3e50;
  --text-muted: #6c757d;
  --border-color: #e9ecef;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text-primary);
  font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  margin: 0 auto;
  max-width: 1140px;
  padding: 0 18px;
}

.skip-link {
  background: var(--primary-color);
  border-radius: 4px;
  color: white;
  left: 6px;
  padding: 8px;
  position: absolute;
  top: -44px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}

.navbar {
  background: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 62px;
}

.navbar-brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 800;
  gap: 10px;
}

.navbar-brand i,
.navbar-links i,
.hero-features i,
.text-warning {
  color: var(--secondary-color);
}

.navbar-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 500;
}

.navbar-links a {
  opacity: 0.95;
}

.navbar-links a:hover {
  color: var(--secondary-color);
}

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  margin-bottom: 48px;
  overflow: hidden;
  padding: 58px 0;
  position: relative;
}

.hero-section::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' fill='white' opacity='0.1'%3E%3Cpolygon points='1000,100 0,100 0,0 1000,20'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  min-height: 50vh;
  position: relative;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 22px;
}

.hero-copy h1 span {
  color: var(--secondary-color);
}

.hero-copy p {
  font-size: 1.22rem;
  line-height: 1.7;
  margin: 0 0 24px;
  max-width: 620px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.hero-features span {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.recent-panel {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

.recent-carousel-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.recent-carousel-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.recent-carousel-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.recent-list {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-padding: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.recent-card {
  align-items: stretch;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  color: var(--text-primary);
  display: grid;
  grid-template-rows: 190px minmax(0, auto);
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recent-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transform: translateY(-2px);
}

.recent-card img,
.recent-image-empty {
  background: var(--light-bg);
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.recent-image-empty,
.recent-empty {
  align-items: center;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
}

.recent-image-empty {
  color: var(--text-muted);
  min-height: 190px;
}

.recent-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
}

.recent-badge {
  align-items: center;
  background: rgba(46, 139, 87, 0.12);
  border-radius: 999px;
  color: var(--primary-color);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 5px;
  padding: 6px 10px;
}

.recent-badge.new {
  background: rgba(40, 167, 69, 0.14);
  color: var(--success-color);
}

.recent-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px 18px;
}

.recent-title-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.recent-card-body h3 {
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-description {
  color: var(--text-muted);
  display: -webkit-box;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-meta {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  font-size: 0.86rem;
  gap: 12px;
  justify-content: space-between;
}

.recent-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-section {
  background: linear-gradient(145deg, #ffffff 0%, var(--light-bg) 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 48px;
  max-width: 900px;
  padding: 42px;
}

.compact-search {
  margin-top: 42px;
}

.section-title {
  margin-bottom: 28px;
  text-align: center;
}

.section-title h1,
.section-title h2,
.about-section h2 {
  color: var(--primary-color);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.2;
  margin: 0 0 10px;
}

.section-title p,
.muted,
.card-description,
.empty-results p,
.about-section p {
  color: var(--text-muted);
}

.park-search-form {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-box {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.search-box:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(46, 139, 87, 0.1);
}

.search-box h3 {
  color: var(--primary-color);
  font-size: 1rem;
  margin: 0 0 18px;
}

.search-box label,
.editor-form label,
.auth-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.search-box label span,
.editor-form label span,
.auth-panel label span,
legend {
  color: var(--text-primary);
  font-weight: 700;
}

input,
select,
textarea {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font: inherit;
  min-height: 48px;
  padding: 12px 16px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(46, 139, 87, 0.25);
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.equipment-list {
  max-height: 200px;
  overflow-y: auto;
}

.check {
  align-items: center;
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.check input {
  min-height: auto;
  width: auto;
}

.search-submit {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  justify-items: center;
}

.btn {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.btn.is-loading {
  cursor: progress;
  opacity: 0.82;
}

.btn.is-loading:hover {
  transform: none;
}

.btn.is-loading i {
  display: none;
}

.btn.is-loading::before {
  animation: btnSpin 0.75s linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  height: 14px;
  width: 14px;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-outline {
  background: white;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-lg {
  font-size: 1.1rem;
  min-height: 58px;
  padding: 16px 32px;
}

.how-section {
  background: var(--light-bg);
  padding: 64px 0;
}

.steps-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-card {
  text-align: center;
}

.step-icon {
  align-items: center;
  background: var(--primary-color);
  border-radius: 50%;
  color: white;
  display: inline-flex;
  height: 80px;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  width: 80px;
}

.step-icon i {
  font-size: 2rem;
}

.step-icon span {
  background: var(--secondary-color);
  border-radius: 999px;
  color: #212529;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 8px;
  position: absolute;
  right: -10px;
  top: -6px;
}

.step-card h3 {
  color: var(--primary-color);
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.step-card p {
  color: var(--text-muted);
  margin: 0;
}

.about-section {
  padding: 64px 0;
}

.about-grid {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr 1fr;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
  text-align: center;
}

.stats-grid strong {
  color: var(--primary-color);
  display: block;
  font-size: 1.9rem;
}

.stats-grid span {
  color: var(--text-muted);
}

.family-panel {
  background: rgba(46, 139, 87, 0.1);
  border-radius: 12px;
  color: var(--primary-color);
  padding: 54px 32px;
  text-align: center;
}

.family-panel i {
  font-size: 4rem;
  margin-bottom: 18px;
}

.family-panel p {
  margin-bottom: 0;
}

.search-results-page {
  padding-bottom: 54px;
}

.results-heading {
  margin: 28px 0;
  text-align: center;
}

.results-heading h2 {
  color: var(--primary-color);
  margin-bottom: 8px;
}

.results-heading h2 i,
.location-line i,
.empty-results i,
.amenities i,
.detail-title i,
.info-card h2 i {
  color: var(--secondary-color);
}

.sort-panel {
  align-items: center;
  background: var(--light-bg);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
}

.badge,
.distance-badge {
  background: var(--primary-color);
  border-radius: 999px;
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 11px;
}

.distance-badge {
  background: var(--success-color);
  flex-shrink: 0;
}

.results-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.playground-card,
.info-card,
.auth-panel,
.editor-form,
.table-wrap,
.list,
.alert {
  background: white;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.playground-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: all 0.3s ease;
}

.playground-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.card-header-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-header-row h3 {
  color: var(--primary-color);
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 0;
}

.location-line {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.playground-image-container {
  background: var(--light-bg);
  border-radius: 8px;
  height: 180px;
  margin-bottom: 16px;
  overflow: hidden;
}

.playground-image-container img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  width: 100%;
}

.playground-image-container:hover img {
  transform: scale(1.05);
}

.image-fallback,
.detail-image-empty,
.map-placeholder {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.image-fallback i,
.map-placeholder i {
  font-size: 2rem;
  margin-bottom: 8px;
}

.card-description {
  font-size: 0.92rem;
}

.amenities {
  margin-top: auto;
}

.amenities h4 {
  color: var(--primary-color);
  font-size: 1rem;
  margin: 0 0 10px;
}

.amenities-grid,
.detail-equipment-grid {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amenities-grid small,
.detail-equipment-grid div {
  color: var(--success-color);
}

.card-footer {
  padding: 0 24px 24px;
}

.card-footer .btn {
  width: 100%;
}

.empty-results {
  background: rgba(46, 139, 87, 0.1);
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  color: var(--primary-dark);
  margin: 30px auto;
  max-width: 760px;
  padding: 32px;
  text-align: center;
}

.empty-results > i {
  font-size: 2rem;
}

.empty-results ul {
  display: inline-grid;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  text-align: left;
}

.detail-hero {
  height: 400px;
  overflow: hidden;
  position: relative;
}

.detail-hero img,
.detail-image-empty {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.detail-image-empty {
  background: var(--primary-color);
  color: white;
}

.detail-image-empty i {
  font-size: 4rem;
}

.detail-overlay {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  inset: 0;
  position: absolute;
}

.detail-title {
  bottom: 0;
  color: white;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 100%;
  z-index: 2;
}

.detail-title nav {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  opacity: 0.86;
}

.detail-title h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 8px;
}

.detail-title p {
  font-size: 1.15rem;
  margin: 0 0 28px;
}

.detail-layout {
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  padding-bottom: 56px;
  padding-top: 56px;
}

.detail-main,
.detail-sidebar {
  display: grid;
  gap: 28px;
  align-content: start;
}

.detail-sidebar {
  position: sticky;
  top: 90px;
}

.info-card {
  padding: 24px;
}

.info-card h2 {
  color: var(--primary-color);
  font-size: 1.45rem;
  margin: 0 0 16px;
}

.markdown-content {
  white-space: pre-wrap;
}

.map-placeholder {
  background: var(--light-bg);
  border-radius: 8px;
  min-height: 320px;
}

.action-stack,
.share-grid {
  display: grid;
  gap: 12px;
}

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

.site-footer {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #2c3e50 100%);
  color: #f8f9fa;
  padding: 54px 0 28px;
}

.footer-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 2fr 1fr 1.2fr 1.4fr;
}

.site-footer h5,
.site-footer h6 {
  color: var(--primary-color);
  margin: 0 0 14px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: #adb5bd;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 14px;
}

.social-links button {
  background: transparent;
  border: 0;
  color: #f8f9fa;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.footer-warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--warning-color);
  border-radius: 8px;
  color: #ffe8a1;
  margin: 30px 0;
  padding: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
}

.alert-success {
  background: #e8f5ee;
}

.alert-danger {
  background: #f8e8e8;
}

.auth-panel,
.editor-form {
  margin: 48px auto;
  max-width: 760px;
  padding: 24px;
}

.table-wrap,
.list {
  overflow: hidden;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border-color);
  padding: 12px;
  text-align: left;
}

.actions,
.form-actions,
.inline-form,
.toolbar,
.section-heading,
.list-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.link-button {
  background: none;
  border: 0;
  color: var(--primary-color);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.danger {
  color: var(--danger);
}

.status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-pill.success {
  background: rgba(40, 167, 69, 0.12);
  color: var(--success-color);
}

.status-pill.missing {
  background: #f1f3f5;
  color: var(--text-muted);
}

.two-col {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-row {
  border-bottom: 1px solid var(--border-color);
  padding: 12px;
}

.admin-tool-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
  padding: 24px;
}

.admin-tool-card h2 {
  color: var(--primary-color);
  margin-top: 0;
}

.inline-form.wrap {
  align-items: end;
  flex-wrap: wrap;
}

.inline-form.wrap label {
  min-width: 180px;
}

.discovery-list {
  display: grid;
  gap: 22px;
}

.discovery-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.discovery-summary {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.discovery-summary h3 {
  color: var(--primary-color);
  margin: 0 0 8px;
}

.discovery-summary p {
  margin: 5px 0;
}

.ai-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.ai-notes {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  color: #0c5460;
  margin-bottom: 16px;
  padding: 12px;
}

.ai-notes p {
  margin: 5px 0;
}

.ai-notes.error {
  background: #f8e8e8;
  border-color: #f1b0b7;
  color: #721c24;
}

.editor-form.embedded {
  box-shadow: none;
  margin: 0;
  max-width: none;
  padding: 0;
}

/* Admin shell */
.admin-body {
  background: #f3f6f4;
}

.admin-body #main-content {
  min-height: calc(100vh - 64px);
}

.admin-topbar {
  background: #24352d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-topbar-inner {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 0 auto;
  max-width: 1360px;
  min-height: 64px;
  padding: 0 24px;
}

.admin-brand,
.admin-nav,
.admin-logout {
  align-items: center;
  display: flex;
}

.admin-brand {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  gap: 10px;
}

.admin-brand i {
  color: var(--secondary-color);
}

.admin-nav {
  gap: 6px;
}

.admin-nav a {
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  font-size: 0.94rem;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.admin-logout {
  gap: 12px;
  justify-content: flex-end;
}

.admin-logout a {
  color: rgba(255, 255, 255, 0.78);
}

.admin-logout button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  min-height: 36px;
  padding: 7px 12px;
}

.admin-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px 24px 56px;
}

.admin-page-wide {
  max-width: 1360px;
}

.admin-page-narrow {
  max-width: 860px;
}

.admin-page-form {
  max-width: 980px;
}

.admin-eyebrow {
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.admin-page .section-heading {
  align-items: flex-end;
  margin-bottom: 22px;
}

.admin-page .section-heading h1 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.1;
  margin: 0;
}

.admin-toolbar {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.admin-toolbar-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  display: flex;
  font-weight: 800;
  gap: 12px;
  min-height: 68px;
  padding: 16px;
}

.admin-toolbar-card i {
  align-items: center;
  background: rgba(46, 139, 87, 0.12);
  border-radius: 8px;
  color: var(--primary-color);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.admin-toolbar-card:hover {
  border-color: rgba(46, 139, 87, 0.4);
  text-decoration: none;
}

.admin-page .table-wrap {
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.admin-page table {
  background: #fff;
  min-width: 720px;
}

.admin-page th {
  background: #f8faf8;
  color: #53615a;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-page td,
.admin-page th {
  padding: 13px 14px;
  vertical-align: middle;
}

.admin-page .actions {
  justify-content: flex-end;
  white-space: nowrap;
}

.table-action {
  color: var(--primary-color);
  font-weight: 800;
}

.admin-page .editor-form,
.admin-tool-card {
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.admin-editor-form {
  margin: 0;
  max-width: none;
}

.admin-page textarea {
  min-height: 110px;
}

.admin-image-field {
  display: grid;
  gap: 14px;
}

.admin-image-preview {
  align-items: center;
  aspect-ratio: 16 / 7;
  background: #f8faf8;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.admin-image-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.admin-image-empty {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-image-empty i {
  font-size: 2rem;
}

.admin-image-field small {
  color: var(--text-muted);
  display: block;
  font-size: 0.84rem;
  margin-top: 6px;
}

.admin-page fieldset {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin: 4px 0 0;
  padding: 16px;
}

.admin-page legend {
  padding: 0 6px;
}

.admin-page .checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-checks {
  grid-template-columns: 1fr !important;
  max-height: 300px;
  overflow: auto;
}

.admin-page .check {
  background: #f8faf8;
}

.admin-tool-card {
  margin-bottom: 18px;
}

.admin-tool-card > h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.admin-tool-card > p {
  margin-top: 0;
}

.discovery-card {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.discovery-summary > div {
  min-width: 0;
}

.discovery-summary a {
  color: var(--primary-color);
  overflow-wrap: anywhere;
}

.ai-action-row {
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  padding: 14px 0;
}

.ai-action-row .btn {
  min-height: 38px;
  padding: 8px 12px;
}

.discovery-editor {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
}

.discovery-editor-main,
.discovery-editor-side {
  display: grid;
  gap: 14px;
}

.discovery-editor-side {
  align-content: start;
}

.discovery-editor-side .btn {
  width: 100%;
}

.admin-page .list {
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.admin-page .inline-form.wrap {
  display: flex;
}

.admin-page .inline-form.wrap label {
  flex: 1 1 220px;
}

@media (max-width: 900px) {
  .admin-topbar-inner {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .admin-nav,
  .admin-logout {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .admin-page .section-heading,
  .discovery-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-toolbar,
  .discovery-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-page {
    padding: 22px 14px 42px;
  }

  .admin-nav a {
    font-size: 0.88rem;
    padding: 7px 9px;
  }

  .admin-page .section-heading h1 {
    font-size: 1.8rem;
  }

  .admin-tool-card,
  .discovery-card,
  .admin-page .editor-form {
    padding: 16px;
  }

  .ai-action-row,
  .admin-page .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-action-row form,
  .ai-action-row .btn,
  .admin-page .form-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .results-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .navbar-links {
    gap: 10px 14px;
  }

  .hero-section {
    padding: 34px 0;
    text-align: center;
  }

  .hero-features {
    justify-content: center;
  }

  .recent-panel,
  .search-section {
    padding: 20px;
  }

  .recent-card {
    grid-template-rows: 160px minmax(0, auto);
  }

  .recent-image-empty {
    min-height: 160px;
  }

  .park-search-form,
  .steps-grid,
  .results-grid,
  .footer-grid,
  .two-col,
  .share-grid {
    grid-template-columns: 1fr;
  }

  .sort-panel,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .detail-hero {
    height: 360px;
  }

  .card-header-row {
    flex-direction: column;
  }
}
