/* ===========================================================
   レンタルサーバー・ドメイン比較＆契約サポート（server-domain-guide.html）専用スタイル
   共通の style.css（変数・ヘッダー・フッター・ボタン等）を前提に、
   このページだけで使う部品を「sg-」で始まる名前でまとめています。
   ページの主役は「比較表」。冒頭の2つの導線 → 目的別おすすめ → 比較表 の順で、すばやく比べられる構成です。
=========================================================== */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.sg-page {
  --sg-soft: #f3f8f5;
  --sg-line: #d9e6de;
  --sg-header: 84px;
}

.sg-sp-br {
  display: none;
}

/* 会社名の途中で改行されないようにする部分 */
.sg-nb {
  white-space: nowrap;
}

.sg-num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* 見出しへジャンプしたときに、固定ヘッダーに隠れないようにする */
#sg-server-compare,
#sg-domain-compare,
#sg-support,
#sg-detail,
#sg-faq,
#sg-pr {
  scroll-margin-top: var(--sg-header);
}

.sg-section {
  padding: 56px 0;
}

.sg-h2 {
  margin-bottom: 20px;
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.8rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--green-900);
}

.sg-h2 small {
  margin-left: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-600);
}

.sg-lead {
  margin: -8px 0 18px;
  font-size: 0.95rem;
  color: var(--text-600);
}

.sg-lead strong {
  color: var(--orange-600);
}

.sg-note {
  margin-top: 14px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-600);
}

/* 広告（PR）の表示：ページ右上の小さなラベルと、紹介リンクの横の印 */
.sg-pr-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--white);
  background: #6f7a75;
  border-radius: 4px;
  vertical-align: 2px;
}

.sg-pr-corner {
  position: absolute;
  top: 0;
  right: 24px;
  padding: 2px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--white);
  background: #6f7a75;
  border-radius: 0 0 8px 8px;
}

.sg-pr-corner:hover {
  background: var(--green-700);
}

/* ---------------- ファーストビュー ---------------- */
.sg-hero {
  padding: 40px 0 44px;
  background: linear-gradient(155deg, var(--green-100) 0%, #f6faf7 55%, var(--cream-100) 100%);
}

.sg-hero-inner {
  position: relative;
  max-width: 920px;
  padding-top: 24px;
  text-align: center;
}

.sg-hero-title {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.4;
  color: var(--green-900);
}

.sg-hero-lead {
  max-width: 640px;
  margin: 0 auto 26px;
  line-height: 1.9;
  color: var(--text-600);
}

/* 冒頭の2つの導線カード：白〜淡い色の面とイラストで、軽やかに。カード全体が押せる */
.sg-jump {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 800px;
  margin: 0 auto 14px;
}

.sg-jump-card {
  --accent: var(--green-700);
  --tint: #e4f2ea;
  --edge: #cde5d8;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "art body"
    "art go";
  gap: 6px 18px;
  align-items: center;
  padding: 20px 22px;
  text-align: left;
  color: var(--text-900);
  background: linear-gradient(150deg, #ffffff 35%, var(--tint) 100%);
  border: 2px solid var(--edge);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 22px rgba(31, 77, 60, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.sg-jump-card--domain {
  --accent: var(--orange-600);
  --tint: #fdeedd;
  --edge: #f4d9bf;
  box-shadow: 0 8px 22px rgba(217, 127, 63, 0.1);
}

.sg-jump-card:hover,
.sg-jump-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(31, 77, 60, 0.16);
}

.sg-jump-card--domain:hover,
.sg-jump-card--domain:focus-visible {
  box-shadow: 0 16px 34px rgba(217, 127, 63, 0.22);
}

.sg-jump-card:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 3px;
}

.sg-jump-card:active {
  transform: translateY(-1px);
}

.sg-jump-art {
  grid-area: art;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  background: var(--tint);
  border-radius: 24px 24px 24px 8px;
}

.sg-jump-art svg {
  display: block;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.sg-jump-card:hover .sg-jump-art svg,
.sg-jump-card:focus-visible .sg-jump-art svg {
  transform: translateY(-2px) rotate(-4deg) scale(1.07);
}

.sg-jump-body {
  grid-area: body;
  min-width: 0;
}

.sg-jump-eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.sg-jump-title {
  display: block;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--green-900);
  text-wrap: balance;
  word-break: auto-phrase;
}

.sg-jump-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-600);
}

