.estimator-body {
  min-height: 100dvh;
  min-height: 100svh;
  background: radial-gradient(120% 80% at 50% 0%, #0f2848 0%, var(--ink) 55%);
}
@media (min-width: 768px) {
  .estimator-body {
    background: radial-gradient(ellipse 80% 60% at 50% 20%, #132a52 0%, var(--ink) 70%);
  }
  .estimator-app {
    max-width: 520px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.45);
  }
}
.estimator-app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100svh;
  padding: max(12px, env(safe-area-inset-top)) 14px max(100px, calc(12px + env(safe-area-inset-bottom)));
  position: relative;
}
.est-swipe-surface {
  flex: 1;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}
.est-header h1 {
  font-size: clamp(24px, 5.5vw, 32px);
  margin-bottom: 0.3em;
}
.est-header p {
  color: var(--slate);
  font-size: 16px;
  max-width: 36ch;
}
.est-progress {
  display: flex;
  gap: 6px;
  margin: 14px 0 16px;
}
.est-progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(203, 213, 225, 0.2);
  transition: background 0.3s var(--ease);
}
.est-progress span.on {
  background: var(--warm);
}
.est-glass-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: est-in 0.32s var(--ease);
}
@keyframes est-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.est-swipe-hint {
  font-size: 13px;
  color: var(--steel);
  text-align: center;
  margin-top: 10px;
}
.est-hero-illus {
  width: 100%;
  max-width: 300px;
  margin: 8px auto 16px;
  display: block;
}
.est-tip {
  font-size: 14px;
  color: var(--slate);
  margin-top: 8px;
}
.est-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.est-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.est-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.est-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  min-height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(5, 11, 24, 0.85);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.est-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.est-ref-card {
  min-height: 96px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: 600 14px/1.25 "Montserrat", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.est-ref-card:active {
  transform: scale(0.97);
}
.est-ref-card.on {
  border-color: var(--warm);
  background: rgba(242, 197, 138, 0.14);
}
.est-ref-card svg {
  width: 48px;
  height: 48px;
}
.est-pin-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}
.est-pin-viewport {
  flex: 1;
  min-height: 0;
  max-height: min(52vh, 420px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.est-pin-stage {
  position: relative;
  touch-action: manipulation;
}
.est-pin-stage img {
  width: 100%;
  display: block;
  user-select: none;
}
.est-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--warm);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.est-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(58dvh, 480px);
  overflow: auto;
  padding: 0 16px max(20px, env(safe-area-inset-bottom));
  background: #0a1428;
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  transform: translateY(110%);
  transition: transform 0.3s var(--ease);
  z-index: 50;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}
