/* Swasthe U.S. Market Entry Guide popup */
:root {
  --guide-gold: #c9a227;
  --guide-gold-hover: #b08f1f;
  --guide-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
  --guide-popup-iframe-h: 100%;
  --guide-popup-max-w: 960px;
  --guide-popup-max-h: 560px;
  --guide-popup-radius: 14px;
  --guide-popup-image-aspect: 1024 / 851;
  --guide-popup-book-w: 176px;
}

.guide-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.5rem max(0.5rem, env(safe-area-inset-bottom, 0px));
  background: rgba(10, 29, 55, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
  overscroll-behavior: none;
}

.guide-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.guide-popup {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.guide-popup::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent;
}

.guide-popup-overlay.is-open,
.guide-popup-overlay.is-open .guide-popup,
.guide-popup__inner,
.guide-popup__form-col,
.guide-popup__content-col {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.guide-popup-overlay.is-open::-webkit-scrollbar,
.guide-popup__inner::-webkit-scrollbar,
.guide-popup__form-col::-webkit-scrollbar,
.guide-popup__content-col::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent;
}

.guide-popup {
  position: relative;
  width: min(var(--guide-popup-max-w), calc(100vw - 2rem));
  height: min(var(--guide-popup-max-h), calc(100dvh - 2rem));
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--guide-shadow);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.guide-popup-overlay.is-open .guide-popup {
  transform: translateY(0) scale(1);
}

.guide-popup__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #000000;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.guide-popup__close:hover {
  color: #ffffff;
  background: #000000;
  border-color: transparent;
}

.guide-popup__close svg {
  width: 18px;
  height: 18px;
}

.guide-popup__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Form + reference image — equal-width columns on desktop */
.guide-popup__inner:has(.guide-popup__image-wrapper) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.guide-popup__form-col {
  padding: 1rem 1.25rem 0.875rem;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: #ffffff;
}

.guide-popup__title {
  margin: 0 1.75rem 0.375rem 0;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0a1d37;
  flex-shrink: 0;
}

.guide-popup__title-accent {
  position: relative;
  display: inline-block;
}

.guide-popup__title-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.05em;
  width: 2.25rem;
  height: 3px;
  background: var(--guide-gold);
  border-radius: 2px;
}

.guide-popup__desc {
  margin: 0 0 0.625rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #64748b;
  max-width: 30rem;
}

.guide-popup__desc:last-of-type {
  margin-bottom: 1.25rem;
}

.guide-popup__embed-form {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.guide-popup__embed-form iframe {
  border: 0;
  width: 100%;
  max-width: 100%;
  display: block;
  overflow: hidden;
  background: transparent;
  height: var(--guide-popup-iframe-h);
  min-height: 0;
  max-height: none;
  flex: 0 0 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.guide-popup__embed-form iframe::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.guide-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.guide-form__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0a1d37;
}

.guide-form__field {
  position: relative;
  display: flex;
  align-items: center;
}

.guide-form__icon {
  position: absolute;
  left: 0.875rem;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  flex-shrink: 0;
}

.guide-form__input,
.guide-form__select {
  width: 100%;
  height: 44px;
  padding: 0 0.875rem 0 2.625rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  color: #0a1d37;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-form__input::placeholder {
  color: #a8b3c2;
}

.guide-form__input:focus,
.guide-form__select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.guide-form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.guide-form__phone {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
}

.guide-form__phone-code {
  position: relative;
}

.guide-form__phone-code .guide-form__select {
  padding-left: 2.25rem;
  font-size: 0.8125rem;
}

.guide-form__flag {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

.guide-form__phone-input {
  padding-left: 0.875rem;
}

.guide-form__submit {
  margin-top: 0.25rem;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--guide-gold);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s ease;
}

.guide-form__submit:hover {
  background: var(--guide-gold-hover);
}

.guide-form__submit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.guide-form__privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #94a3b8;
}

.guide-form__privacy svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #94a3b8;
}

.guide-popup__content-col {
  padding: 0.875rem 1rem 0.75rem;
  border-left: 1px solid #eef2f6;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  gap: 0.5rem;
}

