:root {
  --guest-green: #7C9A5C;
  --guest-green-dark: #657F48;
  --guest-text: #151715;
  --guest-muted: #686d68;
  --guest-panel: #fff;
  --guest-dark: #151a12;
  --guest-safe-top: env(safe-area-inset-top, 0px);
  --guest-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--guest-dark); }
body.elp-guest-body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #20231f;
  color: var(--guest-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.elp-guest-backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,9,.24) 0%, rgba(10,14,9,.18) 26%, rgba(13,17,12,.72) 54%, rgba(18,21,18,.98) 76%, #20231f 100%),
    url("../img/auth/bella-bellucci.png") center 18% / cover no-repeat;
  pointer-events: none;
}

.elp-guest-header,
.elp-guest-main,
.elp-guest-footer { position: relative; z-index: 1; }

.elp-guest-header {
  min-height: calc(84px + var(--guest-safe-top));
  padding: calc(15px + var(--guest-safe-top)) 18px 10px;
  display: grid;
  grid-template-columns: minmax(52px, 1fr) auto minmax(52px, 1fr);
  align-items: center;
  gap: 10px;
}
.elp-guest-header-side { display: flex; justify-content: flex-start; }
.elp-guest-header-side.is-right { justify-content: flex-end; }
.elp-guest-header-spacer { width: 42px; height: 42px; }
.elp-guest-logo { display: inline-flex; align-items: center; justify-content: center; }
.elp-guest-logo img { width: min(42vw, 188px); height: auto; display: block; filter: drop-shadow(0 2px 10px rgba(0,0,0,.25)); }
.elp-guest-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.elp-guest-main { width: min(100%, 1180px); margin: 0 auto; padding: 0 18px 36px; }
.elp-guest-intro { padding: clamp(95px, 24vh, 210px) 4px 22px; color: #fff; }
.elp-guest-kicker { display: inline-block; margin-bottom: 8px; color: #d9e6c8; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.elp-guest-intro h1,
.elp-guest-detail-card h1 { margin: 0; font-size: clamp(28px, 7vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
.elp-guest-intro h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.32); }
.elp-guest-detail-card h1 { color: var(--guest-text); }
.elp-guest-intro p { max-width: 640px; margin: 12px 0 0; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.65; }

.elp-guest-projects { scroll-margin-top: 20px; }
.elp-guest-search-wrap {
  position: relative;
  margin: 0 0 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
}
.elp-guest-search-wrap i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #7d837c; }
.elp-guest-search-wrap input { width: 100%; height: 52px; padding: 0 18px 0 46px; border: 0; outline: 0; border-radius: inherit; background: transparent; color: var(--guest-text); font: inherit; }

.elp-guest-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 70px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
}
.elp-guest-status[hidden] { display: none; }
.elp-guest-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: guest-spin .8s linear infinite; }
@keyframes guest-spin { to { transform: rotate(360deg); } }

/* Guest project cards use the same structure and card CSS as the authenticated
   Projects portfolio (account/property/project_loading_styles.php).
   Only the image delivery differs: guest pages use a normal image element to
   preserve their existing safe guest image URLs and public API boundary. */
