/* Mobile shell: safe areas, bottom nav clearance, auth sheets, dialogs. */
:root {
  --mobile-nav-height: calc(68px + env(safe-area-inset-bottom, 0px));
  --mobile-header-height: calc(64px + env(safe-area-inset-top, 0px));
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  padding-bottom: var(--mobile-nav-height);
}

body.mobile-dialog-open {
  overflow: hidden;
}

.app-header,
.top,
.mobile-page-header {
  padding-top: env(safe-area-inset-top, 0px);
  min-height: var(--mobile-header-height);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.shell,
.explore-shell,
.discovery-panel,
.listing-detail {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.mobile-nav {
  position: fixed;
  z-index: 30;
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  left: max(10px, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(224, 232, 222, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 13px 35px rgba(7, 28, 18, 0.18);
  backdrop-filter: blur(14px);
}

.mobile-nav a {
  display: grid;
  gap: 2px;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  border-radius: 12px;
  color: #65776d;
  font: 700 10px/1.1 'DM Sans', system-ui, sans-serif;
  text-decoration: none;
}

.mobile-nav a.active {
  background: #eef5ee;
  color: #178357;
}

.mobile-nav .nav-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-nav .nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-page-header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--mobile-header-height);
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
  background: rgba(11, 33, 25, 0.98);
  color: #fff;
  border-bottom: 1px solid rgba(216, 247, 162, 0.12);
}

.mobile-back {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-page-header h1 {
  margin: 0;
  font: 600 18px/1.2 'Playfair Display', Georgia, serif;
}

.mobile-page-header .header-note {
  margin-left: auto;
  color: #c6d5ca;
  font-size: 12px;
}

/* Auth sheet */
body.auth-modal-open {
  overflow: hidden;
}

.modal {
  align-items: flex-end;
}

.modal .dialog {
  width: min(100%, 520px);
  max-height: min(92vh, 760px);
  margin: 0;
  border-radius: 22px 22px 0 0;
  overflow: auto;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 761px) {
  .modal {
    align-items: center;
  }
  .modal .dialog {
    border-radius: 22px;
    margin: auto;
  }
}

.modal .dialog .form input,
.modal .dialog .form select,
.modal .dialog .form textarea,
.modal .dialog .password-row input {
  font-size: 16px;
}

.modal .dialog .button,
.save-listing-button,
.mobile-dialog .button {
  min-height: 44px;
}

.save-listing-button {
  border: 1px solid #d5e7d9;
  border-radius: 999px;
  background: #edf5ef;
  color: #178357;
  font-weight: 800;
  padding: 8px 14px;
}

.save-listing-button[aria-pressed='true'] {
  background: #178357;
  border-color: #178357;
  color: #fff;
}

.save-listing-button.compact {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}

/* Compact signed-in explore header */
body.signed-in .explore-open {
  padding-top: 12px;
  padding-bottom: 8px;
}

body.signed-in .explore-open .explore-layout {
  grid-template-columns: 1fr;
  gap: 8px;
}

body.signed-in .explore-open .hero-object,
body.signed-in .home-optional {
  display: none;
}

body.signed-in .explore-open .explore-main {
  max-width: none;
}

body.signed-in .explore-open h1 {
  font-size: clamp(28px, 7vw, 36px);
  margin: 0;
}

body.signed-in .explore-open .lead,
body.signed-in .explore-open .home-eyebrow,
body.signed-in .explore-open .hero-actions {
  display: none;
}

.explore-greeting {
  display: none;
}

body.signed-in .explore-greeting {
  display: block;
  margin: 0 0 6px;
  color: #65776d;
  font-size: 14px;
}

.explore-search-row {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}

.explore-search-row input {
  min-height: 44px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d7e1d8;
  border-radius: 12px;
  background: #fcfdfb;
}

.listing-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

/* Dialogs */
.mobile-dialog-overlay,
.mobile-sheet-overlay-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(7, 20, 14, 0.48);
}

.mobile-sheet-overlay-wrap {
  place-items: end stretch;
  padding: 0;
}

.mobile-dialog,
.mobile-sheet {
  width: min(100%, 420px);
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(7, 28, 18, 0.22);
}

.mobile-sheet {
  width: 100%;
  max-height: min(88vh, 720px);
  border-radius: 18px 18px 0 0;
  overflow: auto;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.mobile-dialog h2,
.mobile-sheet-head h2 {
  margin: 0 0 8px;
  font: 600 22px/1.2 'Playfair Display', Georgia, serif;
}

.mobile-dialog p {
  margin: 0 0 12px;
  color: #65776d;
  line-height: 1.5;
}

.mobile-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.mobile-choice-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.mobile-choice {
  width: 100%;
  justify-content: flex-start;
}

.button.destructive {
  background: #9b2c2c;
}

.mobile-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mobile-sheet-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #eef5ee;
  color: #102c22;
  font-size: 24px;
  line-height: 1;
}

.avatar-option .avatar-label,
.avatar-choice .avatar-label {
  display: block;
  margin-top: 4px;
  font: 500 10px/1 'DM Mono', monospace;
  letter-spacing: 0.03em;
}

.avatar-option,
.avatar-choice {
  display: grid;
  place-items: center;
  min-width: 56px;
  min-height: 56px;
  padding: 8px;
}

.round-advanced {
  margin-top: 8px;
}

.round-advanced summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #178357;
  font-weight: 700;
}

.photo-approval-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8df;
}

.photo-approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.photo-approval-grid img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #eaf5e9;
}

.listing-gallery-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.listing-gallery-track figure {
  flex: 0 0 min(88vw, 420px);
  margin: 0;
  scroll-snap-align: start;
}

.listing-gallery-track img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  background: #eaf5e9;
}

.listing-card-wrap {
  display: grid;
  gap: 8px;
}

.admin-workspace-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-workspace-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #e2e8df;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background: #fcfdfb;
}

@media (prefers-reduced-motion: reduce) {
  .drive-transition,
  .experience-busy .golf-ball {
    animation: none !important;
  }
}

@media (max-width: 760px) {
  .site-footer,
  .verified-explainer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* Approved photographic placeholder; explicitly labeled as illustrative. */
.golf-art{background:linear-gradient(90deg,#06110950,transparent),url('/golf-placeholder.webp') center/cover!important;isolation:isolate}
.golf-art:before,.golf-art:after,.golf-art-flag{display:none!important}
.golf-art-label{z-index:2;background:#112018dd;color:#fff;padding:7px 12px;border-radius:8px}
