/* Mobile-only spacing and form refinements. */

.mobile-plan-summary {
  display: none;
}

@media (max-width: 767px) {
  /* Keep the home-page entrance compact, including when an optional summary
     section is inserted between the hero and the main introduction. */
  .hero.hero--refreshed {
    padding-bottom: 12px;
  }

  .hero.hero--refreshed + .about {
    padding-top: 0;
  }

  .hero.hero--refreshed + .about .section-title,
  .mobile-plan-summary + .about .section-title {
    margin-top: 16px;
  }

  .mobile-plan-summary {
    display: block;
    margin: 0 20px;
    padding: 14px 16px;
    border: 1px solid #dce8e1;
    border-radius: 12px;
    background: #f4f8f5;
  }

  .mobile-plan-summary + .about {
    padding-top: 0;
  }

  .mobile-plan-summary > h2 {
    margin: 0 0 10px;
    color: #173e32;
    font-size: 16px;
    line-height: 1.5;
  }

  .mobile-plan-summary > p {
    margin: 0 0 10px;
    color: #5c6c64;
    font-size: 14px;
    line-height: 1.6;
  }

  .mobile-plan-summary > dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
  }

  .mobile-plan-summary > dl > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #d4e2da;
    border-radius: 9px;
    background: #fff;
  }

  .mobile-plan-summary dt,
  .mobile-plan-summary dd {
    margin: 0;
  }

  .mobile-plan-summary dt {
    color: #52645b;
    font-size: 14px;
    line-height: 1.45;
  }

  .mobile-plan-summary dd {
    margin-top: 2px;
    color: #0c5d3f;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .mobile-plan-summary > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 9px 12px;
    border: 1px solid #126347;
    border-radius: 9px;
    background: #fff;
    color: #126347;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
  }

  .mobile-plan-summary > a:hover,
  .mobile-plan-summary > a:focus-visible {
    background: #eaf4ef;
    text-decoration: none;
  }

  /* The automatic card grid becomes too narrow at 320–430px. */
  #moushikomiForm .choice-grid--2,
  #moushikomiForm .choice-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  #moushikomiForm .choice__box {
    padding: 1.4rem 1.5rem;
  }

  #moushikomiForm .choice__meta,
  #moushikomiForm .choice__price,
  #moushikomiForm .choice__cov,
  #moushikomiForm .choice__cov-v small {
    font-size: 1.4rem;
  }

  #moushikomiForm .choice__cov li {
    display: grid;
    grid-template-columns: minmax(9.6rem, 42%) minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem;
    line-height: 1.55;
  }

  #moushikomiForm .choice__cov-k {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #moushikomiForm .choice__cov-v {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #moushikomiForm input[type="text"],
  #moushikomiForm input[type="email"],
  #moushikomiForm input[type="tel"],
  #moushikomiForm input[type="date"],
  #moushikomiForm input[type="number"],
  #moushikomiForm select,
  #moushikomiForm textarea,
  #renewalForm input[type="text"],
  #renewalForm input[type="email"],
  #renewalForm textarea {
    font-size: 16px;
  }

  .faq {
    margin-block: 2.4rem;
  }

  .renewal-section p.note--lead {
    margin-bottom: 1.6rem;
  }

  /* A QR code is redundant on the phone that is displaying the page. Hide it
     only when the same LINE contact group still contains a usable button. */
  .contact-line:has(> .line-btn) > .contact-qr {
    display: none;
  }

  .contact-line .line-btn {
    min-height: 44px;
  }
}

@media (max-width: 359px) {
  #moushikomiForm .choice__box {
    padding-inline: 1.3rem;
  }

  #moushikomiForm .choice__cov li {
    grid-template-columns: minmax(8.8rem, 40%) minmax(0, 1fr);
    gap: 0.6rem;
  }
}