.guide-popup__content-col:has(.guide-popup__image-wrapper) {
  padding: 0 !important;
  background: #f8fafc !important;
  overflow: hidden;
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.guide-popup__image-wrapper {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  display: block;
  overflow: hidden;
  background: #f8fafc;
  line-height: 0;
}

.guide-popup__guide-image {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center;
  margin: 0;
}

.guide-popup__content-top {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  gap: 0.375rem 0.625rem;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: 0.375rem;
}

.guide-popup__checklist-col {
  min-width: 0;
  overflow: hidden;
}

.guide-popup__book-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
  padding-top: 0.125rem;
  padding-right: 0.125rem;
  height: 100%;
}

.guide-popup__content-title {
  margin: 0 0 0.375rem;
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  font-weight: 700;
  color: #0a1d37;
  line-height: 1.25;
}

.guide-popup__checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.guide-popup__checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.4375rem;
  padding: 0.3125rem 0;
  border-bottom: 1px dashed #d8dee8;
}

.guide-popup__checklist li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.guide-popup__checklist-text {
  min-width: 0;
}

.guide-popup__checklist-text strong {
  display: block;
  font-size: clamp(0.6875rem, 1.2vw, 0.75rem);
  font-weight: 700;
  color: #0a1d37;
  line-height: 1.3;
  margin-bottom: 0.0625rem;
}

.guide-popup__checklist-text p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.guide-popup__check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: #c9a227;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.guide-popup__check svg {
  width: 10px;
  height: 10px;
  stroke-width: 3;
}

.guide-popup__book-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 1.125rem;
  perspective: 1400px;
  overflow: visible;
  height: 100%;
  min-height: 0;
}

.guide-book {
  position: relative;
  width: min(100%, var(--guide-popup-book-w));
  aspect-ratio: 1 / 1.35;
  margin: 0 0 0 auto;
  transform: rotateY(-16deg) rotateX(3deg);
  transform-style: preserve-3d;
  filter: drop-shadow(12px 18px 22px rgba(10, 29, 55, 0.22));
}

