/* Reserve 12px more on each side of the artwork, toward both edge and copy. */
.phone .next-home-feature-list > button.next-home-feature-card {
  min-height: 160px;
  flex-basis: 94%;
  grid-template-columns: clamp(116px, calc(26% + 24px), 140px) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.phone .next-home-feature-list > button.next-home-feature-card:only-child {
  flex-basis: 100%;
}

.phone .next-home-feature-card > .next-home-feature-art {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  pointer-events: none;
}

.phone .next-home-feature-art > img {
  position: absolute;
  top: 50%;
  right: 50%;
  display: block;
  width: 119px;
  height: 119px;
  max-width: none;
  object-fit: contain;
  object-position: center;
  transform: translate(50%, -50%);
  transform-origin: center;
}

.phone .next-home-feature-list > button.next-home-feature-card > span.next-home-feature-copy {
  min-width: 0;
  min-height: 0;
  padding: 16px 4px 16px 16px;
  justify-content: center;
  overflow-wrap: anywhere;
}

.phone .next-home-feature-card > .next-home-feature-copy > strong {
  margin: 4px 0;
}

.phone .next-home-feature-card > .next-home-feature-copy > b {
  margin-top: 8px;
  padding-top: 8px;
}

/* A narrower art column leaves room for Persian copy on small phones. */
@media (max-width: 360px) {
  .phone .next-home-feature-list > button.next-home-feature-card {
    flex-basis: 96%;
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .phone .next-home-feature-art > img {
    width: 105.4px;
    height: 105.4px;
  }
  .phone .next-home-feature-list > button.next-home-feature-card > span.next-home-feature-copy {
    padding: 16px 4px 16px 12px;
  }
}

/* Promotional cards share the refined card and action roles. */
.phone.app-theme-refined :is(.next-home-promo, .feature-promo) {
  min-height: 0;
  margin: var(--biz-section-gap) 0 var(--biz-space-1);
  padding: var(--biz-card-padding);
  position: relative;
  border: var(--biz-control-stroke) solid var(--biz-line);
  border-radius: var(--biz-radius-card);
  color: var(--biz-ink);
  background: var(--biz-surface);
  box-shadow: var(--biz-shadow-card);
}

.phone.app-theme-refined :is(.next-home-promo, .feature-promo)[hidden] {
  display: none !important;
}

.phone.app-theme-refined .next-home-promo:not(.next-home-promo-illustrated) {
  display: grid;
  grid-template-columns: var(--biz-icon-tile-row) minmax(0, 1fr);
  align-items: start;
  gap: var(--biz-space-3);
}

.phone.app-theme-refined .next-home-promo::after {
  content: none;
}

/* Only the legacy icon layout places copy directly on the outer card grid. */
.phone.app-theme-refined .next-home-promo:not(.next-home-promo-illustrated) > div {
  display: contents;
  padding: 0;
}

.phone.app-theme-refined .next-home-promo-mark {
  grid-column: 1;
  grid-row: 1;
  width: var(--biz-icon-tile-row);
  height: var(--biz-icon-tile-row);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--biz-icon-radius-row);
  color: var(--biz-info);
  background: var(--biz-info-soft);
  box-shadow: none;
}

.phone.app-theme-refined .next-home-promo:not(.next-home-promo-illustrated) > div > small {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding-inline-end: var(--biz-touch);
}

.phone.app-theme-refined :is(.next-home-promo > div > small, .feature-promo > span) {
  color: var(--biz-muted);
  font-family: var(--biz-font-medium);
  font-size: var(--biz-text-caption) !important;
  line-height: var(--biz-line-caption);
  letter-spacing: 0;
}

.phone.app-theme-refined :is(.next-home-promo h2, .feature-promo h2) {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--biz-ink);
  font-family: var(--biz-font-semibold);
  font-size: var(--biz-text-body) !important;
  line-height: var(--biz-line-body);
  letter-spacing: 0;
}

.phone.app-theme-refined :is(.next-home-promo p, .feature-promo p) {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0;
  color: var(--biz-muted);
  font-family: var(--biz-font-regular);
  font-size: var(--biz-text-caption) !important;
  line-height: var(--biz-line-caption);
  letter-spacing: 0;
}

.phone.app-theme-refined :is(.next-home-promo-dismiss, .feature-promo > button:first-child) {
  width: var(--biz-touch);
  height: var(--biz-touch);
  min-width: var(--biz-touch);
  min-height: var(--biz-touch);
  padding: 0;
  position: absolute;
  top: var(--biz-space-3);
  left: var(--biz-space-3);
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--biz-radius-control);
  color: var(--biz-muted);
  background: transparent;
  box-shadow: none;
}