.sg-jump-go {
  grid-area: go;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--accent);
  background: #fff;
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.sg-jump-go i {
  font-style: normal;
  font-weight: 800;
  transition: transform 0.28s ease;
}

.sg-jump-card:hover .sg-jump-go,
.sg-jump-card:focus-visible .sg-jump-go {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.sg-jump-card:hover .sg-jump-go i,
.sg-jump-card:focus-visible .sg-jump-go i {
  transform: translateY(3px);
}

@media (prefers-reduced-motion: reduce) {
  .sg-jump-card,
  .sg-jump-art svg,
  .sg-jump-go,
  .sg-jump-go i {
    transition: none;
  }

  .sg-jump-card:hover,
  .sg-jump-card:focus-visible,
  .sg-jump-card:hover .sg-jump-art svg,
  .sg-jump-card:focus-visible .sg-jump-art svg,
  .sg-jump-card:hover .sg-jump-go i,
  .sg-jump-card:focus-visible .sg-jump-go i {
    transform: none;
  }
}

.sg-hero-note {
  font-size: 0.78rem;
  color: #7a8680;
}

/* ---------------- 目的別のおすすめ（コンパクト） ---------------- */
.sg-pick-section {
  padding: 40px 0 8px;
  background: var(--white);
}

.sg-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
}

.sg-tile {
  position: relative;
  padding: 18px 16px 16px;
  background: var(--white);
  border: 2px solid var(--sg-line);
  border-radius: var(--radius-md);
}

.sg-tile--first {
  background: linear-gradient(160deg, #ffffff, var(--orange-100));
  border-color: var(--orange-500);
}

.sg-tile-flag {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 1px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.7;
  color: var(--white);
  background: var(--orange-500);
  border-radius: 999px;
}

.sg-tile-purpose {
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-700);
}

.sg-tile-name {
  margin-bottom: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--green-900);
}

.sg-tile-name small {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-600);
}

.sg-tile-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--sg-line);
}

.sg-tile-price-label {
  font-size: 0.74rem;
  color: var(--text-600);
}

.sg-tile-price strong {
  font-size: 0.95rem;
  color: var(--orange-600);
}

.sg-tile-price .sg-num {
  font-size: 1.55rem;
}

/* ---------------- 比較表（主役） ---------------- */
.sg-compare-section {
  padding-top: 44px;
}

.sg-domain-section {
  background: var(--cream-100);
  margin-top: 24px;
}

.sg-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--sg-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  -webkit-overflow-scrolling: touch;
}

.sg-table-wrap:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
}

.sg-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.65;
}

.sg-table--domain {
  min-width: 780px;
}

.sg-table th,
.sg-table td {
  padding: 14px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--sg-line);
}

.sg-table thead th {
  font-size: 0.85rem;
  color: var(--white);
  background: var(--green-900);
  white-space: nowrap;
}

.sg-table thead th small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

.sg-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 10.5em;
  font-weight: 700;
  color: var(--green-900);
  background: var(--sg-soft);
}

.sg-table-corner {
  position: sticky;
  left: 0;
  z-index: 2;
}

.sg-plan-company {
  display: block;
  font-size: 0.82rem;
  color: var(--text-600);
}

.sg-plan-name {
  display: block;
  font-size: 1rem;
}

.sg-row--first th,
.sg-row--first td {
  background: #fff6ee;
}

.sg-row--first th {
  box-shadow: inset 4px 0 0 var(--orange-500);
}

.sg-tile-flag--inline {
  position: static;
  display: inline-block;
  margin-top: 4px;
}

