/* ============================================================
   style-fix.css — 追加修正スタイル
   ============================================================ */

/* ---- ページ全体 max-width 1800px 制限 ----------------------- */
/* メインコンテンツ・フッター含む全体を 1800px に制限し中央表示  */
body {
  max-width: 1800px;
  margin: 0 auto;
}

/* ヘッダーは position:fixed のため個別に対応                   */
/* left:50%+translateX(-50%) で1800px幅を中央固定               */
.site-header {
  max-width: 1800px;
  left: 50%;
  transform: translateX(-50%);
}

/* ---- 明細モーダルアニメーション：フェードのみ（ズレ防止） --- */
/* scale/translateY を使うと「下にズレて見える」ためフェードのみ */
@keyframes billModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* フローティングボタンも 1800px 範囲内に収める                 */
/* 1800px超の画面: right = (viewport - 1800px) / 2 + 18px      */
/* calc(max()) により 1800px以下では right: 18px のまま          */
.floating-contact {
  right: calc(max(18px, (100vw - 1800px) / 2 + 18px));
}

/* ---- キャリアボタン：ポインターカーソル無効化 --------------- */
/* ドコモ・au・ソフトバンクカードはリンクなし → 指カーソル不要  */
.carrier-buttons .carrier {
  cursor: default;
}

/* ---- キャリアボタン：文字サイズ調整 ------------------------- */
/* 3つを視覚的に揃える（au も含めて統一）                       */
.carrier.au       { font-size: 17px; }   /* au（英字・現22px→17px） */
.carrier.docomo   { font-size: 17px; }   /* ドコモ（3文字） */
.carrier.softbank { font-size: 15px; }   /* ソフトバンク（6文字） */