.est-sheet.open {
  transform: translateY(0);
}
.est-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  background: #0a1428;
  z-index: 2;
}
.est-sheet-title {
  font-weight: 700;
  font-size: 18px;
}
.est-sheet-actions {
  display: flex;
  gap: 8px;
}
.est-sheet-actions .btn-del {
  color: #ffb4b4;
  border-color: rgba(255, 120, 120, 0.45);
}
.est-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.est-type-card {
  min-height: 72px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.est-type-card.on {
  border-color: var(--warm);
  background: rgba(242, 197, 138, 0.12);
}
.est-type-card svg {
  width: 28px;
  height: 28px;
}
.est-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.est-size-chip {
  min-height: 52px;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.est-size-chip.on {
  border-color: var(--warm);
}
.est-size-chip .size-dot {
  border-radius: 50%;
  background: var(--warm);
  opacity: 0.85;
}
.est-choice-card {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 64px;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: 600 16px/1.35 "Montserrat", system-ui, sans-serif;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.est-choice-card:active {
  transform: scale(0.99);
}
.est-choice-card.on {
  border-color: var(--warm);
  background: rgba(242, 197, 138, 0.12);
}
.est-times-wrap {
  position: relative;
  flex: 1;
}
.est-picked-pill {
  position: sticky;
  top: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(242, 197, 138, 0.2);
  border: 1px solid var(--warm);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.est-week-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.est-day-col {
  flex: 0 0 78%;
  max-width: 280px;
  scroll-snap-align: start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.est-day-col h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.est-time-tile {
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.est-time-tile.on {
  border-color: var(--warm);
  background: rgba(242, 197, 138, 0.15);
}
.est-field label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--slate);
}
.est-field input,
.est-field textarea {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 12px;
  font-family: inherit;
}
.est-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: rgba(5, 11, 24, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 40;
}
@media (min-width: 768px) {
  .est-bar {
    max-width: 520px;
    left: 50%;
    transform: translateX(-50%);
  }
  /* The glass card's backdrop-filter makes it the containing block for this fixed sheet,
     so span the full card column (about 490px) instead of centering inside it. */
  .est-sheet {
    left: 0;
    right: 0;
    max-width: none;
    padding: 0 20px max(20px, env(safe-area-inset-bottom));
    transform: translateY(110%);
  }
  .est-sheet.open {
    transform: translateY(0);
  }
  .est-sheet-title {
    white-space: nowrap;
  }
}
.est-bar .btn {
  flex: 1;
}
.est-stepper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.est-stepper button {
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.est-error {
  color: #ffb4b4;
  font-size: 14px;
  margin-top: 8px;
}
.est-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.quote-page {
  min-height: 100svh;
  background: radial-gradient(120% 80% at 50% 0%, #0f2848 0%, var(--ink) 55%);
}
.quote-shell {
  padding: max(20px, env(safe-area-inset-top)) 16px 40px;
  max-width: 520px;
  margin: 0 auto;
}
.quote-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.quote-brand img {
  margin: 0 auto 12px;
}
.quote-card h1 {
  font-size: clamp(26px, 6vw, 34px);
}
.quote-greet {
  color: var(--slate);
}
.quote-photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.quote-thumb {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.quote-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.quote-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--warm);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quote-item,
.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.quote-total-line {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 6px;
  font-size: 18px;
}
.quote-deposit {
  margin: 8px 0;
}
.quote-call {
  margin-top: 20px;
  background: var(--navy) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.quote-call:hover {
  background: var(--navy-deep) !important;
}
.quote-times h2 {
  font-size: 20px;
  margin-top: 20px;
}
.quote-times ul {
  padding-left: 1.2em;
  color: var(--slate);
}
/* Wall texture: two exclusive picture cards */
.est-tex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 4px;
}
.est-tex-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 150px;
  padding: 14px 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: 600 15px/1.3 "Montserrat", system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.est-tex-card svg {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 10px;
}
.est-tex-card:active {
  transform: scale(0.99);
}
.est-tex-card.on {
  border-color: var(--warm);
  background: rgba(242, 197, 138, 0.12);
  box-shadow: 0 0 0 1px var(--warm) inset;
}

/* Quote page: requested visit times and calendar buttons */
.quote-slots {
  list-style: none;
  padding: 0 !important;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}
.quote-slot {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  color: #fff;
}
.quote-slot-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
}
.quote-slot-win {
  color: var(--slate);
  font-size: 14px;
  white-space: nowrap;
}
.quote-cal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}
.quote-cal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(242, 197, 138, 0.6);
  background: rgba(242, 197, 138, 0.1);
  color: var(--warm);
  font: 600 15px/1 "Montserrat", system-ui, sans-serif;
  text-decoration: none;
}
.quote-cal-btn:hover {
  background: rgba(242, 197, 138, 0.2);
}
.quote-cal-link {
  color: var(--slate);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.quote-cal-all {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.quote-cal-ico {
  flex: none;
}
.quote-times-note {
  color: var(--slate);
  font-size: 14px;
  margin: 12px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .est-sheet,
  .est-progress span,
  .est-glass-card,
  .btn,
  .est-choice-card,
  .est-tex-card,
  .est-ref-card {
    animation: none;
    transition: none;
  }
}

/* Questionnaire (v5): big tap cards, app-like, no checkboxes */
.est-q-title {
  font-size: clamp(22px, 5.6vw, 28px);
  line-height: 1.2;
  margin: 0 0 16px;
}
.est-q-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.est-q-grid .est-q-card {
  margin-bottom: 0;
  min-height: 60px;
  text-align: center;
  font-size: 17px;
}
.est-q-big .est-q-card {
  min-height: 86px;
  font-size: 22px;
  font-weight: 700;
}
.est-q-two {
  grid-template-columns: 1fr 1fr;
}
.est-q-two .est-q-card {
  min-height: 54px;
  padding: 12px 10px;
  font-size: 15px;
}
.est-q-exact {
  max-width: 220px;
}
.est-opt {
  color: var(--slate);
  font-weight: 500;
  font-size: 0.9em;
}

/* Damage check flag */
.est-pin.flag {
  background: #7f1d1d;
  border-color: #fca5a5;
  animation: estFlagPulse 1.4s ease-in-out infinite;
}
@keyframes estFlagPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(252, 165, 165, 0.55), 0 4px 14px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(252, 165, 165, 0), 0 4px 14px rgba(0, 0, 0, 0.35); }
}
@media (prefers-reduced-motion: reduce) {
  .est-pin.flag { animation: none; }
}
.est-flag-box {
  margin: 12px 0 4px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(252, 165, 165, 0.55);
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.35), rgba(127, 29, 29, 0.15));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.est-flag-box p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.4;
  color: #fff;
}
.est-flag-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.est-flag-actions .btn {
  min-height: 48px;
}
.est-q-grid .est-q-card.on {
  border-color: #f2c58a;
  background: linear-gradient(145deg, rgba(242, 197, 138, 0.95), rgba(242, 197, 138, 0.78));
  color: #0b1530;
  box-shadow: 0 6px 22px rgba(242, 197, 138, 0.28);
}
.est-q-grid + .est-field,
.est-field + .est-q-grid {
  margin-top: 14px;
}

.quote-brand-link { display: inline-block; }
