@charset "UTF-8";
.dummy-reset { display: block; }

.office-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.office-card * { box-sizing: border-box; }
.office-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); }

/* =========================================
   2. ヘッダー（背景透明にしてカード全体のグラデーションに馴染ませる）
   ========================================= */
.office-card header {
  background: transparent;
  margin: 0 0 12px 0;
  padding: 0;
  border-bottom: none;
}

.office-card .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0 0 8px 0;
}
.office-card .badges li {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.2;
}

/* グレード6分類 */
.b-luxury   { background: #f4ebf2; color: #7c366b; } /* 最上級ハイグレード */
.b-std      { background: #e8eff5; color: #3a5a78; } /* 大手運営・ハイグレード */
.b-local    { background: #f5efe8; color: #785334; } /* 地域密着・独立系 */
.b-cost     { background: #faeee6; color: #a84b19; } /* 初期費用0円・格安 / リーズナブル・コスパ重視 */
.b-creative { background: #ecebf7; color: #49428a; } /* スタートアップ・交流重視 */
.b-public   { background: #eff2e6; color: #4d5e24; } /* 自治体認定・創業支援 */

/* 受付・ビル・アクセス・ネットワーク・特典 */
.b-reception { background: #f9ebeb; color: #9c3b46; } /* 受付常駐 */
.b-bigbang   { background: #f7f0dc; color: #826214; } /* 天神ビッグバン認定ビル */
.b-area      { background: #f1f5f9; color: #475569; } /* 一般エリア・ビル特性（一棟オフィス等） */
.b-direct    { background: #e4f2f1; color: #23635e; } /* 駅直結・徒歩1分 */
.b-walk      { background: #edf4ea; color: #3f6634; } /* 駅徒歩◯分 */
.b-network   { background: #e6eefc; color: #264b8c; } /* 全国・他拠点利用OK */
.b-perk      { background: #e6f3f8; color: #1d5d7a; } /* 特典・無料設備（会議室無料等） */

.office-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.35;
}
@media (min-width: 768px) {
.office-card h3 { font-size: 22px; } }
.office-card h3 a { color: #0f172a; text-decoration: none; }
.office-card h3 a:hover { color: #2563eb; text-decoration: underline; }

/* ヘッダー内の最寄駅（住所より重要度が高いため少し濃い色で視認性を高める） */
/* ヘッダー内の最寄駅（100%表示されるSVG電車アイコン） */
.office-card .station {
  position: relative;
  padding-left: 20px;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
  margin: 0 0 4px 0;
  line-height: 1.45;
}

.office-card .station::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 15px;
  height: 15px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzBmNzY2ZSI+PHBhdGggZD0iTTEyIDJjLTQgMC04IC41LTggNHY5LjVDNCAxNy40MyA1LjU3IDE5IDcuNSAxOUw2IDIwLjV2LjVoMi4yM2wyLTJIMTRsMiAyaDJ2LS41TDE2LjUgMTljMS45MyAwIDMuNS0xLjU3IDMuNS0zLjVWNmMwLTMuNS0zLjU4LTQtOC00ek03LjUgMTdjLS44MyAwLTEuNS0uNjctMS41LTEuNVM2LjY3IDE0IDcuNSAxNHMxLjUuNjcgMS41IDEuNVM4LjMzIDE3IDcuNSAxN3ptMy41LTdINlY2aDV2NHptMiAwVjZoNXY0aC01em0zLjUgN2MtLjgzIDAtMS41LS42Ny0xLjUtMS41cy42Ny0xLjUgMS41LTEuNSAxLjUuNjcgMS41IDEuNS0uNjcgMS41LTEuNSAxLjV6Ii8+PC9zdmc+");
}

.office-card .station strong {
  color: #0f766e; /* 駅直結などの強調文字をティールグリーンで際立たせる */
  font-weight: 700;
}
.office-card .address {
  position: relative;
  padding-left: 20px; /* 電車アイコンと左端を揃える */
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.office-card .address::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 15px;
  height: 15px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzY0NzQ4YiI+PHBhdGggZD0iTTEyIDJDOC4xMyAyIDUgNS4xMyA1IDljMCA1LjI1IDcgMTMgNyAxM3M3LTcuNzUgNy0xM2MwLTMuODctMy4xMy03LTctN3ptMCA5LjVjLTEuMzggMC0yLjUtMS4xMi0yLjUtMi41czEuMTItMi41IDIuNS0yLjUgMi41IDEuMTIgMi41IDIuNS0xLjEyIDIuNS0yLjUgMi41eiIvPjwvc3ZnPg==");
}
.office-card .address a {
  color: #475569;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 2px;
}
.office-card .address a:hover { color: #2563eb; text-decoration-color: #2563eb; }

/* =========================================
   3. メインコンテンツ・ギャラリー・紹介文
   ========================================= */
.office-card .card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .office-card .card-body {
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
  }
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.thumbnail-grid img {
  width: 100% !important;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}
.thumbnail-grid img.main-preview {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  cursor: default;
}
.thumbnail-grid img:not(.main-preview) {
  aspect-ratio: 4 / 3;
  cursor: pointer;
  opacity: 0.75;
  border: 2px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.thumbnail-grid img:not(.main-preview):hover {
  opacity: 1;
}
.thumbnail-grid img.is-active {
  opacity: 1;
  border-color: #2563eb;
}

@keyframes fadeInImg {
  from { opacity: 0.4; }
  to { opacity: 1; }
}
.thumbnail-grid img.is-switching {
  animation: fadeInImg 0.3s ease forwards;
}

/* 白い吹き出し（純白・枠線なし・影を濃くして立体的に浮かせる） */
.office-card p.summary {
  display: block !important;
  position: relative !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 11px 13px !important;
  margin: 10px 0 0 0 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #334155 !important;
  /* 上・周囲の輪郭を濃くしつつ、下の影の長さを10px→5pxへ短縮 */
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.14), 0 -1px 4px rgba(15, 23, 42, 0.10), 0 0 1px rgba(15, 23, 42, 0.22) !important;
  z-index: 1;
}

.office-card p.summary {
  display: block !important;
  position: relative !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 11px 13px !important;
  margin: 10px 0 0 0 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #334155 !important;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.14), 0 -1px 4px rgba(15, 23, 42, 0.10), 0 0 1px rgba(15, 23, 42, 0.22) !important;
}

/* =========================================
   4. スペック比較テーブル（スマホでも改行なし横並び）
   ========================================= */
.office-card .specs {
  margin: 0;
  display: grid;
  grid-template-columns: 98px 1fr;
  border-top: none; /* スマホ時は実線を消す */
}
@media (min-width: 768px) {
  .office-card .specs {
    grid-template-columns: 105px 1fr; /* 項目名の幅 */
    border-top: 1px solid #e2e8f0; /* パソコン時は実線を残す */
  }
}

.office-card .specs dt,
.office-card .specs dd {
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.office-card .specs dt {
  font-weight: 700;
  color: #475569;
  font-size: 11.5px;
  padding-right: 8px;
}
@media (min-width: 768px) {
  .office-card .specs dt {
    font-size: 13px;
    justify-content: flex-end; /* 項目名を右揃え（中央軸揃え）にする */
    padding-right: 14px;       /* 項目名と内容の余白 */
  }
}
  .office-card .specs dd {
    font-size: 13.5px;
  }
}

/* 最後の行の下線を消す */
.office-card .specs dt:last-of-type,
.office-card .specs dd:last-of-type {
  border-bottom: none;
}

.office-card .price strong {
  color: #dc2626;
  font-size: 17px;
  font-weight: 800;
  margin-right: 4px;
}
@media (min-width: 768px) {
  .office-card .price strong {
    font-size: 19px;
  }
}
.office-card .price small {
  color: #64748b;
  font-size: 11.5px;
}

/* 対応プランタグ（ピル型・統一色） */
.office-card .plans {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.office-card .plans span {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  line-height: 1.3;
}

/* =========================================
   5. アクションエリア（CTAボタン）
   ========================================= */
.office-card footer {
  margin-top: 14px;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 768px) {
  .office-card footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.office-card .btn-official {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  padding: 10px 18px;
  font-size: 14px;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.22);
  transition: all 0.2s ease;
}
@media (min-width: 768px) {
  .office-card .btn-official {
    flex: 1;
    max-width: none; /* 【修正】380pxの横幅制限を解除して空きスペースまで広げる */
    margin-right: 16px; /* 右側の電話・比較ボタンとの間に適度な余白を確保 */
    flex-direction: row;
    gap: 6px;
    padding: 12px 20px;
    white-space: nowrap; /* 【追加】PC表示時は絶対に改行させず1行で美しく見せる */
  }
}
.office-card .btn-official:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  transform: translateY(-1px);
}
.office-card .btn-official small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.95;
}

.office-card .btn-sub-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
@media (min-width: 768px) {
  .office-card .btn-sub-group {
    display: flex;
    gap: 8px;
  }
}

.office-card .btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 9px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.office-card .btn-sub:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.office-card .btn-sub.is-added {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #3b82f6;
}

/* =========================================================
   第2層：その他のエリア内レンタルオフィス一覧（スリムカード）
   ========================================================= */
.other-offices {
  margin-top: 0px;
  margin-bottom: 0px;
}

.slim-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.slim-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.slim-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.slim-head h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
}

.slim-head h3 a {
  color: #0f172a;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
}

.slim-head h3 a:hover {
  color: #15803d;
  text-decoration-color: #15803d;
}

.slim-station {
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
}

.slim-address {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 4px 0;
}

.slim-meta {
  font-size: 12.5px;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

.slim-meta strong {
  color: #dc2626;
  font-weight: 700;
}

/* =========================================================
   スマホ（767px以下）専用：メルカリ風横スライド＋1画面収容レイアウト
   ========================================================= */
@media (max-width: 767px) {
  .office-card {
    padding: 12px !important;
    margin-bottom: 14px !important;
  }

  /* ヘッダー圧縮 */
  .office-card header {
    margin-bottom: 6px !important;
  }
  .office-card .badges {
    margin-bottom: 4px !important;
    gap: 3px !important;
  }
  .office-card .badges li {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .office-card h3 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 4px !important;
  }
  .office-card .station,
  .office-card .address {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    margin-bottom: 2px !important;
  }

  /* メディア部：1行目に紹介文、2行目にカルーセル枠を配置 */
  .office-card .card-body {
    gap: 6px !important;
  }
  .office-card .card-media {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
  }
  .office-card p.summary {
    order: 1 !important;
    padding: 7px 10px !important;
    margin: 0 0 6px 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  /* カルーセル外枠 */
  .office-card .carousel-wrapper {
    order: 2 !important;
    position: relative !important;
    width: 100% !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  /* グリッドを解除して横並びFlexスクロール（スワイプ）に強制変換 */
  .office-card .carousel-wrapper .thumbnail-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .office-card .carousel-wrapper .thumbnail-grid::-webkit-scrollbar {
    display: none !important;
  }

  /* 複製されたメイン画像を完全に消す */
  .office-card .carousel-wrapper .thumbnail-grid img.main-preview {
    display: none !important;
  }

  /* 元の4枚を横幅100%・高さ2:1のスライドにする */
  .office-card .carousel-wrapper .thumbnail-grid img:not(.main-preview) {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 2 / 1 !important;
    height: auto !important;
    object-fit: cover !important;
    scroll-snap-align: start !important;
    opacity: 1 !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  /* 右下の枚数カウンター（画像の内側右下に重ねる） */
  .office-card .carousel-wrapper .carousel-counter {
    position: absolute !important;
    right: 8px !important;
    bottom: 8px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }

  /* 下部ドットインジケーター（画像の内側中央下に重ねる） */
  .office-card .carousel-wrapper .carousel-dots {
    position: absolute !important;
    left: 50% !important;
    bottom: 8px !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 5px !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }
  .office-card .carousel-wrapper .carousel-dots span {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.5) !important;
  }
  .office-card .carousel-wrapper .carousel-dots span.is-active {
    background: #ffffff !important;
    transform: scale(1.2) !important;
  }

  /* スペック表の超コンパクト化 */
  .office-card .specs {
    font-size: 12px !important;
  }
  .office-card .specs dt,
  .office-card .specs dd {
    padding: 5px 6px !important;
    line-height: 1.35 !important;
  }
  .office-card .specs dd.price strong {
    font-size: 15px !important;
  }
  .office-card .specs dd.price small {
    font-size: 11px !important;
  }
  .office-card .plans {
    gap: 3px !important;
  }
  .office-card .plans span {
    font-size: 10.5px !important;
    padding: 1px 6px !important;
  }

  /* フッター（CTAボタン）圧縮 */
  .office-card footer {
    margin-top: 8px !important;
    gap: 6px !important;
  }
  .office-card .btn-official {
    padding: 9px 12px !important;
    font-size: 13.5px !important;
  }
  .office-card .btn-sub {
    padding: 7px 10px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 768px) {
  .office-card .carousel-counter,
  .office-card .carousel-dots {
    display: none !important;
  }
}

/* =========================================================
   条件絞り込みバー（フィルターUI）
   ========================================================= */
.filter-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0 18px 0;
}

.filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.filter-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.filter-count {
  font-size: 12.5px;
  color: #475569;
}

.filter-count strong {
  color: #15803d;
  font-size: 15px;
  font-weight: 700;
  margin: 0 2px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.filter-btn:hover {
  border-color: #15803d;
  color: #15803d;
}

.filter-btn.is-active {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
}

/* 絞り込みで非表示になったカード */
.office-card.is-hidden {
  display: none !important;
}

/* スマホ時のコンパクト調整 */
@media (max-width: 767px) {
  .filter-bar {
    padding: 10px 12px;
    margin: 12px 0 14px 0;
  }
  .filter-btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }
}
/* パソコン表示時のみ、左側の画像エリアを少し広げて写真を見やすくする */
@media (min-width: 768px) {
  .office-card .card-body {
    grid-template-columns: 340px 1fr !important; /* 左列を340pxに拡大（元が260〜280pxの場合） */
    gap: 18px !important;
  }
}

/* =========================================
   CVR最大化＆SEO両立のボタン配置レイアウト
   1段目：公式サイト（100%幅・圧倒的優先）
   2段目：解説ボタン(5) ＋ 控えめ電話(3) ＋ 比較(2)
   ========================================= */

/* 親コンテナ（既存の .card-actions 等に合わせて自動整列） */
:has(> .btn-official) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

/* 【1段目】公式サイトボタン：常に横幅100%で最優先の主役に */
:has(> .btn-official) > .btn-official {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 2px 0;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

/* 【2段目・左】解説ボタン：公式のすぐ下に隣接（Web回遊・SEO強化） */
.btn-detail-guide {
  flex: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  background-color: #339933;
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: bold;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid #287a28;
  transition: background-color 0.2s;
}

.btn-detail-guide:hover {
  background-color: #287a28;
  text-decoration: none;
}

/* 【2段目・中央】電話番号：公式に隣接させつつ控えめなデザインに抑える */
:has(> .btn-official) > .btn-tel,
:has(> .btn-official) > a[href^="tel:"] {
  flex: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 6px;
  background-color: #f8f9fa;
  color: #555555 !important;
  font-size: 12px;
  font-weight: normal;
  text-decoration: none;
  border: 1px solid #d0d7de;
  border-radius: 5px;
}

/* 【2段目・右】比較追加ボタン：補助機能としてコンパクトに配置 */
:has(> .btn-official) > .btn-compare {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 6px;
  font-size: 12px;
  border-radius: 5px;
}

/* スマホ表示時（640px以下）：公式100% → 解説100%（下余白広め） → 電話・比較を5:5均等横並び */
@media (max-width: 640px) {
  :has(> .btn-official) {
    gap: 10px;
  }
  .btn-detail-guide {
    flex: 0 0 100%;
    padding: 11px 12px;
    font-size: 13.5px;
    margin-bottom: 6px;
  }
  :has(> .btn-official) > .btn-tel,
  :has(> .btn-official) > a[href^="tel:"],
  :has(> .btn-official) > .btn-compare {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 9px 6px;
  }
}
/* =========================================================
   比較ボタン選択状態・画面下部トレイ・横並び比較モーダル
   ========================================================= */
.office-card .btn-compare.is-selected {
  background-color: #15803d;
  color: #ffffff;
  border-color: #15803d;
  font-weight: 700;
}

/* 画面下部固定トレイ */
.compare-tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0f172a;
  color: #ffffff;
  z-index: 9990;
  padding: 10px 16px;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.2s ease;
}
.compare-tray.is-visible {
  transform: translateY(0);
}
.compare-tray-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.compare-tray-info {
  min-width: 0;
  flex: 1;
}
.compare-tray-count {
  font-size: 12px;
  color: #94a3b8;
  display: block;
}
.compare-tray-count strong {
  color: #4ade80;
  font-size: 14px;
}
.compare-tray-names {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fafc;
}
.compare-tray-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-compare-clear {
  background: transparent;
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-compare-open {
  background: #ea580c;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-compare-open:disabled {
  background: #475569;
  color: #94a3b8;
  cursor: not-allowed;
}

/* 横並び比較表モーダル */
.compare-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.compare-modal.is-open {
  display: block;
}
.compare-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
}
.compare-modal-dialog {
  position: relative;
  width: calc(100% - 24px);
  max-width: 960px;
  max-height: 88vh;
  margin: 4vh auto;
  background: #ffffff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.compare-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.compare-modal-header h3 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.compare-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
}
.compare-modal-body {
  padding: 14px;
  overflow: auto;
}
.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}
.compare-table th,
.compare-table td {
  border: 1px solid #e2e8f0;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: #15803d;
  color: #ffffff;
  font-weight: 700;
  width: 22%;
}
.compare-table thead th:first-child {
  background: #334155;
  width: 12%;
  min-width: 95px;
}
.compare-table tbody th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}
.compare-table .plans span {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  margin: 0 3px 3px 0;
}
.compare-btn-official {
  display: block;
  background: #ea580c;
  color: #ffffff !important;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 6px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 6px;
}
.compare-btn-detail {
  display: block;
  background: #f0fdf4;
  color: #15803d !important;
  border: 1px solid #86efac;
  text-align: center;
  font-weight: 700;
  font-size: 11.5px;
  padding: 6px;
  border-radius: 6px;
  text-decoration: none;
}