:root {
  color-scheme: dark;
  --bg: #0b0f12;
  --brand-green: #5a735d;
  --brand-orange: #d36a3f;
  --bg-soft: #11171b;
  --panel: #151b1f;
  --panel-strong: #1b2428;
  --text: #f3f0e8;
  --muted: #a9b0aa;
  --line: rgba(243, 240, 232, 0.14);
  --accent: #d36a3f;
  --accent-soft: #e9aa64;
  --green: #84b66a;
  --blue: #75a7bd;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

button,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 14px clamp(18px, 5vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 18, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(158px, 17vw, 226px);
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid rgba(243, 240, 232, 0.72);
  border-radius: 50%;
  background: #253a38;
  color: var(--text);
  font-weight: 800;
}

.brand-text {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.holding-main {
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: clamp(32px, 8vw, 96px);
}

.public-page {
  background: var(--brand-green);
}

.public-page .site-header {
  background: rgba(90, 115, 93, 0.92);
}

.public-page .holding-main {
  background: var(--brand-green);
}

.public-page .holding-label {
  color: #f2b15a;
}

.public-page .holding-hero p,
.public-page .site-nav {
  color: rgba(243, 240, 232, 0.78);
}

.public-page .holding-panel {
  background: rgba(16, 25, 20, 0.22);
}

.holding-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  width: min(1050px, 100%);
}

.holding-label,
.section-label,
.map-kicker {
  margin: 0 0 10px;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.holding-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.55rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.holding-hero p {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.holding-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.holding-panel a,
.message-form button,
.secondary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: #111;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.family-page {
  background: #f2f0e8;
  color: #161d18;
}

.family-locked {
  height: 100svh;
  overflow: hidden;
  background: #f2f0e8;
}

.family-locked .family-app {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.family-locked .mock-nav,
.family-locked .family-menu-toggle,
.family-locked .family-actions {
  display: none !important;
}

.family-app[hidden] {
  display: none !important;
}

.family-page:not(.family-locked) .family-access-gate {
  display: none !important;
}

.family-access-gate {
  min-height: calc(100svh - 86px);
  display: grid;
  place-items: center;
  padding: clamp(22px, 6vw, 70px);
  background:
    radial-gradient(circle at 24% 16%, rgba(211, 106, 63, 0.18), transparent 30%),
    radial-gradient(circle at 76% 72%, rgba(90, 115, 93, 0.24), transparent 34%),
    linear-gradient(180deg, #f7f4ea 0%, #edeadf 100%);
}

.access-card {
  width: min(560px, 100%);
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(90, 115, 93, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 52px rgba(57, 70, 57, 0.18);
}

.access-card h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.access-card p:not(.section-label) {
  max-width: 430px;
  color: #5a655c;
  line-height: 1.55;
}

.access-home-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--brand-green);
  color: #fff;
  font-weight: 900;
}

.access-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.access-form label {
  color: #59645c;
  font-size: 0.82rem;
  font-weight: 800;
}

.access-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.access-form input {
  min-height: 48px;
  border: 1px solid rgba(21, 27, 31, 0.18);
  border-radius: 8px;
  padding: 0 13px;
  color: #172018;
  font: inherit;
}

.access-form button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--brand-green);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

#access-error {
  min-height: 1.3em;
  color: #b8422d;
  font-size: 0.88rem;
  font-weight: 800;
}

.family-mock-header {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  min-height: 86px;
  padding: 8px 16px;
  background: linear-gradient(90deg, #263a2d, #111916);
  color: #fffdf6;
}

.family-mock-header .brand {
  min-width: 170px;
}

.family-brand-logo {
  width: clamp(150px, 15vw, 210px);
  max-height: 62px;
}

.family-menu-toggle {
  display: none;
  width: 48px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf6;
  cursor: pointer;
}

.family-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.family-menu-toggle b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.mock-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  gap: clamp(28px, 5vw, 68px);
  color: #fffdf6;
}

.mock-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  font-size: 1.02rem;
  font-weight: 800;
}

.mock-nav a span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-size: 1.35rem;
}

.mock-nav a.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px 999px 0 0;
  background: #9fca8a;
}

.mock-nav a.is-active {
  color: #fff;
}

.family-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #f0e7d7;
  font-size: 1rem;
}

.family-actions span {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.28);
}

.family-actions a {
  color: #fffdf6;
  font-weight: 800;
}

.map-stage {
  position: relative;
  min-height: 455px;
  background: #d8dfd2;
}

.family-map {
  position: absolute;
  inset: 0;
  min-height: 455px;
  background: #dce5d8;
}

.map-card {
  position: absolute;
  z-index: 520;
  border: 1px solid rgba(37, 48, 39, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #172018;
  box-shadow: 0 14px 32px rgba(42, 48, 41, 0.14);
  backdrop-filter: blur(10px);
}

.last-shared-card {
  left: 20px;
  bottom: 16px;
  width: min(310px, calc(100% - 40px));
  padding: 18px 20px;
}

.map-card-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(37, 48, 39, 0.16);
}

