* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "M PLUS Rounded 1c", sans-serif;
  color: #3d4545;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 180%;
}

header {
  height: 48px;
  display: flex;
  align-items: center;
  padding-left: 12px;
}

a {
  color: #2f6cdc;
  font-size: 12px;
  font-weight: 500;
  line-height: 180%;
  text-decoration: none;
}

footer {
  padding: 12px 24px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: end;
  background-color: #f7f8f8;
  gap: 36px;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 12px;
}

footer .links-wapper {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 22px;
}

footer a {
  color: #616f6f;
}

footer p {
  align-self: center;
}

footer small {
  font-size: 11px;
}

small {
  color: #616f6f;
  font-size: 12px;
  line-height: 150%;
}

/* タブレットスタイル */
@media screen and (min-width: 726px) {
  footer {
    padding: 16px 40px 48px;
    gap: 112px;
    font-size: 14px;
    border-top: 1px solid #e9ecec;
  }

  footer .links-wapper {
    flex-direction: row;
    align-items: end;
    gap: 24px;
  }
}

@media screen and (min-width: 1080px) {
  body {
    font-size: 16px;
  }

  header {
    height: 100px;
    padding-left: 40px;
  }

  header img {
    height: 32px;
  }

  footer .links-wapper {
    flex-direction: row;
    align-items: end;
    gap: 32px;
  }

  a {
    font-size: 14px;
  }

  small {
    font-size: 13px;
  }
}

strong {
  font-weight: 700;
}

section.setup-guide {
  padding: 16px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media screen and (min-width: 726px) {
  section.setup-guide {
    max-width: 576px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (min-width: 1080px) {
  section.setup-guide {
    max-width: 640px;
    padding-bottom: 40px;
    gap: 24px;
  }
}

section.setup-guide h1 {
  padding: 8px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 100%; /* 18px */
  letter-spacing: 0.9px;
}

@media screen and (min-width: 1080px) {
  section.setup-guide h1 {
    font-size: 24px;
  }
}

section.setup-guide small {
  margin-top: 12px;
}

section.setup-guide div {
  display: flex;
  flex-direction: column;
}

@media screen and (min-width: 726px) {
  section.setup-guide div {
    flex-direction: row;
    gap: 8px;
  }
}

section.setup-guide div a {
  display: flex;
  align-items: center;
  margin-left: auto;
}

section.setup-guide > div:last-child {
  align-self: flex-end;
}

section.buttons {
  padding: 12px 0;
  background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(255, 255, 255, 0.5) 100%
    ),
    #e9ecec;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.tab-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;

  padding: 8px 16px 8px 12px;
  border-radius: 28px;
  font-size: 13px;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.65px;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, filter 0.3s ease;

  background: #fff;
  color: #889797;
  border: 1px solid #e0e0e0;
}

.tab-button .button-icon {
  filter: invert(56%) sepia(26%) saturate(222%) hue-rotate(159deg)
    brightness(85%) contrast(85%);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media screen and (min-width: 1080px) {
  .tab-button {
    font-size: 18px;
    padding: 8px 32px 8px 24px;
  }

  .tab-button .button-icon {
    width: 32px;
    height: 32px;
  }
}

.tab-button.active {
  background: linear-gradient(
      0deg,
      var(--Neutral-1200, #616f6f) 0%,
      var(--Neutral-1200, #616f6f) 100%
    ),
    #fff;
  color: #fff;
  border: none;
}

.tab-button.active .button-icon {
  filter: brightness(0) invert(1);
}

.child-label,
.parent-label {
  height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.child-label {
  background-color: #ffdebd;
}

.parent-label {
  background-color: #d6f2f3;
}

.child-label img,
.parent-label img {
  height: 48px;
}

@media screen and (min-width: 1080px) {
  .child-label,
  .parent-label {
    height: 96px;
  }

  .child-label img,
  .parent-label img {
    height: 64px;
  }
}

section.child-details,
section.parent-details {
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media screen and (min-width: 726px) {
  section.child-details,
  section.parent-details {
    max-width: 726px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 1080px以上 かつ 「その他」プランの場合の特殊レイアウト --- */
@media screen and (min-width: 1080px) {
  section.child-details,
  section.parent-details {
    max-width: 1080px;
    padding: 40px 32px 80px 32px;
    row-gap: 80px;
  }

  section.child-details.grid-layout-other-large {
    grid-template-columns: repeat(6, 1fr);
  }

  /* 各STEPアイテムのグリッド配置ルール */

  /* STEP 1: 横幅いっぱい */
  section.child-details.grid-layout-other-large #step-1 {
    grid-column: 1 / span 6; /* 1列目から6列目までを占有 */
  }

  /* STEP 2, 3(B), 4(B): 等間隔で横幅いっぱい（それぞれ2列ずつ占有） */
  section.child-details.grid-layout-other-large #step-2,
  section.child-details.grid-layout-other-large #step-3b,
  section.child-details.grid-layout-other-large #step-4b {
    grid-column: span 2;
  }

  /* STEP 5(B), 6(B), 7(B): 等間隔で横幅いっぱい（それぞれ2列ずつ占有） */
  section.child-details.grid-layout-other-large #step-5b,
  section.child-details.grid-layout-other-large #step-6b,
  section.child-details.grid-layout-other-large #step-7b {
    grid-column: span 2;
  }

  /* STEP 5, 6: 等間隔で横幅いっぱい（それぞれ3列ずつ占有） */
  section.child-details.grid-layout-other-large #step-5,
  section.child-details.grid-layout-other-large #step-6 {
    grid-column: span 3;
  }

  /* STEP 7, 8: 等間隔で横幅いっぱい（それぞれ3列ずつ占有） */
  section.child-details.grid-layout-other-large #step-7,
  section.child-details.grid-layout-other-large #step-8 {
    grid-column: span 3;
  }

  /* Bプラン以外（Aプラン）が選択された場合は、通常通り2列表示に戻す */
  section.child-details:not(.grid-layout-other-large) {
    grid-template-columns: repeat(2, 1fr); /* 2列グリッドに戻す */
  }

  section.parent-details {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-text {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
}

.step-text.child {
  color: #e97400;
}

.step-text.parent {
  color: #0aacbb;
}

.step-number {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  line-height: 100%;
}

@media screen and (min-width: 1080px) {
  .step-text {
    font-size: 20px;
  }

  .step-number {
    height: 36px;
  }
}

.step-number.child {
  color: #e97400;
}

.step-number.parent {
  color: #0aacbb;
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item[hidden] {
  display: none !important;
}

/* STEP1,9の画像は小さいため */
.step-item:not(#step-1):not(#step-9) p {
  flex-grow: 1;
}

.step1-img {
  display: flex;
  width: 100%;
  align-self: center;
  padding: 28px 16px;
  border-radius: 12px;
  background: #f7f8f8;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.app-store {
  width: 108px;
  height: 40px;
  display: block;
}

.google-play {
  width: 135px;
  height: 40px;
  display: block;
}

.vertical-screen {
  width: 193px;
  height: 343px;
  align-self: center;
}

.horizontal-screen {
  width: 320px;
  height: 180px;
  align-self: center;
}

@media screen and (min-width: 1080px) {
  .vertical-screen {
    width: 270px;
    height: 480px;
  }

  .horizontal-screen {
    width: 448px;
    height: 252px;
  }
}