/* ---- reasonカード画像：コンテナが画像に合わせて伸縮する設計 --- */
/* height固定+object-fit:coverは画像をトリミングするため廃止       */
/* → height:autoで画像の自然な高さのままコンテナが広がる           */
.reason-card > img {
  height: auto;           /* 自然高さ（トリミングなし） */
  object-fit: initial;    /* クロップしない */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ---- dx-card-image も同様にコンテナ伸縮設計に変更 ------------- */
/* 人事労務・コミュニケーション・バックオフィス・セールスの右側画像 */
.dx-card-image {
  height: auto;           /* 自然高さ（トリミングなし） */
  object-fit: initial;    /* クロップしない */
  border-radius: 4px;
}

/* ---- 改行ユーティリティ ---------------------------------- */
/* PC では非表示・スマホで改行 */
.br-sp { display: none; }

/* スマホでは非表示・PCで改行（必要な場合） */
/* .br-pc { display: inline; } */

@media (max-width: 767px) {
  .br-sp { display: block; }   /* スマホで改行を表示 */
  /* .br-pc { display: none; } */

  /* モバイルでも height:auto を維持（styles.css の固定値を上書き） */
  .reason-card > img,
  .dx-card-image {
    height: auto;
    object-fit: initial;
  }

  /* ---- 導入事例カード：SPで全画像表示（絡み排し変更） ---- */
  /* 絶対配置+251px topパディングを撤廃し、画像インフローに */
  .case-card {
    min-height: unset;
    padding: 0;
    overflow: hidden;
  }
  .case-card > img {
    position: static;     /* インフローに戻す */
    width: 100%;
    height: auto;         /* 自然高さ（トリミングなし） */
    object-fit: initial;
    border-radius: 8px 8px 0 0;
  }
  /* 画像の次のここからパディングを再適用 */
  .case-card > span {
    display: block;
    margin: 20px 20px 0;
  }
  .case-card > .industry {
    margin: 8px 20px 0;
  }
  .case-card > h3 {
    margin: 6px 20px 0;
  }
  .case-card > ul {
    margin: 8px 20px 20px;
    padding-left: 1.2em;
  }
}

/* ---- 送信ボタン（CF7）------------------------------------  */
.contact .wpcf7-form input[type="submit"] {
  background: #003893 !important;
  color: #ffffff !important;
}
.contact .wpcf7-form input[type="submit"]:hover { background: #0050cc !important; }

.mini-form .wpcf7-form input[type="submit"] {
  background: #003893 !important;
  color: #ffffff !important;
}
.mini-form .wpcf7-form input[type="submit"]:hover { background: #0050cc !important; }

/* ---- DXタイトル 緑アンダーライン（span.dx-marker方式）--------- */
/* h2::after の left 計算は画面幅依存で不安定なため、              */
/* テキストを span.dx-marker で囲みその幅に合わせて下線を引く方式に変更 */

/* 旧 h2::after を無効化 */
.dx-title h2::after {
  content: none;
}

/* span.dx-marker に緑アンダーラインを適用 */
.dx-title h2 .dx-marker {
  position: relative;
  display: inline;
}
.dx-title h2 .dx-marker::after {
  position: absolute;
  z-index: -1;
  left: -4px;
  right: -4px;
  bottom: 0px;
  height: 13px;
  content: "";
  transform: skewX(-20deg);
  background: rgba(181, 255, 11, 0.9);
}

/* ---- モバイル専用修正 ------------------------------------- */
@media (max-width: 767px) {

  /* SP コンテンツ幅を 335px → 90% に変更 */
  :root {
    --inner-width-sp: 90%;
  }

  /* 横スクロール防止 */
  html, body { overflow-x: hidden; }

  /* キャリアボタン：折り返し禁止 */
  .carrier { white-space: nowrap; }

  /* 明細リンク：テキストを1行目、ボタンを2行目に */
  .bill-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .bill-links span {
    flex-basis: 100%;
    text-align: center;
  }
  .bill-links br { display: none; } /* HTML側のbrはCSSで非表示 */

  /* 日本語テキストを句読点・自然な区切りで改行 */
  p, li, h1, h2, h3, h4, span, dt, dd {
    word-break: auto-phrase;
    overflow-wrap: break-word;
  }

  /* ---- お悩みセクション：Figma SPデザイン準拠・2カラム化 ---- */
  /* Figma仕様: カード 160×200px、gap 20px、5枚目中央寄せ      */
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: var(--inner-width-sp);
    margin-top: 32px;
  }

  /* .problem-card.lower の desktop指定（grid-column:span 2）を
     親子セレクタで詳細度を上げてリセット */
  .problem-grid .problem-card,
  .problem-grid .problem-card.lower,
  .problem-grid .problem-card.lower:first-of-type {
    grid-column: auto;
    min-height: 200px;
    padding: 16px 12px;
  }

  /* 5枚目カード：両カラムにまたがって中央寄せ（Figma準拠） */
  .problem-grid .problem-card:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 10px);
  }

  /* カードテキスト：Figma fs=14 に合わせる */
  .problem-card h3 {
    font-size: 14px;
    min-height: auto;
    margin-bottom: 10px;
  }

  /* カード画像：Figma image h=96 に合わせる */
  .problem-card img {
    height: 96px;
  }

  /* ---- DXタイトル 緑アンダーライン SP調整 ---------------------- */
  /* span.dx-marker::after の高さをSP用に調整                      */
  .dx-title h2 .dx-marker::after {
    height: 9px;
    bottom: 1px;
  }

  /* ---- 料金プラン 端末画像を20%縮小 -------------------------  */
  /* デスクトップ: スマホ 335px / ガラケー 340px → SP: 各×0.8    */
  .device-area {
    min-height: 240px;  /* 300px × 0.8 */
  }

  .device-area img {
    max-height: 268px;  /* 335px × 0.8 */
  }

  .plan-garake .device-area img {
    max-height: 272px;  /* 340px × 0.8 */
  }

  /* ================================================================
     お問い合わせフォーム（CF7）レスポンシブ対応
     Figma SP: w=375, フォーム白box=335px, 内側=315px
     ================================================================ */

  /* フォームラッパー */
  .contact .wpcf7-form {
    max-width: var(--inner-width-sp);   /* 335px */
    margin: 32px auto 0;
    padding: 20px 10px;                 /* 内側padding 10px */
    gap: 20px;                          /* 行間 Figma=20px */
  }

  /* 全ラベル：縦積み（ラベルテキスト上・入力欄下） */
  .contact .wpcf7-form label {
    grid-template-columns: 1fr;
    gap: 6px;                           /* Figma label→input gap=6px */
    align-items: flex-start;
  }

  /* キャリア＋回線数：Figma SP でも2カラム維持（173:130 ≈ 4:3） */
  .contact .form-row {
    grid-template-columns: 4fr 3fr;
    gap: 12px;                          /* Figma gap=12px */
  }

  /* form-row内のラベルも縦積みに */
  .contact .form-row label:first-child,
  .contact .form-row label:last-child {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* テキストエリア：Figma h=170px */
  .contact .wpcf7-form textarea {
    min-height: 170px;
  }

  /* 送信ボタン：Figma w=295px h=52px、中央寄せ */
  .contact .wpcf7-form input[type="submit"] {
    display: block;
    width: 295px;
    min-height: 52px;
    margin: 0 auto;
  }

  /* キャリア選択 select：「選択してください」が収まるよう調整 */
  /* 4fr列（≈173px）- padding - arrow ≈ 有効幅約120px。fs=14px で対応 */
  .contact .form-row select,
  .contact .form-row .wpcf7-form-control-wrap select {
    font-size: 14px;
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* SP_design_0701_v2 alignment overrides */
@media (max-width: 767px) {
  :root {
    --inner-width-sp: min(335px, calc(100vw - 40px));
  }

  .site-header {
    min-height: 49px;
    padding: 8px 10px;
  }

  .brand img {
    width: 102px;
  }

  .header-action {
    display: none;
  }

  .site-header::after {
    content: "";
    width: 20px;
    height: 14px;
    margin-left: auto;
    background:
      linear-gradient(#333 0 0) 0 0 / 100% 2px no-repeat,
      linear-gradient(#333 0 0) 0 6px / 100% 2px no-repeat,
      linear-gradient(#333 0 0) 0 12px / 100% 2px no-repeat;
  }

  .hero-inner {
    max-width: var(--inner-width-sp);
    padding-top: 32px;
  }

  .hero-badge {
    width: 291px;
    max-width: 100%;
    min-height: 47px;
    padding: 7px 18px;
    font-size: 16px;
    line-height: 1.35;
  }

  .hero-badge strong {
    font-size: 20px;
  }

  .carrier-buttons {
    width: 324px;
    max-width: 100%;
    gap: 12px;
  }

  .carrier {
    width: 100px;
    min-height: 36px;
    font-size: 14px;
  }

  .area-card {
    width: 334px;
    max-width: 100%;
    min-height: 201px;
    margin-top: 30px;
  }

  .simulator-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .simulator {
    width: var(--inner-width-sp);
    max-width: var(--inner-width-sp);
  }

  .simulator-heading {
    min-height: 70px;
    padding: 10px 20px;
  }

  .simulator-heading h2 {
    font-size: 16px;
    line-height: 1.7;
  }

  .simulator-form {
    padding: 30px 20px 18px;
    gap: 16px;
  }

  .simulator-form label {
    width: 295px;
    max-width: 100%;
    gap: 6px;
    font-size: 14px;
  }

  .simulator-form input,
  .simulator-form select {
    height: 38px;
    padding: 0 11px;
    font-size: 14px;
    border-radius: 4px;
  }

  .simulator-form label:has(input[name="lines"]) {
    position: relative;
  }

  .simulator-form label:has(input[name="lines"]) input {
    width: calc(100% - 24px);
  }

  .simulator-form label:has(input[name="lines"])::after {
    content: "台";
    position: absolute;
    right: 0;
    bottom: 10px;
    color: #555;
    font-size: 14px;
    line-height: 18px;
  }

  .simulator-form button {
    width: 315px;
    max-width: calc(100% + 20px);
    height: 42px;
    margin: 4px -10px 0;
    font-size: 14px;
  }

  .bill-links {
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 30px;
    font-size: 14px;
  }

  .bill-links span {
    flex-basis: auto;
    font-size: 0;
  }

  .bill-links span::before {
    content: "明細のご確認箇所はこちら";
    font-size: 14px;
  }

  .problem {
    padding-top: 50px;
    padding-bottom: 86px;
  }

  .problem-grid {
    width: min(340px, calc(100vw - 35px));
    max-width: none;
    grid-template-columns: repeat(2, 160px);
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
  }

  .problem-grid .problem-card,
  .problem-grid .problem-card:last-child {
    width: 160px;
    min-height: 200px;
    padding: 16px 10px;
  }

  .problem-message {
    font-size: 22px;
    line-height: 1.7;
  }

  .reason {
    padding: 50px 20px;
  }

  .reason-grid {
    max-width: 335px;
    gap: 30px;
    margin-top: 31px;
  }

  .reason-card {
    width: 335px;
    min-height: 402px;
    padding-top: 20px;
    overflow: visible;
  }

  .reason-card:nth-child(2),
  .reason-card:nth-child(4) {
    min-height: 426px;
  }

  .reason-card-title {
    width: 335px;
    min-height: 48px;
    margin: 0;
    padding: 12px 12px 12px 63px;
  }

  .reason-card-title span {
    left: 36px;
    top: -5px;
    width: 45px;
    height: 45px;
    font-size: 26px;
    letter-spacing: -1px;
  }

  .reason-card-title h3 {
    font-size: 16px;
    line-height: 1.5;
    white-space: nowrap;
  }

  .reason-card > img {
    width: 286px;
    max-width: calc(100% - 50px);
    height: 190px;
    margin-top: 24px;
    object-fit: cover;
  }

  .reason-card p {
    width: 286px;
    max-width: calc(100% - 50px);
    margin: 24px auto;
    font-size: 16px;
    line-height: 1.5;
  }

  .plan {
    padding: 50px 20px;
  }

  .plan-grid {
    max-width: 335px;
    gap: 40px;
    margin-top: 31px;
  }

  .plan-card {
    position: relative;
    width: 335px;
    border-radius: 8px;
  }

  .plan-card h3 {
    height: 40px;
    padding: 8px 20px;
    font-size: 16px;
    line-height: 24px;
  }

  .device-area {
    position: relative;
    display: block;
    height: 432px;
    min-height: 0;
    padding: 0;
  }

  .plan-garake .device-area {
    height: 406px;
  }

  .device-area img {
    position: absolute;
    top: 16px;
    left: 21px;
    width: auto !important;
    max-width: none;
    height: 194px;
    max-height: none;
    object-fit: contain;
  }

  .plan-smartphone .device-area img {
    width: 89px !important;
    height: 194px;
  }

  .plan-garake .device-area img {
    top: 14px;
    left: 40px;
    width: 53px !important;
    height: 197px;
  }

  .price {
    position: absolute;
    top: 100px;
    right: 16px;
    left: 118px;
    margin: 0;
    text-align: center;
    font-size: 26px;
    line-height: 1.2;
  }

  .price strong {
    font-size: 32px;
  }

  .tax {
    position: absolute;
    top: 143px;
    right: 16px;
    left: 118px;
    margin: 0;
    font-size: 14px;
    text-align: center;
  }

  .data-row {
    position: absolute;
    top: 270px;
    right: 16px;
    left: 16px;
    display: block;
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid #ddd;
  }

  .plan-garake .data-row {
    top: 271px;
  }

  .data-row > span {
    display: block;
    width: 70px;
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 14px;
    text-align: center;
  }

  .data-options {
    display: block;
  }

  .data-line {
    justify-content: flex-start;
    gap: 5px;
  }

  .plan-smartphone .data-line:first-child {
    width: 166px;
    row-gap: 5px;
    margin-bottom: 5px;
  }

  .plan-garake .data-line:first-child {
    width: 171px;
    margin-bottom: 6px;
  }

  .data-row b {
    min-height: 22px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 14px;
  }

  .plan-card small {
    position: absolute;
    top: 402px;
    right: 16px;
    left: 16px;
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
  }

  .plan-garake small {
    top: 376px;
  }

  .plan-card ul {
    padding: 16px;
    font-size: 13px;
  }

  .plan-card li {
    padding-left: 24px;
    font-size: 13px;
    line-height: 1.6;
  }

  .plan-card li + li {
    margin-top: 10px;
  }

  .plan-cta {
    width: 295px;
    max-width: 100%;
    margin-top: 32px;
  }

  .dx {
    padding: 50px 20px;
  }

  .dx-title {
    width: 335px;
    min-height: 103px;
    padding: 8px 18px;
  }

  .dx-title h2 {
    font-size: 24px;
    line-height: 1.3;
  }

  .dx h3 {
    margin-top: 20px;
    font-size: 20px;
    line-height: 1.4;
  }

  .dx-lead {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
  }

  .dx-visual {
    width: 335px;
    max-width: 100%;
    margin-top: 30px;
  }

  .dx-visual img {
    width: 100%;
    height: auto;
  }

  .dx-list {
    max-width: 335px;
    gap: 24px;
    margin-top: 30px;
  }

  .dx-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .dx-card-image {
    order: -1;
    width: 100%;
    height: 230px;
    border-radius: 0;
    object-fit: cover;
  }

  .dx-card-body > div {
    padding: 16px;
  }

  .dx-card h5 {
    font-size: 18px;
    line-height: 1.5;
  }

  .dx-card p {
    font-size: 14px;
    line-height: 1.8;
  }

  .dx-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 16px;
  }

  .dx-logos img {
    width: 100%;
    max-width: none;
    height: 40px;
    padding: 8px;
    object-fit: contain;
  }

  .case-studies {
    padding: 50px 20px;
  }

  .case-list {
    max-width: 335px;
    gap: 20px;
    margin-top: 30px;
  }

  .case-card {
    width: 335px;
    max-width: 100%;
    padding: 0;
  }

  .case-card > img {
    position: static;
    width: 100%;
    height: 251px;
    object-fit: cover;
  }

  .case-card span {
    margin: 16px 0 0 20px;
  }

  .case-card .industry {
    margin: 16px 20px 0 10px;
    font-size: 15px;
  }

  .case-card h3 {
    margin: 8px 20px 0;
    padding-bottom: 8px;
    font-size: 16px;
    line-height: 1.6;
  }

  .case-card ul {
    margin: 8px 20px 16px;
  }

  .case-card li {
    font-size: 14px;
    line-height: 1.6;
  }

  .flow {
    padding: 50px 20px;
  }

  .flow-list {
    max-width: 335px;
    gap: 30px;
    margin-top: 30px;
  }

  .flow-list li {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 16px;
    align-items: center;
    min-height: 0;
    padding: 16px;
  }

  .flow-list li > span {
    width: 52px;
    height: 52px;
  }

  .flow-list li > div {
    display: contents;
  }

  .flow-list h3 {
    align-self: center;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
  }

  .flow-list p {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
  }

  .faq {
    padding: 50px 20px;
  }

  .faq-list {
    max-width: 335px;
    margin-top: 30px;
  }

  .faq-list details {
    border-radius: 6px;
  }

  .faq-list summary {
    min-height: 58px;
    padding: 18px 52px 18px 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .faq-list details[open] summary {
    min-height: 80px;
  }

  .offices {
    padding: 50px 20px;
  }

  .office-card {
    max-width: 335px;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .office-text {
    padding: 0;
  }

  .office-map {
    width: 335px;
    max-width: 100%;
    margin-top: 30px;
  }

  .office-map img {
    width: 100%;
    height: auto;
  }

  .contact {
    padding: 50px 20px;
  }

  .contact .wpcf7-form {
    max-width: 335px;
    padding: 30px 10px;
    gap: 20px;
  }

  .contact input,
  .contact select {
    height: 48px;
  }

  .contact textarea {
    height: 171px;
  }

  .contact .submit-wrap input {
    width: 295px;
    max-width: 100%;
    height: 52px;
  }
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  :root {
    --inner-width: calc(100vw - 40px);
  }

  .site-header {
    min-height: 64px;
    padding: 12px 20px;
  }

  .brand img {
    width: 112px;
  }

  .brand span {
    max-width: 180px;
    white-space: normal;
  }

  .header-action {
    gap: 8px;
    font-size: 12px;
  }

  .header-button {
    min-height: 40px;
    padding: 10px 14px;
    font-size: 12px;
  }

  .hero-inner,
  .simulator,
  .problem-grid,
  .reason-grid,
  .plan-grid,
  .dx-inner,
  .case-list,
  .flow-list,
  .faq-list,
  .office-card,
  .contact .wpcf7-form {
    max-width: var(--inner-width);
  }

  .hero {
    min-height: 720px;
    background-position: center top;
  }

  .hero-inner {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero h1 {
    font-size: clamp(34px, 4.2vw, 46px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .simulator-form {
    grid-template-columns:
      minmax(150px, 0.95fr)
      minmax(180px, 1.25fr)
      minmax(110px, 0.7fr)
      minmax(140px, 0.75fr);
    gap: 14px;
    padding: 28px 24px;
  }

  .simulator-form input,
  .simulator-form select {
    min-width: 0;
  }

  .simulator-form button {
    width: 100%;
    min-width: 0;
    padding-right: 16px;
    padding-left: 16px;
    white-space: nowrap;
  }

  .reason-grid,
  .plan-grid,
  .dx-list,
  .case-list {
    gap: 24px;
  }

  .reason-card-title h3,
  .dx-card h5,
  .case-card h3,
  .flow-list h3 {
    overflow-wrap: anywhere;
  }

  .device-area {
    min-height: 280px;
  }

  .data-row {
    grid-template-columns: 76px 1fr;
    gap: 10px;
  }

  .data-line {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .dx-card-body {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
    gap: 22px;
  }

  .dx-logos {
    gap: 10px;
  }

  .dx-logos img {
    max-width: 132px;
  }

  .case-card {
    grid-template-columns: minmax(200px, 0.92fr) minmax(0, 1fr);
  }

  .flow-list li {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 20px;
  }

  .office-card {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  }

  .office-text {
    padding: 32px 28px;
  }
}

@media (min-width: 768px) and (max-width: 880px) {
  .simulator-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .simulator-form button {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 320px;
  }

  .dx-card-body,
  .case-card,
  .office-card {
    grid-template-columns: 1fr;
  }

  .dx-card-image {
    width: 100%;
  }

  .office-map {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  :root {
    --inner-width-sp: min(700px, calc(100vw - 40px));
  }

  .hero-inner,
  .simulator,
  .dx-inner,
  .dx-title,
  .dx-visual,
  .dx-list,
  .flow-list,
  .faq-list,
  .office-card,
  .contact .wpcf7-form {
    width: var(--inner-width-sp);
    max-width: var(--inner-width-sp);
  }

  .area-card {
    width: var(--inner-width-sp);
    max-width: var(--inner-width-sp);
  }

  .simulator-form label {
    width: 100%;
  }

  .simulator-form button {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .problem-grid {
    width: var(--inner-width-sp);
    max-width: var(--inner-width-sp);
    grid-template-columns: repeat(auto-fit, minmax(160px, 160px));
    justify-content: center;
  }

  .reason-grid,
  .plan-grid,
  .case-list {
    width: var(--inner-width-sp);
    max-width: var(--inner-width-sp);
  }

  .reason-card,
  .reason-card-title,
  .case-card {
    width: 100%;
  }

  .reason-card-title h3 {
    white-space: normal;
  }

  .reason-card > img,
  .reason-card p {
    width: calc(100% - 50px);
  }

  .plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(335px, 335px));
    justify-content: center;
  }

  .dx-card {
    width: 100%;
  }

  .office-map {
    width: 100%;
  }

  .contact .wpcf7-form {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (min-width: 700px) and (max-width: 767px) {
  .plan-grid {
    gap: 30px;
  }

  .reason-grid,
  .dx-list,
  .case-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .reason-card > img {
    height: auto;
    object-fit: contain;
  }

  .reason-card p {
    font-size: 14px;
  }

  .dx-card-image {
    height: auto;
    object-fit: contain;
  }

  .case-card > img {
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 767px) {
  .reason-card > img,
  .dx-card-image,
  .case-card > img {
    height: auto;
    object-fit: contain;
  }

  .dx-card-image,
  .case-card > img {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .carrier-buttons {
    width: var(--inner-width-sp);
    max-width: var(--inner-width-sp);
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  .carrier {
    flex: 0 1 100px;
    width: 100px;
    min-height: 36px;
    font-size: 14px;
  }

  .bill-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
  }

  .bill-links br {
    display: none;
  }

  .bill-links span {
    flex: 0 0 100%;
    font-size: 0;
    text-align: center;
  }

  .bill-links span::before {
    content: "明細のご確認箇所はこちら";
    font-size: 14px;
  }

  .bill-link-btn {
    margin: 0;
  }
}

@media (min-width: 560px) and (max-width: 767px) {
  .problem-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    width: 520px;
    max-width: 100%;
    gap: 20px;
    margin-right: auto;
    margin-left: auto;
  }

  .problem-grid .problem-card,
  .problem-grid .problem-card.lower,
  .problem-grid .problem-card.lower:first-of-type,
  .problem-grid .problem-card:last-child {
    flex: 0 0 160px;
    width: 160px;
  }

  .area-card {
    min-height: 150px;
    padding-top: 62px;
    padding-bottom: 22px;
  }

  .area-card::before {
    width: min(420px, calc(100% - 100px));
    height: 45px;
  }

  .area-card > p {
    top: 8px;
    width: min(340px, calc(100% - 130px));
    font-size: 12px;
    line-height: 1.45;
  }

  .area-card dl {
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 0 24px;
  }
}

@media (max-width: 767px) {
  .dx-title {
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 16px;
  }
}

@media (max-width: 767px) {
  .case-card > span {
    display: inline-flex;
    width: auto;
    max-width: max-content;
    min-width: 67px;
    min-height: 24px;
    margin: 16px 0 0 20px;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 18px;
  }

  .case-card > .industry {
    display: inline-block;
    margin: 16px 20px 0 10px;
    font-size: 15px;
    line-height: 1.6;
    vertical-align: middle;
  }

  .case-card > h3 {
    margin: 10px 20px 0;
  }

  .case-card > ul {
    margin: 12px 20px 20px;
  }
}

@media (max-width: 767px) {
  .area-card > p {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

@media (min-width: 560px) and (max-width: 767px) {
  .area-card > p {
    top: -3px;
    height: 45px;
  }
}

@media (max-width: 767px) {
  .area-card {
    min-height: 0;
    height: auto;
    padding-top: 58px;
    padding-bottom: 14px;
  }

  .area-card dl {
    margin-bottom: 0;
  }

  .area-card small {
    margin-top: 2px;
  }
}

.faq-list summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 6px;
  align-items: start;
}

.faq-list summary::before {
  margin-right: 0;
}

.faq-list summary::after {
  grid-column: auto;
}

#simulation,
#reason,
#plan,
#dx,
#cases,
#flow,
#faq,
#offices,
#contact {
  scroll-margin-top: 84px;
}

.menu-toggle,
.sp-menu {
  display: none;
}

@media (max-width: 767px) {
  #simulation,
  #reason,
  #plan,
  #dx,
  #cases,
  #flow,
  #faq,
  #offices,
  #contact {
    scroll-margin-top: 64px;
  }

  .site-header::after {
    display: none !important;
    content: none !important;
  }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #333333;
  }

  .sp-menu {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: block;
    pointer-events: none;
  }

  .sp-menu[hidden] {
    display: none !important;
  }

  .sp-menu.is-open {
    pointer-events: auto;
  }

  .sp-menu__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .sp-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(340px, calc(100vw - 35px));
    height: min(693px, 100vh);
    height: min(693px, 100dvh);
    min-height: min(580px, 100vh);
    min-height: min(580px, 100dvh);
    overflow-y: auto;
    padding: 80px 22px 113px;
    border-radius: 12px 0 12px 12px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.22s ease;
  }

  .sp-menu.is-open .sp-menu__panel {
    transform: translateX(0);
  }

  .sp-menu__close {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .sp-menu__close span {
    position: absolute;
    top: 19px;
    left: 10px;
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #003893;
  }

  .sp-menu__close span:first-child {
    transform: rotate(45deg);
  }

  .sp-menu__close span:last-child {
    transform: rotate(-45deg);
  }

  .sp-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(280px, 100%);
    margin: 0 auto;
  }

  .sp-menu__nav a {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 37px;
    padding: 0 0 14px;
    border-bottom: 0.5px solid #cccccc;
    color: #222222;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
  }

  .sp-menu__cta {
    position: absolute;
    top: 528px;
    left: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 44px);
    height: 52px;
    border-radius: 28px;
    background: #003893;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  body.admin-bar .sp-menu {
    top: 46px;
  }

  body.admin-bar .sp-menu__panel {
    height: min(693px, calc(100vh - 46px));
    height: min(693px, calc(100dvh - 46px));
    min-height: min(580px, calc(100vh - 46px));
    min-height: min(580px, calc(100dvh - 46px));
  }

  body.sp-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .offices {
    padding: 50px 20px;
    background: #ffffff;
  }

  .offices .section-heading {
    width: 335px;
    max-width: 100%;
    margin: 0 auto;
  }

  .office-card {
    display: block;
    width: min(335px, calc(100vw - 40px));
    max-width: 335px;
    margin: 30px auto 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .office-text {
    padding: 0;
  }

  .office-text > p {
    margin: 0 0 30px;
    color: #333333;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
  }

  .office-text dl {
    margin: 0 0 30px;
  }

  .office-text dl > div {
    display: block;
    padding: 0 0 16px;
    border-bottom: 1px dotted #cfcfcf;
  }

  .office-text dl > div + div {
    padding-top: 16px;
  }

  .office-text dt {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    color: #003893;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
  }

  .office-text dt::before {
    width: 16px;
    height: 16px;
  }

  .office-text dd {
    margin: 0;
    padding-left: 22px;
    color: #222222;
    font-size: 14px;
    line-height: 1.65;
  }

  .office-text dd + dd {
    margin-top: 4px;
  }

  .office-map {
    position: relative;
    width: min(335px, 100%);
    max-width: 335px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: #e9f6ff;
  }

  .office-map img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .office-map p {
    top: 16px;
    right: auto;
    left: 50%;
    display: grid;
    place-items: center;
    width: max-content;
    max-width: calc(100% - 32px);
    min-height: 0;
    padding: 6px 20px;
    background: rgb(1 101 189 / 80%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    transform: translateX(-50%);
  }
}

@media (max-width: 360px) {
  .office-text > p,
  .office-text dd {
    font-size: 13px;
  }

  .office-map p {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .hero .carrier {
    flex: 0 0 100px;
    width: 100px;
    min-height: 36px;
    height: 36px;
    padding: 0 6px;
    line-height: 1;
    letter-spacing: 0;
  }

  .hero .carrier.au {
    font-size: 15.5px;
  }

  .hero .carrier.docomo {
    font-size: 14px;
  }

  .hero .carrier.softbank {
    padding-right: 4px;
    padding-left: 4px;
    font-size: 13px;
  }
}