.pin-dot {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50% 50% 50% 0;
  background: var(--brand-green);
  transform: rotate(-45deg);
}

.pin-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.map-card small {
  display: block;
  color: #2b332e;
  font-size: 0.9rem;
}

.map-card-title strong {
  display: block;
  margin-top: 6px;
  color: var(--brand-green);
  font-size: 1.13rem;
}

.last-shared-card ul {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.94rem;
}

.last-shared-card li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.owner-location-button {
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-green);
  color: #fffdf6;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.owner-location-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.drag-help {
  right: 25px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 200px;
  padding: 12px 18px;
}

.drag-help p {
  margin: 0;
  line-height: 1.35;
}

.leaflet-control-attribution {
  font-size: 0.68rem;
}

.hyndbound-marker {
  width: 56px;
  height: 34px;
}

.marker-wrap {
  position: relative;
  width: 56px;
  height: 34px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.marker-car {
  position: absolute;
  right: 0;
  bottom: 6px;
  width: 27px;
  height: 14px;
  border-radius: 6px 8px 4px 4px;
  background: var(--brand-orange);
}

.marker-car::before {
  content: "";
  position: absolute;
  right: 5px;
  top: -6px;
  width: 13px;
  height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: #f6c46d;
}

.marker-van {
  position: absolute;
  left: 2px;
  bottom: 3px;
  width: 30px;
  height: 21px;
  border: 2px solid #f3f0e8;
  border-radius: 5px;
  background: #244541;
}

.marker-car::after,
.marker-van::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #101316;
  box-shadow: inset 0 0 0 2px #d7d0bf;
}

.marker-car::after {
  right: 4px;
}

.marker-van::after {
  left: 5px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 24px;
  border-block: 1px solid rgba(22, 29, 24, 0.14);
  background: #f4f1e8;
}

.status-strip button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(22, 29, 24, 0.14);
  border-radius: 7px;
  background: #fff;
  color: #172018;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.status-strip button:hover {
  border-color: rgba(90, 115, 93, 0.45);
  box-shadow: 0 7px 18px rgba(41, 58, 43, 0.1);
  transform: translateY(-1px);
}

.status-strip button:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

.status-strip p {
  flex: 1;
  margin: 0;
  font-size: 0.92rem;
}

.status-strip b {
  color: #2d342f;
  font-size: 1.25rem;
}

.status-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.status-icon.green {
  background: var(--brand-green);
}

.status-icon.orange {
  background: var(--brand-orange);
}

.status-icon.blue {
  background: #5a735d;
}

.status-icon.signal {
  background: transparent;
  color: #43804d;
  font-size: 1.55rem;
}

.family-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(520px, 0.9fr);
  gap: 16px;
  padding: 18px 24px 20px;
  background: #f4f1e8;
}

.panel {
  border: 1px solid rgba(21, 27, 31, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #172018;
  box-shadow: 0 14px 34px rgba(31, 39, 31, 0.1);
}

.message-panel {
  padding: 16px 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.guest-badge {
  flex: 0 0 auto;
  max-width: 330px;
  border: 0;
  color: var(--brand-green);
  font-size: 0.76rem;
  font-weight: 700;
}

.message-list {
  display: grid;
  gap: 0;
  max-height: 258px;
  margin: 12px -18px 14px;
  overflow: auto;
  border-top: 1px solid rgba(22, 29, 24, 0.12);
  border-bottom: 1px solid rgba(22, 29, 24, 0.12);
}

.message {
  display: grid;
  grid-template-columns: 42px 100px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-bottom: 1px solid rgba(22, 29, 24, 0.11);
  border-radius: 0;
  background: transparent;
}

.message strong {
  display: block;
  margin-bottom: 0;
  color: #172018;
  font-size: 0.92rem;
}

.message p {
  margin: 0;
  color: #172018;
  line-height: 1.45;
}

.message time {
  display: block;
  margin-top: 0;
  color: #6f786f;
  font-size: 0.82rem;
  text-align: right;
}

.message-form {
  display: grid;
  grid-template-columns: minmax(178px, 0.32fr) minmax(260px, 1fr) 158px;
  gap: 14px;
  align-items: center;
}

.posting-as {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5d665e;
  white-space: nowrap;
  min-width: 178px;
}

.avatar-pill,
.message-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #df5f7b;
  color: #fff;
  font-weight: 900;
}

.message-form textarea {
  width: 100%;
  min-height: 48px;
  resize: vertical;
  border: 1px solid rgba(21, 27, 31, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #172018;
  line-height: 1.45;
}

.message-form button {
  justify-self: stretch;
  padding-inline: 20px;
  background: var(--brand-green);
  color: #fff;
}

.panel-note {
  margin: 14px 0 0;
  color: #5f6a61;
  font-size: 0.88rem;
  line-height: 1.5;
}

.latest-panel {
  align-self: stretch;
  padding: 16px 18px;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: #5f6a61;
  font-size: 0.9rem;
}

.view-all {
  color: var(--brand-green);
  font-size: 0.86rem;
  font-weight: 800;
}

.social-feed {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.social-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.social-card {
  display: grid;
  gap: 7px;
  min-height: 224px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid rgba(22, 29, 24, 0.12);
  border-radius: 0;
  background: transparent;
}

.social-card:first-child {
  padding-left: 0;
}

.social-card:last-child {
  padding-right: 0;
  border-right: 0;
}

.social-card span {
  color: #5a735d;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.social-card strong {
  font-size: 1.05rem;
}

.media-placeholder,
.insta-grid-placeholder {
  position: relative;
  min-height: 150px;
  border-radius: 7px;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.1), transparent 35%),
    linear-gradient(180deg, #8fa690, #e2a464 52%, #324b38);
}

.media-placeholder::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 33px solid rgba(255, 255, 255, 0.94);
  transform: translate(-40%, -50%);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.reel-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, #93b2c4, #f2c17a 58%, #89a7a0);
}

.insta-grid-placeholder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: transparent;
}

