/* Mobile has its own evidence → consultation composition. Desktop stays intact. */
.mobile-evidence {
  display: none;
}
/* The larger interactive photo must not push all consultation actions below fold. */
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
  body.developed[data-homepage][data-home-focused]
    .site-header
    .header-estimates {
    display: flex !important;
  }
}
.evidence-dialog {
  border: 0;
  border-radius: 16px;
  padding: 20px;
  width: min(100% - 24px, 720px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: #332c27;
}
.evidence-dialog::backdrop {
  background: rgb(35 20 28 / 65%);
}
.evidence-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff !important;
}
.evidence-dialog h2 {
  font-size: 20px;
  margin: 0;
}
.evidence-dialog button {
  min-width: 44px;
  min-height: 44px;
  font: inherit;
  border: 1px solid #e7d8ce;
  border-radius: 8px;
  background: #fff;
  color: #cc4a0c;
}
.evidence-dialog .evidence-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.evidence-dialog figure {
  margin: 0;
  min-width: 0;
}
.evidence-dialog img {
  width: 100%;
  height: auto;
  display: block;
}
.evidence-dialog figcaption {
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 650;
}
.evidence-dialog p {
  font-size: 14px;
  line-height: 1.65;
  margin: 12px 0;
}
body.sage-design.developed dialog.evidence-dialog a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: #f0642b !important;
  color: #fff !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 650;
}
.evidence-dialog :is(button, a):focus-visible {
  outline: 3px solid #f0642b;
  outline-offset: 3px;
}
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
  body.developed[data-homepage] .mobile-home-welcome {
    gap: 12px;
  }
  body.developed[data-homepage] .mobile-home-welcome h1 {
    margin: 0;
    padding: 0;
    font-size: 24px;
    line-height: 1.3;
  }
  body.developed[data-homepage] .mobile-home-scene {
    display: none;
  }
  body.developed[data-homepage] .mobile-evidence {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }
  body.developed[data-homepage] .evidence-switch {
    display: inline-flex;
    gap: 4px;
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    background: #fff1e8 !important;
  }
  body.developed[data-homepage] .evidence-switch button {
    min-width: 56px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #66594f;
    cursor: pointer;
  }
  body.developed[data-homepage] .evidence-switch button[aria-pressed="true"] {
    background: #fff;
    color: #cc4a0c;
    font-weight: 700;
    box-shadow: 0 1px 4px rgb(73 48 60 / 9%);
  }
  body.developed[data-homepage] .evidence-record[hidden] {
    display: none !important;
  }
  body.developed[data-homepage] .mobile-evidence .evidence-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 195px));
    justify-content: center;
    gap: 8px;
  }
  body.developed[data-homepage] .mobile-evidence .evidence-pair figure {
    position: relative;
    min-width: 0;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f4f5;
  }
  body.developed[data-homepage] .mobile-evidence .evidence-pair figcaption {
    position: absolute;
    inset: 8px auto auto 8px;
    z-index: 1;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    background: #fff !important;
    color: #332c27 !important;
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-pair
    figure:last-of-type
    figcaption {
    background: #f0642b !important;
    color: #fff !important;
  }
  body.developed[data-homepage] .mobile-evidence .evidence-pair img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: contain;
    max-height: 260px;
  }
  body.developed[data-homepage] .evidence-photo-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 16px;
    font-size: 13px;
  }
  body.developed[data-homepage]
    .mobile-evidence
    [data-evidence-record="kitchen"]
    img {
    aspect-ratio: 4/3;
    object-fit: contain;
    background: #f8f4f5;
  }
  body.developed[data-homepage] .evidence-caption {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 650;
  }
  body.developed[data-homepage] .evidence-tools {
    grid-column: 1 / -1;
    grid-row: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  body.developed[data-homepage] .evidence-tools small {
    font-size: 11px;
    color: #66594f !important;
  }
  body.developed[data-homepage] .evidence-tools button {
    min-height: 44px;
    padding: 4px 0 4px 12px;
    border: 0;
    font: inherit;
    font-size: 12px;
    color: #cc4a0c;
    background: transparent;
    cursor: pointer;
  }
  body.developed[data-homepage] .evidence-tools button[hidden] {
    display: none;
  }
  body.developed[data-homepage] .mobile-photo-entry {
    border-radius: 12px !important;
    min-height: 72px !important;
  }
  body.developed[data-homepage] .mobile-estimate-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
  }
  body.developed[data-homepage] .mobile-estimate-actions .latest-mobile-methods,
  body.developed[data-homepage]
    .mobile-estimate-actions
    .mobile-photo-entry
    svg,
  body.developed[data-homepage]
    .mobile-estimate-actions
    .mobile-photo-entry
    small,
  body.developed[data-homepage]
    .mobile-estimate-actions
    .mobile-photo-entry
    > span
    > span,
  body.developed[data-homepage]
    .mobile-estimate-actions
    .mobile-visit-entry
    > span {
    display: none !important;
  }
  body.developed[data-homepage] .mobile-estimate-actions .mobile-photo-entry {
    min-height: 56px !important;
    padding: 12px 16px !important;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  body.developed[data-homepage] .mobile-estimate-actions .mobile-photo-entry b {
    font-size: 15px;
  }
  body.developed[data-homepage]
    .mobile-home
    .mobile-estimate-actions
    .mobile-visit-entry {
    display: flex !important;
    min-height: 56px !important;
    margin: 0;
    padding: 12px !important;
    border: 1px solid #f0642b;
    border-radius: 12px;
    font-size: 14px;
  }
  body.developed[data-homepage] .mobile-home .mobile-visit-entry {
    display: flex !important;
    border: 0;
    padding-inline: 0;
    min-height: 44px;
    font-size: 13px;
  }
  body.developed[data-homepage] .mobile-home-discovery {
    margin-top: 16px !important;
  }
  body.developed[data-homepage] .mobile-home-discovery .comfort-title-row h2 {
    font-size: 20px;
    text-align: left;
  }
  body.developed[data-homepage] .mobile-home-discovery .service-carousel-track {
    gap: 8px;
  }
  body.developed[data-homepage]
    .mobile-home-discovery
    .service-space-card
    figure {
    display: none;
  }
  body.developed[data-homepage]
    .mobile-home-discovery
    .service-space-card
    > div {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid #e7d8ce;
    border-radius: 10px;
  }
  body.developed[data-homepage] .mobile-home-context {
    gap: 24px;
  }
  body.developed[data-homepage] .mobile-evidence :is(button, a):focus-visible {
    outline: 3px solid #f0642b;
    outline-offset: 3px;
  }
  body.developed[data-homepage] .mobile-evidence button {
    touch-action: manipulation;
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-record:has([data-evidence-interactive]) {
    display: contents;
  }
  body.developed[data-homepage] .mobile-evidence .evidence-face-controls {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: center;
    gap: 4px;
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    background: transparent !important;
  }
  body.developed[data-homepage] .evidence-face-controls legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body.developed[data-homepage] .evidence-face-controls button {
    min-height: 44px;
    min-width: 60px;
    padding: 8px;
    border: 1px solid #e7d8ce;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    color: #66594f;
    background: #fff !important;
    cursor: pointer;
  }
  body.developed[data-homepage]
    .evidence-face-controls
    button[aria-pressed="true"] {
    color: #cc4a0c;
    background: #fff1e8 !important;
    border-color: #f0642b;
    font-weight: 700;
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-pair[data-evidence-interactive] {
    --evidence-flip-duration: 220ms;
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: min(100%, 420px);
    aspect-ratio: 1 / 0.9;
    margin-inline: auto;
    perspective: none;
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-pair[data-evidence-interactive]
    figure {
    grid-area: 1/1;
    width: 60%;
    align-self: start;
    justify-self: start;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgb(49 30 40 / 10%);
    transform-origin: center;
    transition: transform var(--evidence-flip-duration)
      cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-pair[data-evidence-interactive]
    img {
    max-height: none;
  }
  body.developed[data-homepage]
    .mobile-evidence
    [data-evidence-record="kitchen"]
    .evidence-pair[data-evidence-interactive] {
    aspect-ratio: 4 / 3;
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-pair[data-evidence-interactive]
    figure:last-of-type {
    align-self: end;
    justify-self: end;
    z-index: 1;
  }
  body.developed[data-homepage]
    .mobile-evidence
    [data-evidence-face="before"]
    figure:first-of-type {
    transform: translate(35%, 15%);
    z-index: 2;
  }
  body.developed[data-homepage]
    .mobile-evidence
    [data-evidence-face="before"]
    figure:last-of-type {
    transform: translate(-35%, -15%);
  }
  body.developed[data-homepage] .mobile-evidence .evidence-flip-target {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent !important;
    cursor: pointer;
    touch-action: pan-y pinch-zoom;
  }
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-flip-target:focus-visible {
    outline-offset: -3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.developed[data-homepage]
    .mobile-evidence
    .evidence-pair[data-evidence-interactive] {
    --evidence-flip-duration: 0ms;
  }
}
