/* Sticky header (logo + nav + address bar) ≈ 200–220px desktop; keep gap under shadow. */
body.is-v3 {
  --v3-sticky-offset: 230px;
}

@media (max-width: 578px) {
  body.is-v3 {
    --v3-sticky-offset: 96px;
  }
}

body.is-v3 {
  scroll-padding-top: var(--v3-sticky-offset);
}

.v3-survey {
  --md-primary: #1ea2d7;
  --md-primary-dark: #0d2137;
  --md-primary-light: #7ec8e3;
  --md-blue-50: #e8f6fb;
  --md-ink: #0d2137;
  padding: 28px 0 8px;
  scroll-margin-top: var(--v3-sticky-offset, 230px);
  max-width: 100%;
  overflow-x: clip;
}

.v3-survey,
.v3-survey * {
  box-sizing: border-box;
}

.v3-survey__heading {
  margin: 0 0 14px;
  font-size: var(--fs-h2, 28px);
  color: #1ea2d7;
}

.v3-survey__box {
  background: #fff;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-lg);
  box-shadow: var(--md-elev-1);
  padding: 22px 22px 18px;
}

.v3-survey__title {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--md-ink);
  overflow-wrap: anywhere;
}

.v3-survey__hint,
.v3-survey__text,
.v3-survey__banner,
.v3-survey__explain,
.v3-survey__extra,
.v3-survey__price-name {
  margin: 0 0 14px;
  color: var(--md-on-surface-variant);
}

.v3-survey__banner {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--md-blue-50);
  color: var(--md-ink);
}

.v3-survey__banner--warn {
  background: #fde8e8;
  color: #7a1f1f;
  border: 1px solid #f5c6c6;
}

.v3-survey__list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--md-on-surface);
}

.v3-survey__list li + li {
  margin-top: 6px;
}