.insta-grid-placeholder em {
  min-height: 72px;
  border-radius: 5px;
  background: linear-gradient(135deg, #efd09a, #5f8d8e);
}

.insta-grid-placeholder em:nth-child(2) {
  background: linear-gradient(135deg, #95b9c6, #d9b16d);
}

.insta-grid-placeholder em:nth-child(3) {
  background: linear-gradient(135deg, #314941, #d89550);
}

.insta-grid-placeholder em:nth-child(4) {
  background: linear-gradient(135deg, #f1d5a3, #2c4a42);
}

.social-card i {
  width: 86%;
  height: 7px;
  border-radius: 999px;
  background: #d2d0ca;
}

.social-card i.short {
  width: 58%;
}

.secondary-action {
  width: 100%;
  background: var(--accent);
  color: var(--text);
}

.privacy-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  padding: 20px 42px;
  background: linear-gradient(90deg, #5a735d, #263a2d);
  color: #fffdf6;
}

.privacy-strip article {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.privacy-strip article:last-child {
  border-right: 0;
}

.privacy-strip span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 4px solid rgba(151, 198, 128, 0.75);
  border-radius: 50%;
  color: #fff;
  font-size: 1.3rem;
}

.privacy-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.privacy-strip p {
  margin: 0;
  color: #e8eee2;
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .site-header {
    min-height: 74px;
    padding: 8px 12px;
  }

  .family-mock-header .brand {
    min-width: auto;
  }

  .brand-logo {
    width: clamp(128px, 35vw, 170px);
    max-height: 46px;
  }

  .family-brand-logo {
    width: clamp(118px, 30vw, 154px);
    max-height: 44px;
  }

  .family-menu-toggle {
    display: block;
  }

  .mock-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 12px;
    left: 12px;
    display: none;
    transform: none;
    gap: 0;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: #263a2d;
    box-shadow: 0 18px 36px rgba(17, 25, 22, 0.24);
    overflow: hidden;
  }

  .mock-nav a {
    justify-content: space-between;
    gap: 10px;
    height: auto;
    min-height: 48px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.95rem;
  }

  .mock-nav a:last-child {
    border-bottom: 0;
  }

  .family-mock-header.nav-open .mock-nav {
    display: grid;
  }

  .mock-nav a span {
    width: 16px;
    height: 16px;
    font-size: 1rem;
  }

  .mock-nav a.is-active::after {
    display: none;
  }

  .family-actions {
    display: none;
  }

  .holding-hero,
  .family-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 430px;
    padding-top: 0;
  }

  .family-map {
    inset: 0;
    min-height: 430px;
  }

  .last-shared-card {
    right: 14px;
    left: 14px;
    bottom: 12px;
    width: auto;
    padding: 13px 14px;
  }

  .drag-help {
    display: none;
  }

  .family-grid {
    padding: 14px;
  }

  .message-form {
    grid-template-columns: 1fr;
  }

  .social-preview-grid,
  .privacy-strip {
    grid-template-columns: 1fr;
  }

  .social-card {
    min-height: auto;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(22, 29, 24, 0.12);
  }

  .privacy-strip {
    padding: 18px;
  }

  .privacy-strip article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    padding-bottom: 16px;
  }

  .privacy-strip article:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 520px) {
  .family-mock-header {
    min-height: 74px;
  }

  .family-access-gate {
    min-height: calc(100svh - 74px);
    align-items: start;
    padding-top: clamp(72px, 18vh, 140px);
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .status-strip button {
    min-height: 62px;
  }

  .panel-heading {
    display: grid;
  }

  .message {
    grid-template-columns: 34px minmax(70px, auto) 1fr;
    align-items: start;
  }

  .message p {
    grid-column: 2 / -1;
  }

  .message time {
    grid-column: 2 / -1;
    text-align: left;
  }

  .message-form button {
    width: 100%;
  }
}
