@media (max-width: 700px) {
  .wizard-topline .back-link,
  .wizard-topline .secondary-button,
  .resume-banner button,
  .room-grid button {
    min-height: 44px;
  }
  .wizard-topline .back-link { padding: 10px 4px; }
  .resume-banner button { min-width: 44px; margin: -8px -10px -8px 0; }
  .room-grid button { padding-block: 10px; }

  .site-shell { padding-inline: 16px; }
  .wizard-shell { padding-top: 20px; padding-bottom: 36px; }
  .progress-track { margin: 16px 0 28px; }
  .resume-banner { margin: -10px 0 24px; padding: 10px 12px; }
  .step-card > h1,
  .measure-copy h1,
  .result-heading h1 { font-size: 34px; line-height: 1.08; }
  .result-heading > div > p:last-child { margin: 14px 0 20px; font-size: 16px; line-height: 1.45; }
  .result-check { margin: 10px 0 18px; }
  .result-layout { gap: 16px; }
  .result-layout > *,
  .result-card,
  .price-card { min-width: 0; max-width: 100%; }
  .result-card,
  .price-card { border-radius: 15px; padding: 16px; }
  .measurement-id-row { margin: 0 0 20px; padding: 12px; }
  .big-size { margin: 18px 0 6px; }
  .big-size span { font-size: 25px; }
  .result-card > p { margin-bottom: 20px; }
  .finished-size-note { font-size: 13px; line-height: 1.5; color: #5f675f; }
  .measurement-details-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 13px 0;
    border: 0;
    border-top: 1px solid #dfe5df;
    border-bottom: 1px solid #dfe5df;
    background: transparent;
    color: #1f633d;
    font: inherit;
    font-weight: 700;
    text-align: left;
  }
  .measurement-details-toggle::after { content: "+"; font-size: 20px; font-weight: 400; }
  .measurement-details-toggle[aria-expanded="true"]::after { content: "−"; }
  .result-card .result-details { display: none; }
  .result-card .result-details.is-open { display: block; }
  .result-card dl div { gap: 12px; padding: 10px 0; font-size: 12px; }
  .result-card dt { max-width: 52%; }
  .result-card dd { max-width: 48%; }
  .quote-section { margin-top: 16px; padding-top: 16px; }
  .room-grid { margin-bottom: 16px; }
  .model-swipe-hint {
    display: block;
    margin: -2px 0 8px;
    color: #667068;
    font-size: 12px;
  }
  .fabric-grid.compact {
    display: flex;
    width: calc(100% + 32px);
    max-width: calc(100% + 32px);
    gap: 10px;
    margin-inline: -16px;
    padding: 0 16px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .fabric-grid.compact .fabric-card { flex: 0 0 250px; min-height: 68px; scroll-snap-align: start; }
  .fabric-grid.compact::after { content: ""; flex: 0 0 6px; }
  .color-section,
  .set-section { margin-top: 15px; }
  .quote-total { margin-top: 15px; padding: 14px; }
  .confirm-row { margin: 18px 0 14px; }
  .confirm-row.second { margin-top: 0; }
  .wizard-next { position: static; bottom: auto; margin-top: 24px; }
  .price-card .primary-button { min-height: 54px; }
}

@media (min-width: 701px) {
  .measurement-details-toggle,
  .model-swipe-hint { display: none; }
}

/* Keep the desktop measuring flow comfortably inside a laptop viewport. */
@media (min-width: 701px) and (max-height: 900px) {
  .site-shell { padding-bottom: 22px; }
  .topbar { height: 82px; }
  .wizard-shell { padding-top: 16px; padding-bottom: 20px; }
  .wizard-topline { min-height: 30px; }
  .progress-track { margin: 10px 0 18px; }
  .resume-banner { margin: -4px 0 16px; }
  .step-card > .eyebrow { margin-bottom: 10px; }
  .measure-copy > .eyebrow { margin-bottom: 8px; }
  .step-card > h1,
  .measure-copy h1 { font-size: clamp(38px, 3.5vw, 52px); line-height: 1.04; }
  .step-intro { margin: 10px 0 16px; }
  .window-type-grid,
  .choice-grid { margin-top: 16px; gap: 12px; }
  .window-type-card { min-height: 210px; padding-bottom: 12px; }
  .window-type-card img { height: 112px; margin-bottom: 10px; }
  .step-card .choice-grid.three { gap: 10px; }
  .step-card .choice-grid.three .choice-card {
    min-height: 224px;
    height: 224px;
    padding-bottom: 16px;
  }
  .step-card .choice-grid.three .choice-card img {
    height: 104px;
    margin-bottom: 10px;
  }
  .step-card .choice-grid.three .choice-card strong { line-height: 1.15; }
  .step-card .choice-grid.three .choice-card small { margin-top: 6px; line-height: 1.35; }
  .step-card .not-sure {
    min-height: 58px;
    margin-top: 12px;
    padding-block: 8px;
  }
  .step-card .not-sure div strong,
  .step-card .not-sure div p { display: inline; }
  .step-card .not-sure div p { margin-left: 6px; }
  .measure-step { align-items: start; }
  .measurement-diagram.photo-guide { min-height: 500px; height: 500px; }
  .measurement-diagram.photo-guide img { height: 100%; }
  .measure-copy .height-steps { margin-bottom: 12px; }
  .measure-copy .unit-switch { min-height: 40px; height: 40px; margin-bottom: 14px; }
  .measure-copy .number-field { min-height: 88px; }
  .measure-copy .tip { margin-top: 8px; }
  .wizard-shell .wizard-next {
    position: static;
    bottom: auto;
    min-height: 54px;
    margin-top: 10px;
  }
}

@media (max-width: 360px) {
  .site-shell { padding-inline: 12px; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 10px; }
  .step-card > h1,
  .measure-copy h1,
  .result-heading h1 { font-size: 31px; }
  .result-card,
  .price-card { padding: 14px; }
  .big-size span { font-size: 23px; }
  .color-grid { grid-template-columns: 1fr; }
}
.wizard-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.start-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #5f665f;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.start-link:hover,
.start-link:focus-visible {
  color: #1f633d;
}

@media (max-width: 640px) {
  .wizard-nav-actions {
    gap: 12px;
  }

  .start-link {
    font-size: 0.875rem;
  }
}
.window-name-field { display: grid; gap: 6px; margin: 0 0 14px; }
.window-name-field > span { font-size: 12px; font-weight: 750; }
.window-name-field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.window-name-field input:focus { border-color: var(--green); outline: 2px solid rgba(31,91,56,.14); outline-offset: 1px; }
.window-name-field small { color: var(--muted); font-size: 10px; line-height: 1.4; }