.sg-cell-price strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text-900);
}

.sg-cell-price .sg-num {
  font-size: 1.45rem;
}

.sg-cell-price {
  min-width: 8.5em;
}

.sg-cell-price small {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-600);
}

.sg-cell-price--renew strong {
  color: var(--orange-600);
}

.sg-lowest {
  display: inline-block;
  margin-top: 2px;
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 999px;
}

.sg-cell-link {
  white-space: nowrap;
}

/* 表の中の公式サイトへのボタン */
.sg-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-900);
  background: var(--white);
  border: 2px solid var(--green-900);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.sg-btn-sm:hover,
.sg-btn-sm:focus-visible {
  color: var(--white);
  background: var(--green-900);
}

.sg-btn-sm:hover .sg-pr-mark,
.sg-btn-sm:focus-visible .sg-pr-mark {
  background: rgba(255, 255, 255, 0.28);
}

.sg-footnotes {
  margin-top: 14px;
  list-style: none;
}

.sg-footnotes li {
  margin-bottom: 4px;
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--text-600);
}

/* ---------------- 契約サポート ---------------- */
.sg-support-section {
  padding: 40px 0 24px;
}

.sg-support-box {
  padding: 30px 32px;
  background: linear-gradient(135deg, var(--green-100), #f6faf7);
  border: 2px solid var(--green-500);
  border-radius: var(--radius-lg);
}

.sg-support-title {
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.5rem);
  line-height: 1.55;
  color: var(--green-900);
}

.sg-support-text {
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-600);
}

.sg-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 14px;
  list-style: none;
}

.sg-flow li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-900);
  background: var(--white);
  border-radius: 999px;
}

.sg-flow li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--white);
  background: var(--orange-500);
  border-radius: 50%;
}

.sg-related {
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-600);
}

.sg-related a {
  font-weight: 700;
  color: var(--green-700);
  text-decoration: underline;
}

.sg-support-small {
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--text-600);
}

/* ---------------- プラン別の補足（ページ後半） ---------------- */
.sg-detail-section {
  background: var(--sg-soft);
}

.sg-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.sg-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.sg-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.sg-card-title {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--green-900);
}

.sg-card-title span {
  margin-left: 8px;
  font-size: 0.88rem;
  color: var(--text-600);
}

.sg-badge {
  padding: 1px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 999px;
}

.sg-badge--first {
  color: var(--white);
  background: var(--orange-500);
}

.sg-card-spec {
  margin-bottom: 10px;
  padding-bottom: 10px;
  font-size: 0.82rem;
  color: var(--text-600);
  border-bottom: 1px dashed var(--sg-line);
}

.sg-check,
.sg-warn {
  margin-bottom: 8px;
  list-style: none;
}

.sg-check li,
.sg-warn li {
  position: relative;
  padding: 0 0 6px 22px;
  font-size: 0.88rem;
  line-height: 1.7;
}

.sg-check li::before {
  content: "✓";
  position: absolute;
  top: 3px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--white);
  background: var(--green-500);
  border-radius: 50%;
}

.sg-warn li {
  color: var(--text-600);
}

.sg-warn li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-500);
}

.sg-card-cta {
  margin-top: auto;
  padding-top: 8px;
}

.sg-card-cta .btn {
  width: 100%;
  padding: 11px 20px;
  font-size: 0.92rem;
  white-space: normal;
  text-align: center;
}

/* ---------------- FAQ ---------------- */
.sg-faq-section {
  background: var(--white);
}

.sg-faq {
  max-width: 820px;
}

.sg-faq-item {
  margin-bottom: 10px;
  background: var(--white);
  border: 1px solid var(--sg-line);
  border-radius: var(--radius-md);
}

.sg-faq-item[open] {
  border-color: var(--green-500);
  box-shadow: var(--shadow-soft);
}

.sg-faq-item summary {
  position: relative;
  display: block;
  padding: 14px 50px 14px 52px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--green-900);
  cursor: pointer;
  list-style: none;
}