.elp-guest-project-list { width:100%; }
.elp-project-portfolio-card .elp-project-portfolio-image {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
  z-index:0;
}
  .elp-project-portfolio-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:0;
    width:100%;
    background:#172014;
  }
  .elp-project-portfolio-card {
    position:relative;
    display:flex;
    align-items:flex-end;
    min-width:0;
    min-height:35rem;
    padding:clamp(24px,3vw,42px);
    overflow:hidden;
    isolation:isolate;
    background-color:#314228;
    background-position:center;
    background-repeat:no-repeat;
    background-size:cover;
    color:#fff;
    text-decoration:none;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
  .elp-project-portfolio-card.is-featured {
    grid-column:1/-1;
    min-height:clamp(34rem,72vh,48rem);
    padding:clamp(30px,5vw,74px) clamp(24px,7vw,96px);
  }
  .elp-project-portfolio-card:not(.is-featured) {
    border-top:1px solid rgba(255,255,255,.08);
  }
  .elp-project-portfolio-card:not(.is-featured) + .elp-project-portfolio-card:not(.is-featured) {
    border-left:1px solid rgba(255,255,255,.08);
  }
  .elp-project-portfolio-shade {
    position:absolute;
    inset:0;
    z-index:2;
    pointer-events:none;
    background:linear-gradient(180deg,rgba(9,14,8,0) 0%,rgba(9,14,8,.03) 34%,rgba(9,14,8,.2) 58%,rgba(9,14,8,.88) 100%);
    transition:background .28s ease;
  }
  .elp-project-portfolio-card:hover .elp-project-portfolio-shade,
  .elp-project-portfolio-card:focus-visible .elp-project-portfolio-shade {
    background:linear-gradient(180deg,rgba(9,14,8,.01) 0%,rgba(9,14,8,.06) 32%,rgba(9,14,8,.25) 56%,rgba(9,14,8,.93) 100%);
  }
  .elp-project-portfolio-copy {
    position:relative;
    z-index:4;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    width:min(100%,520px);
  }
  .elp-project-portfolio-card.is-featured .elp-project-portfolio-copy { width:min(100%,700px); }
  .elp-project-portfolio-title {
    display:block;
    color:#fff;
    font-size:clamp(20px,2.2vw,29px);
    line-height:1.12;
    font-weight:700;
    letter-spacing:-.025em;
    text-wrap:balance;
  }
  .elp-project-portfolio-card.is-featured .elp-project-portfolio-title {
    font-size:clamp(31px,5vw,58px);
    max-width:820px;
  }
  .elp-project-portfolio-location {
    display:block;
    margin-top:6px;
    color:rgba(255,255,255,.84);
    font-size:13px;
    line-height:1.45;
    font-weight:500;
  }
  .elp-project-portfolio-card.is-featured .elp-project-portfolio-location {
    margin-top:9px;
    font-size:15px;
  }
  .elp-project-portfolio-view {
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
    min-width:142px;
    margin-top:22px;
    padding:11px 14px;
    border:1px solid rgba(255,255,255,.78);
    border-radius:6px;
    color:#fff;
    background:rgba(255,255,255,.025);
    font-size:12px;
    line-height:1;
    font-weight:700;
    transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
  }
  .elp-project-portfolio-card.is-featured .elp-project-portfolio-view {
    min-width:162px;
    margin-top:28px;
    padding:12px 16px;
  }
  .elp-project-portfolio-card:hover .elp-project-portfolio-view,
  .elp-project-portfolio-card:focus-visible .elp-project-portfolio-view {
    border-color:var(--elp-primary-soft,#f3f6ea);
    background:var(--elp-primary-soft,#f3f6ea);
    color:var(--elp-primary-dark,#657f48);
    transform:translateY(-1px);
  }
  .elp-project-portfolio-card:focus-visible {
    outline:3px solid var(--elp-accent,#b9c142);
    outline-offset:-3px;
  }
  .elp-project-portfolio-card {
    background-image:linear-gradient(145deg,#718c59 0%,#344428 52%,#172014 100%);
  }

  /* Guest listing: retain the first hero and complete three-card desktop rows.
     A six-track grid makes unfinished rows exact halves or a full-width hero,
     without stretching ordinary three-card rows or changing image selection. */
  @media (min-width: 1024px) {
    .elp-guest-project-list { grid-template-columns:repeat(6,minmax(0,1fr)); }
    .elp-guest-project-list > .elp-project-portfolio-card:not(.is-featured) { grid-column:span 2; }

    /* Two cards remaining after complete rows: 50% / 50%. */
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 2):nth-last-child(2),
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 3):last-child {
      grid-column:span 3;
    }

    /* One card remaining after complete rows: full-width featured treatment. */
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 2):last-child {
      grid-column:1 / -1;
      min-height:clamp(34rem,72vh,48rem);
      padding:clamp(30px,5vw,74px) clamp(24px,7vw,96px);
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 2):last-child .elp-project-portfolio-copy {
      width:min(100%,700px);
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 2):last-child .elp-project-portfolio-title {
      font-size:clamp(31px,5vw,58px);
      max-width:820px;
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 2):last-child .elp-project-portfolio-location {
      margin-top:9px;
      font-size:15px;
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(3n + 2):last-child .elp-project-portfolio-view {
      min-width:162px;
      margin-top:28px;
      padding:12px 16px;
    }
  }

  /* On tablets, the base grid has two tracks. Fill any odd final card. */
  @media (min-width: 768px) and (max-width: 1023px) {
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(even):last-child {
      grid-column:1 / -1;
      min-height:clamp(34rem,72vh,48rem);
      padding:clamp(30px,5vw,74px) clamp(24px,7vw,96px);
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(even):last-child .elp-project-portfolio-copy {
      width:min(100%,700px);
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(even):last-child .elp-project-portfolio-title {
      font-size:clamp(31px,5vw,58px);
      max-width:820px;
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(even):last-child .elp-project-portfolio-location {
      margin-top:9px;
      font-size:15px;
    }
    .elp-guest-project-list > .elp-project-portfolio-card:nth-child(even):last-child .elp-project-portfolio-view {
      min-width:162px;
      margin-top:28px;
      padding:12px 16px;
    }
  }

  @media (max-width: 1023px) {
    .elp-project-portfolio-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .elp-project-portfolio-card.is-featured { grid-column:1/-1; }
    .elp-project-portfolio-card:not(.is-featured) { min-height:31rem; }
  }
  @media (max-width: 767px) {
    .elp-project-portfolio-grid { grid-template-columns:1fr; }
    .elp-project-portfolio-card,
    .elp-project-portfolio-card:not(.is-featured) { min-height:30rem; padding:24px 20px; border-left:0; }
    .elp-project-portfolio-card.is-featured { min-height:34rem; padding:30px 20px; }
    .elp-project-portfolio-card.is-featured .elp-project-portfolio-title { font-size:clamp(29px,10vw,42px); }
    .elp-project-portfolio-title { font-size:24px; }
    .elp-project-portfolio-view,
    .elp-project-portfolio-card.is-featured .elp-project-portfolio-view { min-width:150px; margin-top:22px; }
  }

.elp-guest-pagination { margin: 22px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #fff; font-size: 11px; }
.elp-guest-pagination[hidden] { display: none; }
.elp-guest-pagination button,
.elp-guest-empty button { min-height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; background: rgba(255,255,255,.10); color: #fff; font-weight: 700; }
.elp-guest-pagination button:disabled { opacity: .38; }
.elp-guest-empty { grid-column: 1 / -1; padding: 36px 22px; border-radius: 18px; background: rgba(255,255,255,.96); text-align: center; }
.elp-guest-empty > i { font-size: 34px; color: var(--guest-green); }
.elp-guest-empty h2 { margin: 12px 0 6px; font-size: 20px; }
.elp-guest-empty p { margin: 0 0 16px; color: var(--guest-muted); }
.elp-guest-empty button { background: var(--guest-green); border-color: var(--guest-green); }

.elp-guest-account-cta {
  margin: 26px 0 0;
  padding: 24px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(12,16,11,.72);
  color: #fff;
  backdrop-filter: blur(10px);
}
.elp-guest-account-cta h2 { margin: 0; font-size: 22px; }
.elp-guest-account-cta p { margin: 8px 0 18px; color: rgba(255,255,255,.70); font-size: 12px; line-height: 1.55; }
.elp-guest-account-cta > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.elp-guest-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(8,12,7,.25);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.elp-guest-button:active { transform: translateY(1px); }
.elp-guest-button.is-primary { border-color: var(--guest-green); background: var(--guest-green); color: #fff; }
.elp-guest-button.is-primary:hover { border-color: var(--guest-green-dark); background: var(--guest-green-dark); }
.elp-guest-button.is-secondary { border-color: var(--guest-green); background: #fff; color: var(--guest-green-dark); }
.elp-guest-button.is-secondary:hover { border-color: var(--guest-green-dark); background: #f3f6ea; color: var(--guest-green-dark); }

/* Detail */
body[data-page="guest-project-detail"] .elp-guest-backdrop {
  background:
    linear-gradient(180deg, rgba(10,14,9,.28) 0%, rgba(10,14,9,.48) 38%, rgba(18,21,18,.96) 78%, #20231f 100%),
    url("../img/auth/bella-bellucci.png") center 18% / cover no-repeat;
}
body[data-page="guest-project-detail"] .elp-guest-main { padding-top: 18px; }
.elp-guest-gallery { position: relative; overflow: hidden; border-radius: 22px; background: #0c0f0b; box-shadow: 0 18px 42px rgba(0,0,0,.25); }
.elp-guest-gallery[hidden] { display: none; }
.elp-guest-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; }
.elp-guest-gallery-track::-webkit-scrollbar { display: none; }
.elp-guest-gallery-slide { flex: 0 0 100%; margin: 0; aspect-ratio: 1.12 / 1; scroll-snap-align: start; background: #151815; }
.elp-guest-gallery-slide img { width: 100%; height: 100%; display: block; object-fit: cover; }
.elp-guest-gallery-arrow { position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; transform: translateY(-50%); background: rgba(0,0,0,.42); color: #fff; }
.elp-guest-gallery-arrow.is-prev { left: 12px; }
.elp-guest-gallery-arrow.is-next { right: 12px; }
.elp-guest-gallery-dots { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 14px; background: #fff; }
.elp-guest-gallery-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #d2d4d1; }
.elp-guest-gallery-dots button.is-active { background: #151715; transform: scale(1.12); }
.elp-guest-detail-card { margin-top: 22px; padding: 26px 22px; border-radius: 20px; background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.15); }
.elp-guest-detail-card .elp-guest-kicker { color: var(--guest-green-dark); }
.elp-guest-summary { margin: 16px 0 0; color: #505650; font-size: 14px; line-height: 1.68; }
.elp-guest-facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
.elp-guest-facts > div { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border-radius: 12px; background: #f5f7f2; }
.elp-guest-facts i { color: var(--guest-green-dark); text-align: center; }
.elp-guest-facts span { color: #777d76; font-size: 11px; }
.elp-guest-facts strong { color: #1c211b; font-size: 12px; text-align: right; }
/* Guest Location: exact layout, map artwork and action hierarchy from the
   authenticated Project details location section, scoped to guest page only. */
.elp-guest-project-location[hidden], .elp-guest-facts[hidden] { display: none !important; }
.elp-guest-project-location {
  max-width: 860px; margin: 24px auto 0; padding: 26px 22px;
  background: #fff; border-radius: 20px; box-shadow: 0 14px 34px rgba(0,0,0,.15);
}
.elp-guest-project-location-heading .elp-guest-kicker { color: var(--guest-green-dark); margin: 0; }
.elp-guest-project-location-heading h2 { margin: 8px 0 0; color: #151715; font-size: clamp(26px,4vw,34px); font-weight: 720; line-height: 1.12; letter-spacing: -.035em; }
.elp-guest-project-location-heading p { max-width: 680px; margin: 10px 0 0; color: #5e655a; font-size: 13px; line-height: 1.65; }
.elp-guest-project-location-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.82fr); gap: 18px; margin-top: 26px; align-items: stretch; }
.elp-guest-project-location-visual { position: relative; display: block; overflow: hidden; min-height: 300px; border: 1px solid #e0e6dc; background: #dfe6d6; color: #fff; text-decoration: none; }
.elp-guest-project-location-grid { position: absolute; inset: 0; background-color: #e8ede4; background-image: linear-gradient(rgba(124,154,92,.18) 1px,transparent 1px), linear-gradient(90deg,rgba(124,154,92,.18) 1px,transparent 1px), linear-gradient(35deg,transparent 44%,rgba(101,127,72,.14) 45%,rgba(101,127,72,.14) 47%,transparent 48%); background-size: 54px 54px,54px 54px,180px 180px; }
.elp-guest-project-location-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(20,21,21,.02),rgba(20,21,21,.32)); pointer-events: none; }
.elp-guest-project-location-pin { position: absolute; z-index: 2; left: 50%; top: 46%; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--guest-green); color: #fff; font-size: 20px; box-shadow: 0 12px 28px rgba(36,55,24,.22); transform: translate(-50%,-50%); }
.elp-guest-project-location-caption { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 18px; display: flex; align-items: flex-start; gap: 8px; color: #fff; font-size: 12px; font-weight: 650; line-height: 1.45; }
.elp-guest-project-location-caption i { margin-top: 2px; color: #b9c142; }
.elp-guest-project-location-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(20px,3vw,32px); border: 1px solid #e0e6dc; background: #f7f9f5; min-width: 0; }
.elp-guest-project-mini-heading { color: var(--guest-green-dark); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.elp-guest-project-location-card > strong { display: block; margin-top: 10px; color: #151715; font-size: clamp(19px,2.5vw,23px); font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.elp-guest-project-location-card > small { display: block; margin-top: 10px; color: #686d68; font-size: 11px; line-height: 1.55; }
.elp-guest-project-location-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.elp-guest-location-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 11px 15px; border: 1px solid var(--guest-green-dark); border-radius: 6px; font-size: 12px; line-height: 1.3; font-weight: 750; text-decoration: none; transition: background .18s ease, color .18s ease; }
.elp-guest-location-button.is-primary { background: var(--guest-green); color: #fff; }
.elp-guest-location-button.is-secondary { background: #fff; color: var(--guest-green-dark); }
.elp-guest-location-button.is-primary:hover { background: var(--guest-green-dark); }
.elp-guest-location-button.is-secondary:hover { background: #edf3e9; }
.elp-guest-location-button:focus-visible, .elp-guest-project-location-visual:focus-visible { outline: 3px solid var(--guest-green-dark); outline-offset: 3px; }
@media (max-width: 767.98px) {
  .elp-guest-project-location { padding: 24px 18px; }
  .elp-guest-project-location-layout { grid-template-columns: 1fr; gap: 0; margin-top: 24px; }
  .elp-guest-project-location-visual { min-height: 235px; }
  .elp-guest-project-location-card { padding: 22px 18px; }
  .elp-guest-project-location-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .elp-guest-location-button { min-width: 0; padding: 10px 8px; font-size: 11px; }
}
@media (max-width: 370px) { .elp-guest-project-location-actions { grid-template-columns: 1fr; } }

.elp-guest-account-cta.is-detail { margin-bottom: 4px; }

.elp-guest-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(calc(100% - 36px), 1180px); margin: 0 auto; padding: 18px 0 calc(18px + var(--guest-safe-bottom)); color: rgba(255,255,255,.58); font-size: 10px; }
.elp-guest-footer nav { display: flex; gap: 14px; }
.elp-guest-footer a { color: rgba(255,255,255,.78); text-decoration: none; }

@media (min-width: 700px) {
  .elp-guest-main { padding-left: 26px; padding-right: 26px; }
  .elp-guest-gallery { max-width: 860px; margin-left: auto; margin-right: auto; }
  .elp-guest-gallery-slide { aspect-ratio: 16 / 9; }
  .elp-guest-detail-card,
  .elp-guest-account-cta.is-detail { max-width: 860px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 1050px) {
  .elp-guest-intro { padding-top: 180px; }
}

@media (max-width: 390px) {
  .elp-guest-header { padding-left: 14px; padding-right: 14px; }
  .elp-guest-main { padding-left: 14px; padding-right: 14px; }
  .elp-guest-footer { width: calc(100% - 28px); flex-wrap: wrap; justify-content: center; }
}

/* Guest detail: selectively opened ProjectBoard marketing resources. */
.elp-guest-resource-actions[hidden],
.elp-guest-resource-actions button[hidden],
.elp-guest-resource-modal[hidden] { display: none !important; }
.elp-guest-resource-actions {
  max-width: 860px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.elp-guest-resource-actions > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 126px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  transition: transform .15s ease, background .15s ease;
}
.elp-guest-resource-actions > button:hover { transform: translateY(-2px); background: rgba(255,255,255,.13); }
.elp-guest-resource-actions > button:focus-visible { outline: 3px solid #a4bc87; outline-offset: 3px; }
.elp-guest-resource-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #151a12; font-size: 22px; }
/* Guest project document sheet mirrors the reservation modal rather than
   introducing a separate visual system: identical header hierarchy, ELALAN
   green, light surfaces, 760px desktop dialog and full-screen mobile sheet. */
body.elp-guest-resource-open { overflow: hidden; }
.elp-guest-resource-modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.elp-guest-resource-scrim { position: absolute; inset: 0; background: rgba(10, 15, 9, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.elp-guest-resource-panel {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: min(100%, 760px); max-height: calc(100dvh - 48px); overflow: hidden;
  border: 1px solid rgba(42,49,35,.10); border-radius: 22px; background: #fff;
  color: #151715; box-shadow: 0 24px 70px rgba(28,37,19,.27);
}
.elp-guest-resource-header {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e4e9df; background: #fff;
}
.elp-guest-resource-eyebrow {
  display: block; margin-bottom: 2px; color: #7c9a5c; font-size: 10px;
  line-height: 1.2; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.elp-guest-resource-header h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.025em; color: #151715; }
.elp-guest-resource-close {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid #e3e9de; border-radius: 12px;
  background: #f7f9f5; color: #151715; font-size: 16px; cursor: pointer;
}
.elp-guest-resource-close:hover { background: #edf3e9; border-color: #becfb0; }
.elp-guest-resource-close:focus-visible,
.elp-guest-resource-row:focus-visible,
.elp-guest-resource-gallery-tile:focus-visible { outline: 3px solid #7c9a5c; outline-offset: -3px; }
.elp-guest-resource-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px; background: #f7f9f5; }
.elp-guest-resource-content { border: 1px solid #e0e6dc; background: #fff; min-width: 0; }
/* Same resource panel/rows used by the signed-in project detail page. */
.elp-guest-resource-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #e0e6dc; }
.elp-guest-resource-section-heading h3 { margin: 0; color: #151715; font-size: 16px; line-height: 1.3; font-weight: 700; }
.elp-guest-resource-section-heading > span { flex: 0 0 auto; color: #777f75; font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.elp-guest-resource-file-list { display: grid; }
.elp-guest-resource-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 15px 20px; border-bottom: 1px solid #e0e6dc; background: #fff; color: #151715; text-decoration: none; }
.elp-guest-resource-row:last-child { border-bottom: 0; }
.elp-guest-resource-row:hover { background: #f6f9f2; }
.elp-guest-resource-row > span { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.elp-guest-resource-row > span i { flex: 0 0 auto; color: #657f48; }
.elp-guest-resource-row em { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: #657f48; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }
/* Same featured image-led mosaic proportions as the signed-in Gallery section. */
.elp-guest-resource-gallery-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 154px; gap: 10px; padding: 12px; }
.elp-guest-resource-gallery-tile { position: relative; overflow: hidden; min-width: 0; background: #dde4d7; color: #fff; text-decoration: none; }
.elp-guest-resource-gallery-tile.is-featured { grid-column: span 2; grid-row: span 2; }
.elp-guest-resource-gallery-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.elp-guest-resource-gallery-tile:hover img { transform: scale(1.025); }
.elp-guest-resource-gallery-label { position: absolute; left: 10px; bottom: 9px; max-width: calc(100% - 20px); padding: 4px 7px; border-radius: 4px; background: rgba(20,21,21,.68); color: #fff; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.elp-guest-resource-empty { padding: 54px 20px; background: #fff; border: 1px solid #e0e6dc; color: #667063; font-size: 13px; text-align: center; }
@media (max-width: 767.98px) {
  .elp-guest-resource-modal { align-items: stretch; padding: 0; }
  .elp-guest-resource-panel { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .elp-guest-resource-header { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; }
  .elp-guest-resource-body { padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .elp-guest-resource-gallery-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .elp-guest-resource-gallery-tile.is-featured { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 390px) {
  .elp-guest-resource-section-heading, .elp-guest-resource-row { padding-left: 14px; padding-right: 14px; }
  .elp-guest-resource-row { gap: 8px; }
  .elp-guest-resource-row em { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .elp-guest-resource-actions > button, .elp-guest-resource-gallery-tile img { transition: none; }
}

/* LOCAL-ONLY inspector appears only when the guest API approves ?inspect=1. */
.elp-guest-inspection {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid rgba(174,199,155,.5);
  border-radius: 16px;
  background: #142014;
  color: #f2f7ed;
  overflow: hidden;
}
.elp-guest-inspection[hidden] { display: none !important; }
.elp-guest-inspection h2 { margin: 0 0 8px; font-size: 18px; }
.elp-guest-inspection h2 span { color: #d5edbb; font-size: 10px; letter-spacing: .1em; }
.elp-guest-inspection p { margin: 8px 0; color: #dbe3d5; font-size: 12px; line-height: 1.55; }
.elp-guest-inspection details { margin-top: 16px; }
.elp-guest-inspection summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.elp-guest-inspection pre {
  max-height: 65vh;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #09120a;
  color: #e5f5e1;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}


/* --------------------------------------------------------------------------
   Guest appearance: share the account portal's data-theme and localStorage
   contract. The guest page keeps its photography/portfolio composition, while
   all readable surfaces, controls and resource sheets follow light/dark mode.
   -------------------------------------------------------------------------- */
:root {
  --guest-page-bg: #f2f5f0;
  --guest-surface: #fff;
  --guest-surface-soft: #f7f9f5;
  --guest-border: #e0e6dc;
  --guest-label: #686d68;
}
html[data-theme="light"] { color-scheme: light; background: #f2f5f0; }
html[data-theme="dark"] {
  color-scheme: dark;
  background: #101310;
  --guest-green: #91ac6d;
  --guest-green-dark: #b7cd96;
  --guest-text: #f2f4ef;
  --guest-muted: #c1c7bd;
  --guest-panel: #1c211b;
  --guest-page-bg: #101310;
  --guest-surface: #1c211b;
  --guest-surface-soft: #20261f;
  --guest-border: #354033;
  --guest-label: #aab5a4;
}
body.elp-guest-body { background: var(--guest-page-bg); color: var(--guest-text); }

/* Preserve the original ELALAN hero in both themes, with appropriately
   coloured page fade below the photograph. */
html[data-theme="light"] .elp-guest-backdrop {
  background:
    linear-gradient(180deg, rgba(10,14,9,.24) 0%,rgba(10,14,9,.21) 24%,rgba(10,14,9,.44) 47%,rgba(242,245,240,.82) 71%,#f2f5f0 91%),
    url("../img/auth/bella-bellucci.png") center 18% / cover no-repeat;
}
html[data-theme="dark"] .elp-guest-backdrop {
  background:
    linear-gradient(180deg, rgba(10,14,9,.30) 0%,rgba(10,14,9,.32) 24%,rgba(10,14,9,.72) 51%,rgba(16,19,16,.96) 76%,#101310 94%),
    url("../img/auth/bella-bellucci.png") center 18% / cover no-repeat;
}
html[data-theme="light"] body[data-page="guest-project-detail"] .elp-guest-backdrop {
  background:
    linear-gradient(180deg,rgba(10,14,9,.30),rgba(10,14,9,.43) 36%,rgba(242,245,240,.85) 73%,#f2f5f0 94%),
    url("../img/auth/bella-bellucci.png") center 18% / cover no-repeat;
}
html[data-theme="dark"] body[data-page="guest-project-detail"] .elp-guest-backdrop {
  background:
    linear-gradient(180deg,rgba(10,14,9,.35),rgba(10,14,9,.59) 36%,rgba(16,19,16,.95) 73%,#101310 94%),
    url("../img/auth/bella-bellucci.png") center 18% / cover no-repeat;
}

/* The right header container must remain in the layout; it now holds only the
   appearance switch, not the previously removed WhatsApp link. */
.elp-guest-theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(15,21,14,.25);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease,border-color .18s ease;
}
.elp-guest-theme-toggle:hover { background: rgba(15,21,14,.48); border-color: rgba(255,255,255,.54); }
.elp-guest-theme-toggle:focus-visible { outline: 3px solid #c4cd59; outline-offset: 3px; }
html[data-theme="light"] .elp-guest-theme-sun,
html[data-theme="dark"] .elp-guest-theme-moon { display: none; }
html[data-theme="dark"] .elp-guest-theme-sun,
html[data-theme="light"] .elp-guest-theme-moon { display: inline-block; }

/* Light mode: charcoal/green on clean, pale surfaces below the photo. */
html[data-theme="light"] .elp-guest-search-wrap { background: rgba(255,255,255,.98); }
html[data-theme="light"] .elp-guest-account-cta {
  background: rgba(255,255,255,.96);
  color: #151715;
  border-color: #e0e6dc;
  box-shadow: 0 14px 34px rgba(16,26,13,.09);
}
html[data-theme="light"] .elp-guest-account-cta p { color: #586052; }
html[data-theme="light"] .elp-guest-button.is-primary,
html[data-theme="light"] .elp-guest-location-button.is-primary {
  background: #5b753f;
  border-color: #5b753f;
  color: #fff;
}
html[data-theme="light"] .elp-guest-button.is-primary:hover,
html[data-theme="light"] .elp-guest-location-button.is-primary:hover { background: #455e2e; border-color: #455e2e; }
html[data-theme="light"] .elp-guest-resource-actions > button {
  background: rgba(24,34,24,.91);
  border-color: rgba(38,52,35,.22);
}
html[data-theme="light"] .elp-guest-resource-actions > button:hover { background: rgba(40,55,38,.98); }
html[data-theme="light"] .elp-guest-pagination { color: #34412d; }
html[data-theme="light"] .elp-guest-pagination button {
  color: #34412d; background: #fff; border-color: #cdd7c5;
}
html[data-theme="light"] .elp-guest-footer,
html[data-theme="light"] .elp-guest-footer a { color: #525e4e; }

/* Dark mode: account-like deep olive surfaces and proper typography contrast.
   Every nested surface is covered, including detail, map and all modal states. */
html[data-theme="dark"] .elp-guest-search-wrap {
  background: rgba(28,33,27,.98);
  border: 1px solid var(--guest-border);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}
html[data-theme="dark"] .elp-guest-search-wrap input { color: var(--guest-text); }
html[data-theme="dark"] .elp-guest-search-wrap input::placeholder { color: #aab5a4; }
html[data-theme="dark"] .elp-guest-search-wrap i { color: #b7cd96; }
html[data-theme="dark"] .elp-guest-empty {
  background: var(--guest-surface);
  color: var(--guest-text);
  border: 1px solid var(--guest-border);
}
html[data-theme="dark"] .elp-guest-empty p { color: var(--guest-muted); }
html[data-theme="dark"] .elp-guest-pagination button { color: var(--guest-text); background: var(--guest-surface); border-color: var(--guest-border); }
html[data-theme="dark"] .elp-guest-account-cta {
  background: rgba(23,29,22,.94);
  border-color: var(--guest-border);
  color: var(--guest-text);
}
html[data-theme="dark"] .elp-guest-account-cta p { color: var(--guest-muted); }
html[data-theme="dark"] .elp-guest-button.is-primary,
html[data-theme="dark"] .elp-guest-location-button.is-primary {
  color: #101610;
  background: #91ac6d;
  border-color: #91ac6d;
}
html[data-theme="dark"] .elp-guest-button.is-primary:hover,
html[data-theme="dark"] .elp-guest-location-button.is-primary:hover { background: #b7cd96; border-color: #b7cd96; }
html[data-theme="dark"] .elp-guest-button.is-secondary,
html[data-theme="dark"] .elp-guest-location-button.is-secondary {
  color: #b7cd96;
  background: #20291e;
  border-color: #647b50;
}
html[data-theme="dark"] .elp-guest-button.is-secondary:hover,
html[data-theme="dark"] .elp-guest-location-button.is-secondary:hover { background: #2c3928; }
html[data-theme="dark"] .elp-guest-gallery-dots { background: var(--guest-surface); }
html[data-theme="dark"] .elp-guest-gallery-dots button { background: #566351; }
html[data-theme="dark"] .elp-guest-gallery-dots button.is-active { background: #b7cd96; }
html[data-theme="dark"] .elp-guest-detail-card,
html[data-theme="dark"] .elp-guest-project-location {
  background: var(--guest-surface);
  border: 1px solid var(--guest-border);
  color: var(--guest-text);
  box-shadow: 0 16px 40px rgba(0,0,0,.24);
}
html[data-theme="dark"] .elp-guest-detail-card .elp-guest-kicker,
html[data-theme="dark"] .elp-guest-project-location-heading .elp-guest-kicker,
html[data-theme="dark"] .elp-guest-project-mini-heading { color: var(--guest-green-dark); }
html[data-theme="dark"] .elp-guest-summary,
html[data-theme="dark"] .elp-guest-project-location-heading p,
html[data-theme="dark"] .elp-guest-project-location-card > small { color: var(--guest-muted); }
html[data-theme="dark"] .elp-guest-facts > div { background: var(--guest-surface-soft); }
html[data-theme="dark"] .elp-guest-facts span { color: var(--guest-label); }
html[data-theme="dark"] .elp-guest-facts strong { color: var(--guest-text); }
html[data-theme="dark"] .elp-guest-project-location-heading h2,
html[data-theme="dark"] .elp-guest-project-location-card > strong { color: var(--guest-text); }
html[data-theme="dark"] .elp-guest-project-location-card {
  background: var(--guest-surface-soft);
  border-color: var(--guest-border);
}
html[data-theme="dark"] .elp-guest-project-location-visual {
  background: #202d20;
  border-color: var(--guest-border);
}
html[data-theme="dark"] .elp-guest-project-location-grid {
  background-color: #273528;
  background-image:
    linear-gradient(rgba(183,205,150,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(183,205,150,.12) 1px,transparent 1px),
    linear-gradient(35deg,transparent 44%,rgba(145,172,109,.12) 45%,rgba(145,172,109,.12) 47%,transparent 48%);
}
html[data-theme="dark"] .elp-guest-resource-actions > button {
  background: rgba(28,34,28,.94);
  color: var(--guest-text);
  border-color: rgba(183,205,150,.20);
}
html[data-theme="dark"] .elp-guest-resource-actions > button:hover { background: #293628; }
html[data-theme="dark"] .elp-guest-resource-icon { background: #b7cd96; color: #111511; }
html[data-theme="dark"] .elp-guest-resource-panel,
html[data-theme="dark"] .elp-guest-resource-header {
  background: var(--guest-surface);
  color: var(--guest-text);
  border-color: var(--guest-border);
}
html[data-theme="dark"] .elp-guest-resource-header h2,
html[data-theme="dark"] .elp-guest-resource-section-heading h3 { color: var(--guest-text); }
html[data-theme="dark"] .elp-guest-resource-eyebrow { color: var(--guest-green-dark); }
html[data-theme="dark"] .elp-guest-resource-close {
  background: var(--guest-surface-soft);
  color: var(--guest-text);
  border-color: var(--guest-border);
}
html[data-theme="dark"] .elp-guest-resource-close:hover { background: #2c3928; }
html[data-theme="dark"] .elp-guest-resource-body { background: #151a15; }
html[data-theme="dark"] .elp-guest-resource-content,
html[data-theme="dark"] .elp-guest-resource-row,
html[data-theme="dark"] .elp-guest-resource-empty {
  background: var(--guest-surface);
  color: var(--guest-text);
  border-color: var(--guest-border);
}
html[data-theme="dark"] .elp-guest-resource-section-heading { border-color: var(--guest-border); }
html[data-theme="dark"] .elp-guest-resource-section-heading > span,
html[data-theme="dark"] .elp-guest-resource-empty { color: var(--guest-muted); }
html[data-theme="dark"] .elp-guest-resource-row:hover { background: #263025; }
html[data-theme="dark"] .elp-guest-resource-row > span i,
html[data-theme="dark"] .elp-guest-resource-row em { color: var(--guest-green-dark); }
html[data-theme="dark"] .elp-guest-resource-gallery-tile { background: #253025; }
html[data-theme="dark"] .elp-guest-footer,
html[data-theme="dark"] .elp-guest-footer a { color: #b4beb0; }

/* Maintain usable contrast and predictable focus in either appearance. */
.elp-guest-search-wrap:focus-within { outline: 2px solid var(--guest-green); outline-offset: 2px; }
.elp-guest-pagination button:focus-visible,
.elp-guest-button:focus-visible,
.elp-guest-resource-actions button:focus-visible { outline: 3px solid var(--guest-green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .elp-guest-theme-toggle { transition: none; } }
