/* Wag Trails · shared outdoor design system. Existing layout and behavior retained. */
:root {
  --forest: #173e30;
  --evergreen: #2d5a43;
  --cream: #f7f5ee;
  --sage: #e3eadc;
  --trail: #b75b39;
  --charcoal: #202c26;
  --green: var(--evergreen);
  --deep: var(--forest);
  --ink: var(--charcoal);
  --muted: #606b61;
  --line: #dce1d6;
  --soft: #eff1e8;
  --gold: #b8662e;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 28px #173e300b;
  --shadow-raised: 0 12px 30px #173e3018;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
  --fast: 160ms;
  --settle: 240ms;
}
html {
  scroll-padding-top: 90px;
}
body {
  background: var(--cream);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--sage);
  color: var(--forest);
}
h1,
h2,
h3 {
  color: var(--forest);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(34px, 3.7vw, 52px);
  line-height: 1.08;
}
h2 {
  font-size: clamp(26px, 2.5vw, 36px);
}
h3 {
  font-size: 19px;
}
p {
  line-height: 1.65;
}
a,
button {
  transition:
    color var(--fast),
    background var(--fast),
    box-shadow var(--fast),
    transform var(--fast) var(--ease),
    border-color var(--fast);
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--trail);
  outline-offset: 4px;
}
.wrap {
  max-width: 1400px;
  padding-left: clamp(24px, 4.5vw, 64px);
  padding-right: clamp(24px, 4.5vw, 64px);
}
#header {
  background: #fffefb;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 800;
}
.nav {
  height: 88px;
}
.brand {
  font-size: 26px;
  letter-spacing: -1px;
  color: var(--forest);
  font-weight: 700;
}
.brand i {
  background: var(--forest);
  color: var(--cream);
  border-radius: 50%;
  font-size: 25px;
  padding: 9px;
}
.navlinks {
  gap: 36px;
  margin-left: 0;
}
.navlinks a {
  font-size: 15px;
}
.navlinks a.active:after {
  height: 3px;
  bottom: 20px;
  border-radius: 3px;
  background: var(--trail);
}
.navright small {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14px;
}
.button {
  min-height: 46px;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
}
.button.primary {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  box-shadow: 0 2px 3px #173e3010;
}
.button.subtle {
  background: #fffefb;
}
.button:active,
.iconbutton:active,
.chip:active {
  transform: scale(0.97);
}
.button.mapaction:active {
  transform: translateX(-50%) scale(0.97);
}
.button:disabled {
  opacity: 0.6;
}
.iconbutton {
  min-width: 44px;
  min-height: 44px;
}
.eyebrow {
  color: var(--evergreen);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.15em;
  font-weight: 700;
}
.section {
  padding-top: 52px;
  padding-bottom: 52px;
}
.sectionhead {
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
.section-intro {
  margin-top: 10px;
  font-size: 15px;
}
.sectionhead .textlink {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
}
.hero {
  min-height: 590px;
  background-position: center 55%;
}
.hero:before {
  background: linear-gradient(
    90deg,
    #102b21bd 0%,
    #102b2140 54%,
    transparent 80%
  );
}
.hero h1 {
  color: #fff;
  font-size: clamp(48px, 4.6vw, 70px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  max-width: 680px;
}
.hero .eyebrow {
  color: #f4e8cd;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.hero p {
  font-size: 18px;
  max-width: 460px;
}
.hero .search {
  max-width: 610px;
  gap: 10px;
}
.hero .searchfield {
  min-height: 58px;
  box-shadow: var(--shadow-raised);
  margin: 0;
}
.hero .button {
  min-height: 58px;
  background: #fff9e9;
  border-color: #fff9e9;
  color: var(--forest);
}
.heroinner {
  padding-top: 60px;
  padding-bottom: 55px;
}
.hero-note {
  font-size: 28px;
  right: 6%;
  bottom: 42px;
  color: #fff8e9;
}
.benefits {
  margin-top: 30px;
  gap: 32px;
}
.benefits span {
  font-size: 11px;
}
.benefits i {
  font-size: 25px;
}
.home-trails {
  padding-top: 44px;
  padding-bottom: 52px;
}
.cards {
  gap: 22px;
}
.card {
  border-radius: var(--radius);
  background: #fffefb;
  border: 1px solid var(--line);
  overflow: hidden;
  padding-bottom: 18px;
  box-shadow: var(--shadow);
}
.cardphoto {
  display: block;
  overflow: hidden;
  border-radius: 0;
  background: var(--sage);
}
.cardphoto img,
.home-trails .cardphoto img {
  height: 180px;
  width: 100%;
  border-radius: 0;
  transition:
    transform 350ms var(--ease),
    opacity var(--settle);
}
.card h3 {
  margin: 16px 16px 5px;
  font-size: 17px;
}
.card .location {
  margin: 0 16px 8px;
  font-size: 12px;
}
.card .meta {
  margin: 0 16px;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.card .difficulty {
  margin: 10px 16px 0;
  font-size: 12px;
  color: var(--evergreen);
}
.heart,
.listcard .heart {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid #ffffff9c;
  background: #fffefbf5;
  color: var(--forest);
  top: 10px;
  right: 10px;
  box-shadow: 0 2px 8px #173e3014;
}
.heart.saved,
.button.saved {
  color: var(--trail);
}
.heart.saved i:before,
.button.saved i:before {
  font-weight: bold;
}
.inspiration {
  background: #e9eddf;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.category {
  height: 300px;
  border-radius: var(--radius);
}
.category h3,
.collection h3 {
  color: #fff;
}
.category img {
  transition:
    transform 350ms var(--ease),
    opacity var(--settle);
}
.category p {
  line-height: 1.4;
}
.story {
  gap: 64px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.story > div {
  flex: 1;
}
.story h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 48px);
  max-width: 500px;
}
.story p {
  font-size: 16px;
  margin: 20px 0 26px;
}
.storyphoto {
  position: relative;
  flex: 1;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.storyphoto img {
  width: 100%;
  aspect-ratio: 1.35;
  object-position: center 65%;
}
.storyphoto figcaption,
.about-photo figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  color: white;
  background: linear-gradient(transparent, #102b21a6);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 20px;
}
footer {
  background: var(--forest);
  border: 0;
  color: var(--cream);
}
.footerinner {
  color: #e3eadc;
  font-size: 13px;
  padding-top: 34px;
  padding-bottom: 34px;
  align-items: center;
}
.footerinner .textlink {
  color: #fff;
}
.footerinner a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.pagehead {
  padding-top: 52px;
  padding-bottom: 52px;
}
.pagehead h1 {
  font-size: 44px;
}
.tabs {
  gap: 28px;
  margin-bottom: 28px;
  scrollbar-width: thin;
}
.tab {
  font-size: 14px;
  padding: 17px 2px;
  min-height: 48px;
  color: var(--muted);
}
.tab.active {
  border-color: var(--trail);
  color: var(--forest);
}
.savedgrid {
  gap: 24px;
  margin-bottom: 44px;
}
.collection {
  height: 240px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.collection img {
  opacity: 0.75;
  transition:
    transform 350ms var(--ease),
    opacity var(--settle);
}
.collection .label {
  z-index: 1;
}
.collection:after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, #102b21a6);
  pointer-events: none;
}
.collection .count {
  z-index: 1;
  background: #173e30e6;
  color: #fff;
  border-radius: 30px;
  padding: 5px 10px;
  font-size: 12px;
}
.empty {
  background: #edf0e5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
}
.empty > i {
  background: #dce6d4;
  padding: 15px;
  border-radius: 50%;
  display: inline-block;
  margin-bottom: 14px;
  color: var(--forest);
}
.empty h3 {
  font-size: 22px;
}
.empty p {
  font-size: 15px;
  max-width: 440px;
  margin: 12px auto 22px;
}
.toolbar {
  max-width: none;
  background: #fffefb;
  border-top: 0;
  padding-top: 22px;
  padding-bottom: 18px;
}
.explore-heading {
  display: flex;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 20px;
}
.explore-heading h1 {
  font-size: 28px;
}
.explore-heading .eyebrow {
  margin: 0;
}
.toolbar .search {
  max-width: 1040px;
}
.searchfield {
  border-radius: var(--radius-sm);
  min-height: 48px;
}
.searchfield:focus-within {
  outline: 2px solid var(--evergreen);
  outline-offset: 2px;
}
.searchfield input {
  font-size: 16px;
}
.chips {
  gap: 8px;
}
.chip {
  min-height: 40px;
  border-radius: 40px;
  padding: 8px 14px;
  font-size: 13px;
}
.chip.on {
  background: var(--sage);
  border-color: #a7bca0;
}
.clear {
  font-size: 13px;
  min-height: 44px;
}
.explore-layout {
  grid-template-columns: 470px minmax(0, 1fr);
  height: calc(100dvh - 294px);
  min-height: 450px;
}
.results {
  padding: 22px 22px 32px 28px;
  background: var(--cream);
}
.resulthead {
  font-size: 13px;
  align-items: center;
}
.resulthead label {
  display: flex;
  align-items: center;
}
.resulthead select {
  font-size: 12px;
  min-height: 44px;
  color: var(--forest);
}
.listcard {
  padding: 12px;
  gap: 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px #173e3005;
}
.listcard > a {
  flex-shrink: 0;
  width: 108px;
  background: var(--sage);
  border-radius: 10px;
  overflow: hidden;
}
.listcard > a > img {
  height: 132px;
  width: 108px;
  border-radius: 10px;
}
.listbody {
  padding: 3px 0;
}
.listbody h3 {
  font-size: 16px;
  margin-right: 32px;
}
.listbody .meta {
  flex-wrap: wrap;
  font-size: 12px;
  gap: 5px;
}
.listbody p {
  font-size: 12px;
}
.tag {
  border-radius: 5px;
  background: #eef0e9;
  color: #4f5c50;
  font-size: 12px;
}
.listbody .tag {
  font-size: 11px;
  padding: 3px 6px;
}
.listcard .heart {
  right: 4px;
  top: 4px;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.listcard.selected {
  border-color: var(--evergreen);
  box-shadow: 0 0 0 1px var(--evergreen);
}
.map {
  background: var(--sage);
}
.mapnotice {
  background: #fffefb;
  font-size: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.mapaction {
  border-radius: 30px;
  min-height: 46px;
}
.leaflet-bar {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--shadow-raised) !important;
}
.leaflet-bar a {
  width: 42px !important;
  height: 42px !important;
  line-height: 42px !important;
  color: var(--forest) !important;
}
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  background: #fffefb;
}
.leaflet-popup-content {
  margin: 16px;
}
.leaflet-container a.leaflet-popup-close-button {
  width: 36px;
  height: 36px;
  line-height: 36px;
  color: var(--forest);
}
.pawmarker {
  background: var(--forest);
  box-shadow: 0 3px 10px #173e303b;
}
.pawmarker i {
  animation: marker-in 240ms var(--ease);
}
.tiles-loading:after {
  content: "Loading map…";
  position: absolute;
  z-index: 600;
  bottom: 8px;
  left: 10px;
  background: #fffefb;
  padding: 5px 10px;
  border-radius: 6px;
  font:
    12px "DM Sans",
    sans-serif;
  color: var(--forest);
}
.detailhero {
  height: 390px;
}
.detailhero img {
  object-position: center 53%;
}
.detail-layout {
  padding-top: 34px;
  padding-bottom: 56px;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
}
.breadcrumb {
  font-size: 12px;
  margin-bottom: 14px;
}
.detail-layout h1 {
  margin-bottom: 12px;
}
.detail-layout .meta {
  font-size: 14px;
}
.stats {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  font-size: 12px;
  line-height: 1.5;
  color: var(--forest);
}
.stat i {
  color: var(--evergreen);
}
.sidepanel {
  background: #fffefb;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  border: 1px solid var(--line);
}
.sidepanel .map {
  border-radius: 10px;
  overflow: hidden;
}
.side-note {
  background: var(--soft);
  border-radius: 10px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.65;
}
.side-note b {
  margin-bottom: 8px;
}
.prose {
  font-size: 16px;
  line-height: 1.8;
}
.prose h3 {
  margin-top: 28px;
  margin-bottom: 12px;
}
.profilecover {
  height: 250px;
  object-position: center 48%;
}
.profileinfo {
  gap: 24px;
}
.avatar {
  background: var(--sage);
  border: 5px solid var(--cream);
  box-shadow: var(--shadow);
}
.profile-stats {
  background: #fffefb;
  border: 1px solid var(--line);
  padding: 24px 0;
  border-radius: var(--radius);
  margin: 28px 0;
}
.profile-stats small {
  color: var(--muted);
  font-size: 12px;
}
.profile-stats b {
  color: var(--forest);
}
.profilebody {
  padding-bottom: 52px;
  gap: 40px;
}
.review,
.activity,
.settings {
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.review + .review,
.activity + .activity {
  margin-top: 12px;
}
.setting {
  gap: 20px;
}
.setting p {
  font-size: 13px;
}
.setting select {
  max-width: 150px;
}
.notice {
  color: #4b5c4b;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.photo-grid img {
  border-radius: var(--radius);
}
.about-page {
  min-height: 70vh;
  padding-top: 64px;
  padding-bottom: 64px;
}
.about-page h1 {
  max-width: 650px;
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 4vw, 58px);
}
.about-photo {
  float: right;
  width: 42%;
  margin: 0 0 32px 64px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.about-photo img {
  aspect-ratio: 0.8;
  width: 100%;
}
.about-page .prose {
  max-width: 100% !important;
}
.about-page:after {
  content: "";
  display: block;
  clear: both;
}
.photo-credits {
  font-size: 12px;
  padding-top: 20px;
}
.photo-credits a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
dialog {
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 24px 80px #102b2140;
  max-height: 85dvh;
}
dialog[open] {
  animation: surface-in var(--settle) var(--ease);
}
dialog::backdrop {
  background: #102b217a;
}
.modalhead {
  gap: 16px;
  align-items: flex-start;
}
.modalhead h2 {
  font-size: 28px;
}
.field {
  font-size: 14px;
  color: var(--forest);
}
.field input,
.field textarea,
.field select {
  min-height: 48px;
  border-color: var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  padding: 12px;
}
.check {
  padding: 12px 0;
  min-height: 48px;
  font-size: 15px;
}
.check input {
  accent-color: var(--forest);
  width: 20px;
  height: 20px;
}
.formactions {
  gap: 12px;
  padding-top: 8px;
}
.error {
  color: #9a3529 !important;
  font-size: 14px;
}
#toast {
  background: var(--forest);
  font-size: 14px;
  padding: 16px 22px;
  border: 1px solid #ffffff2e;
  border-radius: 12px;
  box-shadow: var(--shadow-raised);
  width: max-content;
}
#mobile-nav {
  display: none;
}
.wt-tooltip {
  position: fixed;
  background: var(--forest);
  color: white;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  z-index: 5000;
  max-width: 220px;
  text-align: center;
  box-shadow: var(--shadow-raised);
}
img.wt-image {
  transition: opacity var(--settle) var(--ease);
}
img.wt-pending {
  opacity: 0;
}
.wt-image-loading {
  background: #e3eadc;
  animation: skeleton-breathe 1.2s ease-in-out infinite alternate;
}
.save-pop i {
  animation: save-pop 240ms var(--ease);
  display: inline-block;
}
#resultlist,
.photo-grid,
#detailcontent,
#profilecontent {
  animation: surface-in 200ms var(--ease);
}
@keyframes save-pop {
  50% {
    transform: scale(1.25);
  }
}
@keyframes marker-in {
  from {
    opacity: 0;
    scale: 0.7;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@keyframes surface-in {
  from {
    opacity: 0.6;
    translate: 0 5px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes skeleton-breathe {
  from {
    background-color: #e3eadc;
  }
  to {
    background-color: #f1f3eb;
  }
}
@media (hover: hover) {
  .button.primary:hover {
    background: #2d5a43;
    border-color: #2d5a43;
    box-shadow: var(--shadow);
  }
  .button:not(.primary):hover,
  .chip:hover {
    border-color: #9aaf97;
    background: var(--soft);
  }
  .card:hover {
    box-shadow: var(--shadow-raised);
    border-color: #b9c8b3;
  }
  .card:hover .cardphoto img,
  .category:hover img,
  .collection:hover img {
    transform: scale(1.025);
  }
  .navlinks a:hover,
  .textlink:hover {
    color: var(--trail);
  }
  .heart:hover {
    background: #fff;
    color: var(--trail);
  }
}
@media (max-width: 1100px) {
  .navright small {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-trails .cards {
    grid-template-columns: repeat(5, 230px);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 14px;
  }
  .home-trails .card {
    scroll-snap-align: start;
  }
  .explore-layout {
    grid-template-columns: 420px minmax(0, 1fr);
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
  }
  .stat {
    font-size: 11px;
    padding: 0 8px;
  }
  .story {
    gap: 32px;
  }
  .category {
    height: 240px;
  }
  .about-photo {
    margin-left: 32px;
  }
}
@media (max-width: 800px) {
  .nav {
    height: 72px;
  }
  .navlinks {
    gap: 24px;
  }
  .navlinks a.active:after {
    bottom: 12px;
  }
  .explore-heading .eyebrow {
    display: none;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
  }
  .sidepanel {
    padding: 12px;
  }
  .side-stats {
    gap: 6px;
  }
  .stats {
    flex-wrap: wrap;
    row-gap: 18px;
  }
  .stat {
    flex: 1 1 30%;
  }
  .profilebody {
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 220px;
  }
}
@media (max-width: 700px) {
  html {
    scroll-padding-top: 76px;
  }
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  #header {
    position: sticky;
    top: 0;
  }
  .nav {
    height: 68px;
  }
  .brand {
    font-size: 23px;
    gap: 8px;
  }
  .brand i {
    font-size: 21px;
    padding: 7px;
  }
  .navlinks {
    display: none;
  }
  .navright {
    display: flex;
  }
  .navright .button {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
    background: transparent;
    color: var(--forest);
    border: 1px solid var(--line);
  }
  #mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fffefb;
    border-top: 1px solid var(--line);
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px #173e3008;
  }
  #mobile-nav a {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--muted);
    position: relative;
    border-radius: 12px;
    font-weight: 600;
  }
  #mobile-nav i {
    font-size: 23px;
  }
  #mobile-nav [aria-current] {
    color: var(--forest);
    background: var(--sage);
  }
  #mobile-nav small {
    position: absolute;
    top: 3px;
    left: calc(50% + 7px);
    min-width: 17px;
    padding: 0 3px;
    border-radius: 12px;
    background: var(--trail);
    color: #fff;
    font-size: 10px;
    border: 2px solid #fffefb;
  }
  #mobile-nav small[hidden] {
    display: none;
  }
  .hero {
    min-height: 635px;
    background-position: 68% center;
    align-items: flex-start;
  }
  .hero:before {
    background:
      linear-gradient(90deg, #102b21a8, #102b2130),
      linear-gradient(0deg, #102b21b0, transparent 50%);
  }
  .heroinner {
    padding-top: 40px;
    padding-bottom: 32px;
  }
  .hero h1 {
    font-size: 45px;
    max-width: 350px;
    line-height: 1.06;
  }
  .hero .eyebrow {
    font-size: 10px;
    margin: 0 0 18px;
  }
  .hero p {
    font-size: 16px;
    max-width: 300px;
    margin: 22px 0;
  }
  .hero .search {
    gap: 10px;
    margin-top: 26px;
  }
  .hero .searchfield {
    flex-basis: 100%;
    min-height: 54px;
  }
  .hero .button {
    min-height: 48px;
  }
  .benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 30px;
  }
  .benefits span {
    font-size: 10px;
    line-height: 1.4;
  }
  .section,
  .home-trails {
    padding-top: 34px;
    padding-bottom: 34px;
  }
  .sectionhead {
    gap: 12px;
    margin-bottom: 22px;
  }
  .sectionhead h2 {
    font-size: 28px;
  }
  .sectionhead .textlink {
    font-size: 12px;
    flex-shrink: 0;
  }
  .sectionhead .section-intro {
    font-size: 14px;
  }
  .home-trails .sectionhead {
    flex-wrap: wrap;
  }
  .home-trails .sectionhead .textlink {
    margin-top: -6px;
  }
  .home-trails .cards {
    grid-template-columns: repeat(5, 252px);
    margin-right: -20px;
    padding-right: 20px;
    gap: 16px;
  }
  .cardphoto img,
  .home-trails .cardphoto img {
    height: 178px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .card h3 {
    font-size: 16px;
    margin: 14px 12px 5px;
  }
  .card .location,
  .card .meta,
  .card .difficulty {
    margin-left: 12px;
    margin-right: 12px;
    font-size: 12px;
  }
  .pagehead .cards {
    grid-template-columns: 1fr;
  }
  .pagehead .cardphoto img {
    height: 210px;
  }
  .categories {
    gap: 18px;
  }
  .category {
    height: 235px;
  }
  .category h3 {
    font-size: 25px;
  }
  .story {
    display: flex;
    flex-direction: column;
    padding-top: 40px;
    padding-bottom: 40px;
    gap: 28px;
  }
  .story h2 {
    font-size: 37px;
  }
  .storyphoto {
    width: 100%;
  }
  .storyphoto img {
    aspect-ratio: 1.15;
  }
  .storyphoto figcaption {
    font-size: 18px;
    padding: 20px;
  }
  .footerinner {
    gap: 8px;
    padding-top: 24px;
    padding-bottom: 24px;
    align-items: flex-start;
  }
  .footerinner div {
    gap: 12px;
    flex-wrap: wrap;
  }
  .footerinner div span {
    flex-basis: 100%;
    font-size: 11px;
  }
  .toolbar {
    padding-top: 20px;
    padding-bottom: 14px;
  }
  .explore-heading {
    margin-bottom: 18px;
  }
  .explore-heading h1 {
    font-size: 28px;
  }
  .toolbar .search {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .toolbar .searchfield {
    grid-column: 1/-1;
  }
  .toolbar .button {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 5px;
    gap: 4px;
  }
  .toolbar .button i {
    font-size: 16px;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -20px;
    padding-right: 20px;
    padding-bottom: 4px;
    gap: 8px;
    scrollbar-width: none;
  }
  .chip {
    min-height: 40px;
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 12px;
  }
  .chips .clear {
    flex-shrink: 0;
  }
  .explore-layout {
    height: auto;
    min-height: 0;
  }
  .results {
    padding: 20px;
  }
  .resulthead {
    flex-wrap: wrap;
    gap: 0 10px;
    margin-bottom: 12px;
  }
  .resulthead select {
    font-size: 12px;
    max-width: 125px;
  }
  .listcard {
    padding: 10px;
    gap: 12px;
  }
  .listcard > a,
  .listcard > a > img {
    width: 95px;
  }
  .listcard > a > img {
    height: 134px;
  }
  .listbody h3 {
    font-size: 16px;
    margin-right: 25px;
  }
  .listbody .meta {
    font-size: 11px;
  }
  .listbody .tag {
    font-size: 10px;
  }
  .listbody p {
    font-size: 11px;
  }
  .explore-layout.showmap .mapwrap {
    height: calc(100dvh - 394px - env(safe-area-inset-bottom));
    min-height: 320px;
  }
  .explore-layout.showmap .results {
    display: none;
  }
  .mapnotice {
    bottom: 26px;
    left: 10px;
    font-size: 11px;
    max-width: 260px;
  }
  .mapaction {
    left: 12px;
    transform: none;
    font-size: 12px;
  }
  .mapaction:active,
  .button.mapaction:active {
    transform: scale(0.97);
  }
  .pagehead {
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .pagehead h1 {
    font-size: 36px;
  }
  .pagehead .sectionhead:first-child {
    flex-wrap: wrap;
  }
  .pagehead .button {
    font-size: 13px;
    padding: 10px 14px;
  }
  .tabs {
    gap: 24px;
    margin-bottom: 24px;
  }
  .tab {
    font-size: 13px;
  }
  .savedgrid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
  }
  .collection {
    height: 215px;
  }
  .collection h3 {
    font-size: 24px;
  }
  .collection span {
    font-size: 13px;
  }
  .collection .label {
    left: 20px;
    bottom: 20px;
  }
  .empty {
    padding: 34px 20px;
  }
  .empty h3 {
    font-size: 23px;
  }
  .empty p {
    font-size: 14px;
  }
  .detailhero {
    height: 280px;
  }
  .detailactions {
    top: 14px;
    right: 14px;
  }
  .detailactions .button,
  .back {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 10px;
  }
  .back {
    top: 14px;
    left: 14px;
  }
  .detail-layout {
    display: flex;
    gap: 28px;
    padding-top: 26px;
    padding-bottom: 36px;
  }
  .detail-layout > div {
    min-width: 0;
    width: 100%;
  }
  .detail-layout h1 {
    font-size: 36px;
  }
  .stats {
    margin-top: 22px;
    padding: 20px 0;
    row-gap: 20px;
  }
  .stat {
    font-size: 12px;
    flex: 1 1 30%;
  }
  .sidepanel {
    padding: 14px;
  }
  .prose {
    font-size: 15px;
  }
  .profilecover {
    height: 190px;
  }
  .profileinfo {
    gap: 14px;
  }
  .profileinfo > div:nth-child(2) {
    flex: 1;
    min-width: 190px;
  }
  .profileinfo h1 {
    font-size: 27px;
    overflow-wrap: anywhere;
  }
  .profileinfo p {
    font-size: 14px;
  }
  .profileinfo .button {
    margin-left: 0;
    min-height: 44px;
    font-size: 13px;
    padding: 10px 16px;
  }
  .profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
    padding: 24px 12px;
  }
  .profile-stats div:nth-child(2) {
    border-right: 0;
  }
  .profile-stats b {
    font-size: 23px;
  }
  .profile-stats small {
    font-size: 12px;
  }
  .profilebody {
    padding-bottom: 32px;
  }
  .quote {
    max-width: 350px;
    margin: 28px auto 0;
  }
  .setting {
    flex-wrap: wrap;
    gap: 12px;
  }
  .setting > div {
    flex: 1 1 180px;
  }
  .setting .button {
    font-size: 13px;
  }
  .review,
  .activity,
  .settings {
    padding: 16px;
  }
  .photo-grid {
    gap: 12px;
  }
  .about-page {
    padding-top: 28px;
    padding-bottom: 36px;
  }
  .about-photo {
    float: none;
    width: 100%;
    margin: 0 0 32px;
    border-radius: var(--radius);
  }
  .about-photo img {
    aspect-ratio: 1.1;
    object-position: center 65%;
  }
  .about-photo figcaption {
    font-size: 17px;
    padding: 20px;
  }
  .about-page h1 {
    font-size: 42px;
  }
  dialog {
    position: fixed;
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 32px);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  }
  .modalhead h2 {
    font-size: 26px;
  }
  .formactions .button {
    flex: 1;
  }
  #toast {
    bottom: calc(86px + env(safe-area-inset-bottom));
    font-size: 13px;
    padding: 13px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 150ms;
}
dialog::backdrop {
  backdrop-filter: none;
}

.listcard {
  animation: surface-in 160ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .listcard {
    animation: none;
  }
}
@media (min-width: 701px) {
  .explore-layout {
    height: var(--explore-height, calc(100dvh - 294px));
  }
}
@media (max-width: 700px) {
  .explore-layout.showmap .mapwrap {
    height: var(--mobile-map-height, calc(100dvh - 394px));
    min-height: 280px;
  }
}