.sg-faq-item summary::-webkit-details-marker {
  display: none;
}

.sg-faq-item summary::before {
  content: "Q";
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--white);
  background: var(--green-700);
  border-radius: 50%;
}

.sg-faq-item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--green-700);
  border-bottom: 3px solid var(--green-700);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition);
}

.sg-faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.sg-faq-item summary:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.sg-faq-item p {
  padding: 0 22px 16px 52px;
  line-height: 1.9;
  color: var(--text-600);
}

/* ---------------- 確認元・広告の注意書き（控えめに） ---------------- */
.sg-sources-section {
  padding: 8px 0 0;
}

.sg-sources {
  font-size: 0.78rem;
  color: var(--text-600);
}

.sg-sources summary {
  display: inline-block;
  cursor: pointer;
  color: var(--text-600);
  text-decoration: underline;
}

.sg-sources ul {
  margin: 10px 0;
  list-style: none;
}

.sg-sources li {
  margin-bottom: 5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.sg-sources a {
  color: var(--green-700);
  text-decoration: underline;
}

.sg-sources p {
  line-height: 1.7;
}

.sg-notice {
  padding: 22px 0 40px;
}

.sg-notice-text {
  font-size: 0.78rem;
  line-height: 1.85;
  color: #7a8680;
}

.sg-cta-lead {
  margin-bottom: 24px;
  opacity: 0.92;
}

/* ---------------- 画面幅ごとの調整 ---------------- */
@media (max-width: 960px) {
  .sg-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sg-section {
    padding: 44px 0;
  }

  .sg-card-grid {
    grid-template-columns: 1fr;
  }

  .sg-support-box {
    padding: 24px 22px;
  }
}

@media (max-width: 640px) {
  .sg-sp-br {
    display: inline;
  }

  .sg-pc-br {
    display: none;
  }

  .sg-pr-corner {
    right: 16px;
  }

  .sg-hero {
    padding: 32px 0 36px;
  }

  .sg-jump {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sg-jump-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "art body go";
    gap: 12px;
    padding: 14px 14px;
    min-height: 96px;
  }

  .sg-jump-art {
    width: 68px;
    height: 68px;
    border-radius: 20px 20px 20px 7px;
  }

  .sg-jump-art svg {
    width: 56px;
    height: 56px;
  }

  .sg-jump-title {
    font-size: 0.97rem;
  }

  .sg-jump-sub {
    font-size: 0.76rem;
  }

  /* スマホでは「比較表へ」の文字を省き、矢印の丸だけにして、タップしやすく */
  .sg-jump-go {
    justify-self: auto;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
  }

  .sg-jump-go span {
    display: none;
  }

  /* スマホでは、名前の列を細くして、料金が一緒に見えるようにする */
  .sg-table {
    font-size: 0.85rem;
  }

  .sg-table th,
  .sg-table td {
    padding: 11px 10px;
  }

  .sg-table tbody th {
    min-width: 8.4em;
    max-width: 8.4em;
  }

  .sg-plan-company {
    font-size: 0.66rem;
  }

  .sg-plan-name {
    font-size: 0.92rem;
  }

  .sg-cell-price .sg-num {
    font-size: 1.3rem;
  }

  .sg-tiles {
    gap: 10px;
  }

  .sg-tile {
    padding: 16px 12px 12px;
  }

  .sg-tile-name {
    font-size: 0.9rem;
  }

  .sg-tile-price {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .sg-h2 small {
    display: block;
    margin: 2px 0 0;
  }

  .sg-table-wrap::after {
    content: "← 横にスライドできます →";
    display: block;
    padding: 6px;
    font-size: 0.72rem;
    text-align: center;
    color: var(--text-600);
    background: var(--sg-soft);
  }

  .sg-faq-item summary {
    padding: 13px 44px 13px 48px;
  }

  .sg-faq-item p {
    padding: 0 18px 14px 18px;
  }
}