.guide-book__spine {
  position: absolute;
  left: -14px;
  top: 8px;
  width: 14px;
  height: calc(100% - 14px);
  background: linear-gradient(90deg, #050f1f 0%, #0a1d37 55%, #0f2848 100%);
  transform: rotateY(-90deg);
  transform-origin: right center;
  border-radius: 3px 0 0 3px;
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.guide-book__pages {
  position: absolute;
  top: 10px;
  right: -11px;
  width: 12px;
  height: calc(100% - 20px);
  background: repeating-linear-gradient(180deg,
      #ffffff 0px,
      #ffffff 1px,
      #f1f5f9 1px,
      #f1f5f9 2px,
      #e2e8f0 2px,
      #e2e8f0 3px);
  border-radius: 0 2px 2px 0;
  box-shadow: 4px 4px 10px rgba(15, 23, 42, 0.16);
  transform: rotateY(8deg);
  z-index: 0;
}

.guide-book__cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: linear-gradient(158deg, #102a4c 0%, #0a1d37 42%, #071425 100%);
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    inset -6px 0 14px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  padding: 0.8125rem 0.75rem 0.6875rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.guide-book__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
  min-height: 1.125rem;
}

.guide-book__pattern {
  position: absolute;
  left: -6px;
  bottom: -4px;
  width: 58%;
  height: 78%;
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

.guide-book__date {
  flex-shrink: 0;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.35;
  white-space: nowrap;
}

.guide-book__accent-line {
  display: block;
  width: 2.125rem;
  height: 2px;
  margin-top: 0.125rem;
  background: linear-gradient(90deg, #d4a82a 0%, #c9a227 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.guide-book__title-block {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.125rem 0 0.375rem;
  max-width: 100%;
}

.guide-book__title {
  margin: 0;
  font-size: clamp(0.9375rem, 1.65vw, 1.125rem);
  font-weight: 800;
  line-height: 1.06;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-book__subtitle {
  margin: 0.3125rem 0 0;
  font-size: clamp(0.625rem, 1.05vw, 0.6875rem);
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
}

.guide-book__meta {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  text-align: right;
  margin-top: auto;
  padding-top: 0.25rem;
  max-width: 100%;
}

.guide-book__meta-label {
  display: block;
  font-size: 0.4375rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.3125rem;
}

.guide-book__meta-label:first-child {
  margin-top: 0;
}

.guide-book__meta-value {
  display: block;
  font-size: 0.5rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  margin-top: 0.0625rem;
  margin-bottom: 0.0625rem;
  letter-spacing: 0.015em;
}

.guide-book__meta-value--brand {
  font-size: 0.5625rem;
  margin-bottom: 0;
}

/* Legacy markup: span/strong inside .guide-book__meta */
.guide-book__meta span:not(.guide-book__meta-label) {
  display: block;
  font-size: 0.4375rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.3125rem;
}

.guide-book__meta span:not(.guide-book__meta-label):first-child {
  margin-top: 0;
}

.guide-book__meta strong {
  display: block;
  font-size: 0.5rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  margin-top: 0.0625rem;
  margin-bottom: 0.0625rem;
  letter-spacing: 0.015em;
}

.guide-book__platform {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 104%;
  max-width: 238px;
  height: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 55%, #e8edf2 100%);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  z-index: 0;
}

.guide-book__platform::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -5px;
  height: 5px;
  background: linear-gradient(180deg, #e8edf2 0%, #dfe6ee 100%);
  border-radius: 0 0 2px 2px;
  opacity: 0.9;
}

.guide-popup__footer-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0.5625rem 0.75rem;
  border-radius: 8px;
  background: #fdfaf5;
  margin-top: auto;
  flex-shrink: 0;
  border: 1px solid #f0ebe0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}

.guide-popup__trust {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  flex: 1 1 52%;
  min-width: 0;
  padding-right: 0.75rem;
  border-right: 1px solid #ebe4d8;
}

.guide-popup__trust-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5efe4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b08f1f;
}

.guide-popup__trust-icon svg {
  width: 15px;
  height: 15px;
}

.guide-popup__trust-text {
  min-width: 0;
  flex: 1 1 auto;
}

.guide-popup__trust-text strong {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #0a1d37;
  line-height: 1.3;
}

.guide-popup__trust-text span {
  display: block;
  font-size: 0.625rem;
  line-height: 1.35;
  color: #64748b;
}

.guide-popup__pillars {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 48%;
  gap: 0;
  padding-left: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.guide-popup__pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  min-width: 0;
  flex: 1 1 0;
  padding: 0 0.25rem;
  border-left: 1px solid #ebe4d8;
}

.guide-popup__pillar:first-child {
  border-left: none;
}

.guide-popup__pillar-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b08f1f;
  flex-shrink: 0;
}

.guide-popup__pillar-icon svg {
  width: 18px;
  height: 18px;
}

.guide-popup__pillar-label {
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1.1;
  color: #0a1d37;
}

body.guide-popup-open,
html.guide-popup-open {
  overflow: hidden;
}

/* Desktop — natural height, overlay scrolls (scrollbar hidden) */
@media (min-width: 861px) {
  .guide-popup-overlay.is-open {
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .guide-popup-overlay.is-open .guide-popup {
    height: auto;
    max-height: none;
    overflow: visible;
    margin: auto;
    flex-shrink: 0;
    width: min(var(--guide-popup-max-w), calc(100vw - 2rem));
  }

  .guide-popup-overlay.is-open .guide-popup__inner:has(.guide-popup__image-wrapper) {
    align-items: stretch;
    overflow: hidden;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .guide-popup-overlay.is-open .guide-popup:has(.guide-popup__image-wrapper) {
    overflow: hidden;
  }

  .guide-popup-overlay.is-open .guide-popup__inner {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .guide-popup-overlay.is-open .guide-popup__form-col {
    padding: 1.125rem 1.5rem 1rem;
    align-self: stretch;
    height: auto;
  }

  .guide-popup-overlay.is-open .guide-popup__form-col,
  .guide-popup-overlay.is-open .guide-popup__content-col:not(:has(.guide-popup__image-wrapper)) {
    overflow: visible;
    height: auto;
    max-height: none;
  }

  .guide-popup-overlay.is-open .guide-popup__content-col:has(.guide-popup__image-wrapper) {
    padding: 0 !important;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    border-radius: 0 var(--guide-popup-radius) var(--guide-popup-radius) 0;
    overflow: hidden;
  }

  .guide-popup-overlay.is-open .guide-popup__content-col:has(.guide-popup__image-wrapper) .guide-popup__image-wrapper {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 100%;
    aspect-ratio: unset;
  }

  .guide-popup-overlay.is-open .guide-popup__content-col:has(.guide-popup__image-wrapper) .guide-popup__guide-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center;
  }

  .guide-popup-overlay.is-open .guide-popup__embed-form {
    overflow: hidden;
  }

  .guide-popup-overlay.is-open .guide-popup__embed-form iframe {
    overflow: hidden;
    max-height: none;
  }

  .guide-popup-overlay.is-open .guide-popup__content-col:not(:has(.guide-popup__image-wrapper)) {
    overflow: hidden;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    padding: 0.625rem 0.875rem;
    background: #f8fafc;
  }

  .guide-popup__book-wrap {
    padding-bottom: 1.375rem;
  }

  .guide-book {
    width: min(100%, 150px);
  }
}

/* Large desktop — wider popup, more room for form + image */
@media (min-width: 1200px) {
  :root {
    --guide-popup-max-w: 1000px;
  }

  .guide-popup-overlay.is-open .guide-popup__inner:has(.guide-popup__image-wrapper) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .guide-popup__form-col,
  .guide-popup-overlay.is-open .guide-popup__form-col {
    padding: 1.25rem 1.75rem 1.125rem;
  }

  .guide-popup__content-col:not(:has(.guide-popup__image-wrapper)) {
    padding: 0.625rem 1.125rem;
  }
}

/* Tablet desktop — keep columns balanced */
@media (max-width: 1024px) and (min-width: 861px) {
  :root {
    --guide-popup-max-w: 920px;
  }

  .guide-popup-overlay.is-open .guide-popup__inner:has(.guide-popup__image-wrapper) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .guide-popup__content-top {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 0.375rem 0.5rem;
  }

  .guide-book {
    width: min(100%, 160px);
  }

  .guide-popup__form-col,
  .guide-popup-overlay.is-open .guide-popup__form-col,
  .guide-popup__content-col {
    padding: 0.875rem 1.125rem 0.75rem;
  }
}

@media (max-height: 760px) and (min-width: 861px) {

  .guide-popup__form-col,
  .guide-popup__content-col {
    padding-top: 0.875rem;
    padding-bottom: 0.75rem;
  }

  .guide-popup__checklist li {
    padding: 0.25rem 0;
  }

  .guide-book {
    width: min(100%, 150px);
  }

  .guide-popup__footer-bar {
    padding: 0.4375rem 0.625rem;
  }
}

/* Mobile + narrow tablet — natural height, overlay scrolls */
@media (max-width: 860px) {
  .guide-popup-overlay.is-open {
    align-items: flex-start;
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.5rem max(0.5rem, env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .guide-popup-overlay.is-open .guide-popup {
    width: min(var(--guide-popup-max-w), calc(100vw - 2rem));
    height: auto;
    max-height: none;
    overflow: visible;
    display: block;
    border-radius: 14px;
    margin: 0 auto 0.5rem;
    flex-shrink: 0;
  }

  .guide-popup-overlay.is-open .guide-popup__inner {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }

  .guide-popup-overlay.is-open .guide-popup__form-col {
    order: 1;
    overflow: hidden;
    height: auto;
    max-height: none;
    min-height: 0;
    flex: 0 0 auto;
    width: 100%;
    padding: 1rem 1rem 0.625rem;
    position: relative;
    z-index: 2;
  }

  .guide-popup-overlay.is-open .guide-popup__content-col {
    order: 2;
    overflow: visible;
    height: auto;
    max-height: none;
    min-height: 0;
    flex: 0 0 auto;
    width: 100%;
    padding: 0 1rem 0.75rem;
    border-left: none;
    border-top: 1px solid #f3f4f6;
    gap: 0.625rem;
    position: relative;
    z-index: 1;
  }

  .guide-popup-overlay.is-open .guide-popup__content-col:has(.guide-popup__image-wrapper) {
    padding: 0 !important;
    background: #f8fafc !important;
    border-top: none;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
  }

  .guide-popup__image-wrapper,
  .guide-popup-overlay.is-open .guide-popup__image-wrapper {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: var(--guide-popup-image-aspect);
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    display: block;
  }

  .guide-popup__guide-image,
  .guide-popup-overlay.is-open .guide-popup__image-wrapper .guide-popup__guide-image {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0;
    object-fit: contain !important;
    object-position: center center;
  }

  .guide-popup-overlay.is-open .guide-popup__embed-form {
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
  }

  .guide-popup-overlay.is-open .guide-popup__embed-form iframe {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    pointer-events: auto;
  }

  .guide-popup-overlay.is-open .guide-popup__title {
    font-size: clamp(1.0625rem, 4.5vw, 1.25rem);
    margin-right: 2rem;
    line-height: 1.2;
  }

  .guide-popup__content-top {
    grid-template-columns: 1fr minmax(108px, 0.42fr);
    gap: 0.5rem 0.625rem;
    align-items: start;
    padding-bottom: 0.5rem;
  }

  .guide-popup__book-col {
    justify-content: center;
    padding-right: 0;
    height: auto;
  }

  .guide-popup__book-wrap {
    justify-content: center;
    padding-bottom: 0.875rem;
  }

  .guide-book {
    width: min(100%, 120px);
    margin: 0 auto;
    transform: rotateY(-12deg) rotateX(2deg);
  }

  .guide-popup__footer-bar {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
  }

  .guide-popup__trust {
    padding-right: 0;
    border-right: none;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ebe4d8;
  }

  .guide-popup__pillars {
    padding-left: 0;
  }

  :root {
    --guide-popup-iframe-h: auto;
  }
}

/* Small phones — stack checklist above book, compact footer */
@media (max-width: 560px) {
  .guide-popup {
    width: calc(100vw - 0.75rem);
    border-radius: 12px;
  }

  .guide-popup__close {
    top: 0.375rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
  }

  .guide-popup__form-col {
    padding: 0.875rem 0.875rem 0.5rem;
  }

  .guide-popup__content-col {
    padding: 0 1rem 0.875rem;
  }

  .guide-popup__content-col:has(.guide-popup__image-wrapper) {
    padding: 0 !important;
  }

  .guide-popup__content-top {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .guide-popup__book-col {
    justify-content: center;
  }

  .guide-book {
    width: min(100%, 108px);
    transform: rotateY(-10deg) rotateX(1deg);
  }

  .guide-popup__checklist-text strong {
    font-size: 0.6875rem;
  }

  .guide-popup__checklist-text p {
    font-size: 10px;
    line-height: 1.35;
  }

  .guide-popup__pillars {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .guide-popup__pillar {
    flex: 1 1 0;
    padding: 0 0.125rem;
  }

  .guide-popup__pillar-label {
    font-size: 0.4375rem;
  }

  .guide-popup__trust-text strong {
    font-size: 0.625rem;
  }

  .guide-popup__trust-text span {
    font-size: 0.5625rem;
  }
}

@media (max-width: 480px) {
  .guide-popup-overlay {
    padding: max(0.375rem, env(safe-area-inset-top, 0px)) 0.375rem max(0.375rem, env(safe-area-inset-bottom, 0px));
  }

  .guide-popup {
    width: calc(100vw - 0.5rem);
  }

  .guide-form__phone {
    grid-template-columns: 1fr;
  }

  .guide-popup__title {
    font-size: 1.0625rem;
  }

  .guide-book {
    width: min(100%, 100px);
  }

  .guide-book__title {
    font-size: 0.8125rem;
  }

  .guide-book__subtitle {
    font-size: 0.5625rem;
  }
}

@media (max-width: 380px) {
  .guide-popup__pillar-icon {
    width: 20px;
    height: 20px;
  }

  .guide-popup__pillar-icon svg {
    width: 14px;
    height: 14px;
  }

  .guide-popup__pillar-label {
    font-size: 0.375rem;
  }
}