.phone.app-theme-refined :is(.next-home-promo-action, .feature-promo > button:last-child) {
  grid-column: 1 / -1;
  justify-self: start;
  width: fit-content;
  min-height: var(--biz-touch);
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--biz-space-2);
  border: 0;
  border-radius: var(--biz-icon-radius-row);
  color: var(--biz-brand);
  background: transparent;
  box-shadow: none;
  font-family: var(--biz-font-medium);
  font-size: var(--biz-text-caption) !important;
  line-height: var(--biz-line-caption);
}

.phone.app-theme-refined :is(.next-home-promo-mark, .next-home-promo-dismiss,
  .next-home-promo-action, .feature-promo > button) > svg {
  width: var(--biz-icon-glyph);
  height: var(--biz-icon-glyph);
  display: block;
  flex: 0 0 auto;
  stroke-width: var(--biz-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The classic home promotion is retained when that layout is displayed. */
.phone.app-theme-refined .feature-promo > span {
  display: block;
  min-height: var(--biz-icon-tile-row);
  padding-inline-end: var(--biz-touch);
}

.phone.app-theme-refined .feature-promo h2 {
  margin-block: var(--biz-space-3) var(--biz-space-2);
}

.phone.app-theme-refined .feature-promo > button:last-child {
  margin-top: var(--biz-space-3);
}

@media (hover: hover) {
  .phone.app-theme-refined :is(.next-home-promo-dismiss, .feature-promo > button:first-child):hover {
    color: var(--biz-ink);
    background: var(--biz-surface-soft);
  }

  .phone.app-theme-refined :is(.next-home-promo-action, .feature-promo > button:last-child):hover {
    text-decoration: underline;
    text-underline-offset: var(--biz-space-1);
  }
}

/* Approved cafe collage: live copy on the right, connected services on the left. */
.phone .next-home-promo.next-home-promo-illustrated {
  min-height: 0;
  padding: 8px 16px;
  display: grid;
  grid-template-columns: minmax(max-content, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: #fff;
}

.phone .next-home-promo.next-home-promo-illustrated::after {
  content: none;
}

.phone .next-home-promo-illustrated > div.next-home-promo-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: start;
  overflow-wrap: anywhere;
}

.phone .next-home-promo-illustrated > .next-home-promo-copy > small {
  grid-area: auto;
  align-self: stretch;
  padding: 0;
  color: var(--biz-muted, #626b65);
  font-family: var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif);
  font-size: var(--biz-text-caption, 12px) !important;
  line-height: var(--biz-line-caption, 20px);
}

.phone .next-home-promo-illustrated > .next-home-promo-copy > h2 {
  margin: 0;
  color: var(--biz-ink, #202422);
  font-family: var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif);
  font-size: var(--biz-text-body, 14px) !important;
  line-height: var(--biz-line-body, 24px);
  text-wrap: pretty;
}

.phone .next-home-promo-illustrated > .next-home-promo-copy > .next-home-promo-description {
  min-width: 0;
  max-width: none;
  margin: 0;
  color: var(--biz-muted, #626b65);
  font-family: var(--biz-font-regular, "Vazirmatn", Tahoma, sans-serif);
  font-size: var(--biz-text-caption, 12px) !important;
  line-height: var(--biz-line-caption, 20px);
  white-space: nowrap;
}

.phone .next-home-promo-illustrated > .next-home-promo-art {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin-top: 8px;
  display: block;
  pointer-events: none;
}

.phone .next-home-promo-art > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.phone .next-home-promo-illustrated > .next-home-promo-dismiss {
  top: 4px;
  left: 4px;
  background: transparent;
}

/* Align the label near the copy while retaining the full 48px touch target. */
.phone .next-home-promo-illustrated > .next-home-promo-copy > .next-home-promo-action {
  justify-self: start;
  align-self: flex-start;
  align-items: flex-start;
  width: fit-content;
  min-height: var(--biz-touch, 48px);
  margin: 4px 0 0;
  gap: 4px;
  color: var(--biz-brand, #0056f5);
  font-family: var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif);
  font-size: var(--biz-text-caption, 12px) !important;
  line-height: var(--biz-line-caption, 20px);
  white-space: nowrap;
}

@media (max-width: 360px) {
  .phone .next-home-promo.next-home-promo-illustrated {
    padding: 8px 12px;
    grid-template-columns: minmax(max-content, 1.4fr) minmax(0, 1fr);
    gap: 8px;
  }
}
