/* =========================================
   スマホ専用トップページ
   PC表示には影響させない
   ========================================= */

.sp-home {
  display: none;
}

@media screen and (max-width: 768px) {

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    background: #fff !important;
    color: #222;
    -webkit-text-size-adjust: 100%;
  }

  body {
    padding-bottom: 68px !important;
  }

  /* スマホでは、sp-home 以外の古いPC用レイアウトを隠す */
  .sp-home {
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.75;
    color: #222;
    background: #fff;
  }

  .sp-home ~ * {
    display: none !important;
  }

  .sp-home * {
    box-sizing: border-box;
  }

  .sp-hero {
    padding: 18px 18px 22px;
    border-top: 5px solid #22a63a;
    background: #f6fbf6;
  }

  .sp-logo {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.35;
    font-weight: bold;
    color: #158025;
  }

  .sp-lead {
    margin: 0 0 14px;
    font-size: 16px;
  }

  .sp-small {
    margin: 0;
    font-size: 14px;
    color: #555;
  }

  .sp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .sp-btn {
    display: block;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
  }

  .sp-btn-primary {
    color: #fff;
    background: #22a63a;
  }

  .sp-btn-secondary {
    color: #168226;
    background: #fff;
    border: 1px solid #22a63a;
  }

  .sp-section {
    padding: 22px 18px;
    border-bottom: 1px solid #e6e6e6;
  }

  .sp-section h2 {
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 5px solid #22a63a;
    font-size: 20px;
    line-height: 1.45;
    color: #158025;
  }

  .sp-section p {
    margin: 0 0 12px;
    font-size: 16px;
  }

  .sp-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sp-card {
    display: block;
    padding: 14px;
    border: 1px solid #d8e8d8;
    border-radius: 8px;
    background: #fff;
    color: #222;
    text-decoration: none;
  }

  .sp-card strong {
    display: block;
    margin-bottom: 4px;
    color: #158025;
    font-size: 17px;
  }

  .sp-card span {
    display: block;
    font-size: 14px;
    color: #444;
    line-height: 1.55;
  }

  .sp-info {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .sp-info li {
    margin: 0 0 8px;
    font-size: 15px;
  }

  .sp-note {
    font-size: 14px;
    color: #555;
  }

  .sp-fixed-contact {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  }

  .sp-fixed-contact a {
    flex: 1;
    display: block;
    padding: 12px 4px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.3;
    color: #fff;
    background: #22a63a;
    border-right: 1px solid rgba(255, 255, 255, 0.45);
  }

  .sp-fixed-contact a:last-child {
    border-right: none;
  }
}
/* ご相談について欄の崩れ対策 */
@media screen and (max-width: 768px) {

  .sp-info {
    display: block !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .sp-info li {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    float: none !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    white-space: normal !important;
  }

  .sp-info li strong {
    display: inline-block !important;
    min-width: 5.5em !important;
    font-weight: bold !important;
  }

  .sp-note {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    margin: 12px 0 0 !important;
    padding: 12px !important;
    border-radius: 6px !important;
    background: #f6fbf6 !important;
    color: #555 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
  }
}