.v3-survey__options,
.v3-survey__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v3-survey__opt,
.v3-survey__wide,
.v3-survey__next,
.v3-survey__back,
.v3-survey__pick,
.v3-survey__send,
.v3-survey__call,
.v3-survey__dot {
  min-height: 44px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.v3-survey__opt,
.v3-survey__wide,
.v3-survey__back {
  border: 1px solid color-mix(in srgb, #1ea2d7 35%, #d5e3ea);
  background: #e8f6fb;
  color: #0d2137;
  text-align: left;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}

.v3-survey__opt.is-aside,
.v3-survey__options > .v3-survey__wide {
  grid-column: 1;
  justify-self: stretch;
  text-align: left;
}

.v3-survey__opt.is-on {
  border-color: #1ea2d7;
  background: #fff;
  box-shadow: inset 4px 0 0 #abd03b, inset 0 0 0 1px #1ea2d7;
}

.v3-survey__wide {
  display: flex;
  width: 100%;
  margin-top: 0;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.v3-survey__next,
.v3-survey__send {
  display: flex;
  width: 100%;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.v3-survey__send,
.v3-survey__pick,
.v3-survey__call {
  border: 0;
  background: #1ea2d7;
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
}

.v3-survey__next {
  border: 0;
  min-height: 56px;
  margin-top: 14px;
  padding: 16px 20px;
  background: #1ea2d7;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgba(30, 162, 215, 0.32);
}

/* .v3-new a is more specific than .v3-survey__call and paints the label the same blue as the fill. */
.v3-new .v3-survey a.v3-survey__call {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #1ea2d7;
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
}

.v3-survey__next:hover,
.v3-survey__send:hover,
.v3-survey__pick:hover,
.v3-survey__call:hover,
.v3-new .v3-survey a.v3-survey__call:hover {
  background: #1893c4;
  color: #fff;
}

.v3-survey__nav {
  margin-top: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.v3-survey__back {
  text-align: center;
}

.v3-survey__map {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 16px;
  margin-bottom: 12px;
}

.v3-survey__bodies {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--md-blue-50);
}

.v3-survey__figure {
  margin: 0;
  min-width: 0;
}

.v3-survey__figure figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--md-on-surface-variant);
  font-size: 13px;
}

.v3-survey__body {
  position: relative;
  width: min(100%, 228px);
  margin: 0 auto;
  /* In-flow ::before sizer (not padding on this box): percentage padding is
     resolved against the containing-block width. On .v3-survey__body itself that
     is the wider grid cell, so height:0 + padding-bottom:133% made a taller-than-
     3:4 hit area, object-fit:contain letterboxed at the top, and dots floated
     above the head. ::before's CB is this box's content width (= 228px).
     Also keeps an in-flow child so iOS does not collapse abspos-only boxes. */
  background: transparent;
  border-radius: 10px;
  overflow: visible;
}

.v3-survey__body::before {
  content: "";
  display: block;
  width: 100%;
  padding-bottom: 133.333%; /* 3:4 of body width */
}

/*
 * Absolute fill + beat `.v3-new img { max-width:100% }` (0,2,1 > 0,1,0).
 */
.v3-new .v3-survey__body > img.v3-survey__person,
.v3-survey__body > img.v3-survey__person {
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

button.v3-survey__dot {
  position: absolute;
  z-index: 2;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 44px;
  text-align: center;
}

button.v3-survey__dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: #1ea2d7;
  box-shadow: 0 0 0 2px #fff;
}

button.v3-survey__dot.is-on {
  background: transparent;
  border: 0;
  box-shadow: none;
}

button.v3-survey__dot.is-on::before {
  background: #157a9e;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #abd03b;
}

button.v3-survey__dot:focus-visible {
  outline: 2px solid #1ea2d7;
  outline-offset: 2px;
}

.v3-survey__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  z-index: 6;
  width: max-content;
  max-width: min(220px, 68vw);
  padding: 6px 10px;
  border-radius: 8px;
  background: #0d2137;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
}

button.v3-survey__dot:hover .v3-survey__tip,
button.v3-survey__dot:focus .v3-survey__tip,
button.v3-survey__dot:focus-visible .v3-survey__tip,
button.v3-survey__dot.is-tip .v3-survey__tip {
  opacity: 1;
  visibility: visible;
}

.v3-survey__point-name {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  min-height: 1.35em;
  color: #0d2137;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.v3-survey__point-name.is-empty {
  visibility: hidden;
}

.v3-survey__side {
  min-width: 0;
}

.v3-survey__body.is-spine {
  width: min(100%, 248px);
}

.v3-survey__card {
  border: 1px solid var(--md-outline-variant);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
}

.v3-survey__card.is-package {
  background: var(--md-blue-50);
  border-color: var(--md-primary-light);
}

.v3-survey__kicker {
  margin: 0 0 4px;
  color: #1ea2d7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v3-survey__card h4 {
  margin: 0 0 8px;
  color: var(--md-ink);
  font-size: 20px;
}

.v3-survey__price {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--md-ink);
}

.v3-survey__lines {
  margin: 0 0 8px;
  padding-left: 18px;
}

.v3-survey__pick {
  margin-top: 8px;
}

.v3-survey__form {
  display: grid;
  gap: 10px;
}

.v3-survey__form input[type="tel"],
.v3-survey__form input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--md-primary);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.v3-survey__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  margin: 8px 0 16px;
}

.v3-survey__check span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.v3-survey__check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--md-primary);
}

.v3-survey__file {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  max-width: 100%;
  color: var(--md-primary);
  font-weight: 700;
}

.v3-survey__file input,
.v3-survey__file span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.v3-survey__error {
  margin: 0;
  color: #9b1c1c;
}

.v3-survey__error a {
  color: inherit;
}

.v3-survey__form .mrt-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  color: #b3261e;
}

.v3-survey__form input.is-invalid,
.v3-survey__form .is-invalid > input[type="tel"],
.v3-survey__form .is-invalid > input[type="text"] {
  border-color: #b3261e;
}

.v3-survey__check.is-invalid {
  color: #b3261e;
}

@media (max-width: 720px) {
  .v3-survey__box {
    padding: 16px;
  }

  .v3-survey__title {
    font-size: 20px;
  }

  .v3-survey__map {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .v3-survey__options,
  .v3-survey__nav,
  .v3-survey__zones {
    grid-template-columns: minmax(0, 1fr);
  }

  .v3-survey__opt,
  .v3-survey__wide,
  .v3-survey__next,
  .v3-survey__back,
  .v3-survey__pick,
  .v3-survey__send,
  .v3-survey__call,
  .v3-survey__box > .v3-survey__wide {
    width: 100%;
  }
}
