:root {
  --adk-shell-navy: #0b1d35;
  --adk-shell-ink: #22334a;
  --adk-shell-muted: #637083;
  --adk-shell-orange: #f76b1c;
  --adk-shell-orange-dark: #e75e12;
  --adk-shell-line: #dde7f1;
  --adk-shell-footer-bg: #f6fafd;
  --adk-shell-white: #fff;
  --adk-shell-max: 1280px;
}

.adk-header,
.adk-footer,
.adk-header *,
.adk-footer * {
  box-sizing: border-box;
}

.adk-header a,
.adk-footer a {
  color: inherit;
  text-decoration: none;
}

.adk-header img,
.adk-footer img {
  display: block;
  max-width: 100%;
  height: auto;
}

.adk-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 76px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(221, 231, 241, 0.8);
  background: var(--adk-shell-white);
  box-shadow: 0 3px 18px rgba(11, 29, 53, 0.08);
  color: var(--adk-shell-navy);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.adk-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100% - 40px, var(--adk-shell-max));
  height: 100%;
  margin: 0 auto;
  padding: 0;
}

.adk-header__logo {
  flex: 0 0 auto;
}

.adk-header .adk-header__logo img {
  width: auto;
  height: 40px;
}

.adk-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.adk-header__nav li {
  margin: 0;
  padding: 0;
}

.adk-header__nav a {
  position: relative;
  display: block;
  margin: 0;
  padding: 8px 0;
  color: var(--adk-shell-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.adk-header__nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--adk-shell-orange);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.adk-header__nav a:hover,
.adk-header__nav a[aria-current="page"],
.adk-header__mobile a:hover,
.adk-header__mobile a[aria-current="page"] {
  color: var(--adk-shell-orange);
}

.adk-header__nav a:hover::after,
.adk-header__nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.adk-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--adk-shell-orange);
  box-shadow: 0 10px 22px rgba(247, 107, 28, 0.22);
  color: var(--adk-shell-white);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}

.adk-header .adk-header__cta:hover {
  background: var(--adk-shell-orange-dark);
  color: var(--adk-shell-white);
}

.adk-header__quick {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.adk-header__quick a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.adk-header__quick-cases {
  border: 1px solid #cbd8e6;
  background: #fff;
  color: var(--adk-shell-navy);
}

.adk-header__quick-service {
  border: 1px solid transparent;
  background: transparent;
  color: var(--adk-shell-navy);
}

.adk-header .adk-header__quick-service:hover {
  background: #f6f9fc;
  color: var(--adk-shell-orange);
}

.adk-header .adk-header__quick-cases:hover {
  border-color: var(--adk-shell-orange);
  color: var(--adk-shell-orange);
}

.adk-header__quick-contact {
  border: 1px solid var(--adk-shell-orange);
  background: var(--adk-shell-orange);
  color: var(--adk-shell-white);
}

.adk-header .adk-header__quick-contact:hover {
  border-color: var(--adk-shell-orange-dark);
  background: var(--adk-shell-orange-dark);
  color: var(--adk-shell-white);
}

.adk-header__burger {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--adk-shell-navy);
  cursor: pointer;
  font: inherit;
}

.adk-header__burger span {
  display: block;
  width: 23px;
  height: 2.5px;
  margin: 5px auto;
  border-radius: 99px;
  background: currentColor;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.adk-header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.adk-header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.adk-header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.adk-header__mobile {
  position: absolute;
  top: 76px;
  right: 0;
  left: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 76px);
  margin: 0;
  padding: 10px 22px 24px;
  overflow: auto;
  border-top: 1px solid var(--adk-shell-line);
  border-left: 1px solid var(--adk-shell-line);
  border-bottom: 1px solid var(--adk-shell-line);
  border-bottom-left-radius: 16px;
  background: var(--adk-shell-white);
  box-shadow: -14px 18px 34px rgba(11, 29, 53, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* 閉じている間も要素は配置されたまま。translateX(20px) だと right:0 の箱が
     さらに右へ押し出され、全ページで横スクロールが20px出ていた。
     同じ「ふわっと出る」動きを縦方向にして、はみ出しを無くす。 */
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.adk-header__mobile.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.adk-header__mobile a {
  display: block;
  margin: 0;
  padding: 13px 4px;
  border-bottom: 1px solid var(--adk-shell-line);
  color: var(--adk-shell-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

.adk-header__mobile .adk-header__cta {
  display: inline-flex;
  margin-top: 16px;
  padding: 0 20px;
  border: 0;
  color: var(--adk-shell-white);
}

/* Services panel (site-shell.js): one "サービス" button in the top row opens the grouped
   service list (the same list as the footer). */
.adk-header__drop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--adk-shell-navy);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}

.adk-header__drop-toggle::after {
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s ease;
}

.adk-header__drop-toggle:hover,
.adk-header__drop-toggle.is-current,
.adk-header__drop.is-open .adk-header__drop-toggle {
  color: var(--adk-shell-orange);
}

.adk-header__drop.is-open .adk-header__drop-toggle::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.adk-header__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(100% - 40px, 900px);
  padding: 26px 32px 28px;
  border: 1px solid var(--adk-shell-line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--adk-shell-white);
  box-shadow: 0 18px 36px rgba(11, 29, 53, 0.14);
  transform: translateX(-50%);
}

.adk-header__panel[hidden] {
  display: none;
}

.adk-header__panel-list {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 0 44px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adk-header .adk-header__panel-list > li {
  display: grid;
  gap: 22px;
  align-content: start;
}

.adk-header__panel .adk-footer__cluster ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.adk-header__nav .adk-header__panel a {
  padding: 3px 0;
  color: var(--adk-shell-ink);
  font-size: 15px;
  font-weight: 700;
  white-space: normal;
}

.adk-header__nav .adk-header__panel a::after {
  display: none;
}

.adk-header__nav .adk-header__panel a:hover,
.adk-header__nav .adk-header__panel a[aria-current="page"] {
  color: var(--adk-shell-orange);
}

/* LINE consultation next to 無料相談 (desktop row) */
.adk-header__line,
.adk-header__mobile .adk-header__mobile-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid #cbd8e6;
  border-radius: 10px;
  background: var(--adk-shell-white);
  color: var(--adk-shell-navy);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}

.adk-header__line::before,
.adk-header__mobile-line::before {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #06c755;
  content: "";
}

.adk-header .adk-header__line:hover,
.adk-header .adk-header__mobile .adk-header__mobile-line:hover {
  border-color: #06c755;
  color: var(--adk-shell-navy);
}

.adk-header__inner > .adk-header__line + .adk-header__cta {
  margin-left: -14px;
}

/* Phone menu groups (site-shell.js) */
.adk-header__mobile-label {
  margin: 16px 4px 2px;
  color: var(--adk-shell-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.adk-header__mobile-label:first-child {
  margin-top: 6px;
}

.adk-header__mobile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.adk-header__mobile .adk-header__mobile-actions .adk-header__cta {
  width: 100%;
  margin-top: 0;
  padding: 0 12px;
}

.adk-header__mobile .adk-header__mobile-line {
  padding: 0 12px;
}

.adk-header :focus-visible,
.adk-footer :focus-visible {
  outline: 3px solid rgba(247, 107, 28, 0.45);
  outline-offset: 3px;
}

.adk-footer {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--adk-shell-line);
  background: var(--adk-shell-footer-bg);
  color: var(--adk-shell-ink);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.adk-footer__inner {
  width: min(100% - 64px, 1280px);
  margin: 0 auto;
  padding: 0;
}

.adk-footer__grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 140px 140px;
  gap: 28px;
  margin: 0;
  padding: 56px 0 42px;
}

.adk-footer__brand,
.adk-footer nav {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.adk-footer .adk-footer__logo img {
  width: 184px;
  height: auto;
}

.adk-footer__address,
.adk-footer__summary,
.adk-footer__bottom p {
  margin: 0;
}

.adk-footer__address {
  margin-top: 22px;
  color: var(--adk-shell-muted);
  font-size: 15px;
  line-height: 1.8;
}

.adk-footer__summary {
  margin-top: 16px;
  color: var(--adk-shell-muted);
  font-size: 15px;
  line-height: 1.9;
}

.adk-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.adk-footer__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--adk-shell-line);
  border-radius: 999px;
  background: var(--adk-shell-white);
  color: var(--adk-shell-navy);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.adk-footer__actions a:first-child {
  border-color: var(--adk-shell-orange);
  background: var(--adk-shell-orange);
  color: var(--adk-shell-white);
}

.adk-footer h2 {
  margin: 0 0 14px;
  padding: 0;
  color: var(--adk-shell-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

/* The heading text sits in a button (site-shell.js) that only folds the list on phones;
   elsewhere it must look and behave like the plain heading. */
.adk-footer__toggle {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.adk-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.adk-footer li {
  margin: 7px 0;
  padding: 0;
  color: var(--adk-shell-muted);
  font-size: 15px;
  line-height: 1.5;
}

.adk-footer a:hover {
  color: var(--adk-shell-orange);
}

/* Two columns per group: each group heading spans the row, so a group never
   continues at the top of the next column without its heading (アフィリエイト広告). */
.adk-footer__service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 26px;
  align-items: start;
}

.adk-footer .adk-footer__service-list > li {
  margin: 0;
}

.adk-footer li.adk-footer__group {
  grid-column: 1 / -1;
  margin-top: 13px;
  color: var(--adk-shell-navy);
  font-size: 14px;
  font-weight: 900;
}

.adk-footer li.adk-footer__group:first-child {
  margin-top: 0;
}

/* Grouped service list (site-shell.js adds .is-grouped): each group is a block with its own
   heading; the blocks sit in two balanced columns, 広告運用 itself in two inner columns. */
.adk-footer .adk-footer__service-list.is-grouped {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 0 40px;
}

.adk-footer .adk-footer__service-list.is-grouped > li.adk-footer__col {
  display: grid;
  gap: 26px;
  align-content: start;
  margin: 0;
}

.adk-footer__cluster ul {
  display: grid;
  gap: 9px 26px;
}

.adk-footer__cluster--wide ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adk-footer .adk-footer__cluster li {
  margin: 0;
}

.adk-footer__group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--adk-shell-navy);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
}

.adk-footer__group-title::before {
  content: "";
  flex: none;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--adk-shell-orange);
}

/* Wide screens: 会社情報 sits above お問い合わせ in one narrow column, so the service groups get
   the room and no column is left with a tall empty area. */
@media (min-width: 1201px) {
  .adk-footer__grid {
    grid-template-columns: 260px minmax(0, 1fr) 168px;
    grid-template-rows: auto 1fr;
    gap: 30px 48px;
  }

  .adk-footer__brand,
  .adk-footer nav[aria-label="サービス"] {
    grid-row: 1 / span 2;
  }

  .adk-footer nav[aria-label="会社情報"],
  .adk-footer nav[aria-label="お問い合わせ"] {
    grid-column: 3;
  }

  .adk-footer .adk-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    text-align: left;
  }

  .adk-footer__bottom .adk-footer__legal {
    margin-top: 0;
  }
}

.adk-footer__bottom {
  margin: 0;
  padding: 20px 0 26px;
  border-top: 1px solid var(--adk-shell-line);
  color: var(--adk-shell-muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.adk-footer__legal {
  margin-top: 7px;
}

@media (max-width: 1100px) {
  .adk-header__nav,
  .adk-header__inner > .adk-header__line,
  .adk-header__inner > .adk-header__cta {
    display: none;
  }

  .adk-header__burger {
    display: block;
    margin-left: 0;
  }

  .adk-header__quick {
    display: flex;
  }
}

@media (max-width: 1050px) {
  .adk-header__quick-service {
    display: none !important;
  }
}

@media (max-width: 1200px) {
  .adk-footer__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.65fr);
  }

  /* the long service list takes the right column; 会社情報 and お問い合わせ fill the space under the brand */
  .adk-footer nav[aria-label="サービス"] {
    grid-row: span 3;
  }
}

@media (max-width: 900px) {
  .adk-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adk-footer__brand,
  .adk-footer nav[aria-label="サービス"] {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .adk-footer__summary {
    max-width: 42em;
  }
}

@media (max-width: 600px) {
  .adk-header {
    height: 70px;
  }

  .adk-header__inner {
    width: min(100% - 32px, var(--adk-shell-max));
  }

  .adk-header__quick {
    gap: 6px;
  }

  .adk-header__quick a {
    min-height: 38px;
    padding: 0 10px;
    font-size: 15px;
  }

  .adk-header .adk-header__logo img {
    height: 34px;
  }

  .adk-header__mobile {
    top: 70px;
    max-height: calc(100vh - 70px);
    padding-right: 18px;
    padding-left: 18px;
  }

  .adk-footer__inner {
    width: min(100% - 36px, 1120px);
  }

  /* 会社情報 and お問い合わせ share a row; brand and サービス take the full width */
  .adk-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
    padding: 42px 0 32px;
  }

  .adk-footer__brand,
  .adk-footer nav[aria-label="サービス"] {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .adk-footer__service-list {
    grid-template-columns: 1fr;
    gap: 12px 16px;
  }

  .adk-footer .adk-footer__service-list.is-grouped {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* one column: groups follow the original order, sister brands (関連サービス) last */
  .adk-footer .adk-footer__service-list.is-grouped > li.adk-footer__col {
    display: contents;
  }

  .adk-footer__cluster--related {
    order: 1;
  }

  .adk-footer__cluster--wide ul {
    grid-template-columns: 1fr;
  }

  .adk-footer li {
    margin: 9px 0;
  }

  .adk-footer__bottom {
    text-align: left;
  }

  /* Folded footer (site-shell.js adds .adk-footer-fold): one full-width tap row per section */
  .adk-footer-fold .adk-footer__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .adk-footer-fold .adk-footer__brand {
    margin-bottom: 28px;
  }

  .adk-footer-fold .adk-footer__actions a {
    flex: 1 1 0;
    min-height: 46px;
    font-size: 16px;
  }

  .adk-footer-fold .adk-footer nav {
    grid-column: 1 / -1;
    border-top: 1px solid var(--adk-shell-line);
  }

  .adk-footer-fold .adk-footer nav:last-of-type {
    border-bottom: 1px solid var(--adk-shell-line);
  }

  .adk-footer-fold .adk-footer h2 {
    margin: 0;
  }

  .adk-footer-fold .adk-footer__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 54px;
    padding: 0 2px;
    cursor: pointer;
    font-size: 16px;
  }

  .adk-footer-fold .adk-footer__toggle::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform .2s ease;
  }

  .adk-footer-fold .adk-footer nav.is-open .adk-footer__toggle::after {
    transform: translateY(2px) rotate(-135deg);
  }

  .adk-footer-fold .adk-footer nav:not(.is-open) > ul {
    display: none;
  }

  .adk-footer-fold .adk-footer nav.is-open > ul {
    padding: 0 2px 18px;
  }

  .adk-footer-fold .adk-footer li {
    font-size: 16px;
  }

  /* the last section's bottom line already separates the copyright */
  .adk-footer-fold .adk-footer__bottom {
    border-top: 0;
  }
}

/* Phones keep 無料相談 beside the menu button; the other quick links live in the menu. */
@media (max-width: 430px) {
  .adk-header__quick-cases,
  .adk-header__quick-service {
    display: none !important;
  }

  .adk-header__quick a.adk-header__quick-contact {
    min-height: 40px;
    padding: 0 14px;
  }
}

@media (max-width: 600px) {
  .adk-header__mobile {
    width: 100%;
    border-left: 0;
    border-radius: 0 0 16px 16px;
  }
}

@media (max-width: 360px) {
  .adk-header .adk-header__logo img {
    height: 30px;
  }

  .adk-header__inner {
    gap: 12px;
  }

  .adk-header__quick a.adk-header__quick-contact {
    padding: 0 10px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adk-header__nav a::after,
  .adk-header__burger span,
  .adk-header__mobile {
    transition: none;
  }
}

/* Keep the injected consultation launcher from covering page CTAs on touch layouts. */
@media (max-width: 1024px) {
  body > .adk-btn[aria-label="チャットで質問する"] {
    right: 14px !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 8px !important;
    gap: 0 !important;
    border-radius: 50% !important;
  }

  body > .adk-btn[aria-label="チャットで質問する"] span {
    display: none !important;
  }

  body > .adk-btn[aria-label="チャットで質問する"] img {
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
  }
}

/* Phones: a smaller launcher. Nothing else is pinned to the bottom of the screen on phones.
   Hidden on the inquiry form pages so it never sits on top of the send button. */
@media (max-width: 430px) {
  body > .adk-btn[aria-label="チャットで質問する"] {
    right: 12px !important;
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
  }

  body > .adk-btn[aria-label="チャットで質問する"] img {
    width: 34px !important;
    height: 34px !important;
  }
}

html.adk-form-page body > .adk-btn[aria-label="チャットで質問する"],
html.adk-form-page body > .adk-nudge {
  display: none !important;
}

@media print {
  .adk-header,
  .adk-footer {
    display: none !important;
  }
}

/* Keep a lone character off the last line ("動画広 / 告。"). balance/pretty only move
   existing break points, so nothing can overflow. (word-break:auto-phrase was tried and
   made long headings such as "アカウントプランナー職の募集要項" overflow on phones.)
   Browsers without text-wrap support keep their normal wrapping. */
h1, h2, h3, h4 {
  text-wrap: balance;
}
p, li, dt, dd, th, figcaption {
  text-wrap: pretty;
}

/* Phone copy: keep service explanations at reading size, with a quieter note tier.
   These scoped rules also cover older pages with inline typography overrides. */
@media (max-width: 767px) {
  main :is(
    .adh-feat-sub, .adh-offline-txt, .ad-clinic-entry p, .adf-fee p,
    .aff-hero-card-desc, .aff-prob-sub, .aff-prob-bullet, .aff-svc-sub, .aff-svc-card-desc,
    .co-service-card-desc, .co-profile-biz-desc,
    .mc-issue-navy-sub, .mc-scope-bar-item-sub,
    .cf-page-sub, .cf-notice-text, .gov-point-desc,
    .lsh-card-desc, .lp-strat-bullet-text,
    .msg-tl-desc, .msg-origin-text, .msg-award-item,
    .meta-fb-format-card-text, .meta-fb-format-tip, .meta-ig-format-lead,
    .meta-ig-format-card-text, .meta-flow-desc,
    .oc-kw, .oc-mi span, .oc-tl small,
    .pf-goal-ex, .pf-all-card p, .pf-how-step p, .pf-can-card p, .pf-steps p,
    .pf-table th, .pf-table td,
    .pin-cr-point-desc, .pin-vfmt-desc, .pin-tip-card-desc, .pin-cc-node-desc, .pin-cc-step-desc,
    .sns-hero-card-desc, .sns-prob-item-text, .sns-flow-desc, .sns-contact-sub,
    .plan-list li, .point-card p, .service-card p, .plan-info > p:not([style]),
    .tt-industry-live-card p, .tt-ada-step-desc, .tt-cross-live-card p,
    .tt-cross-live-flow p, .tt-cr-live-feature-card p, .tt-cr-live-workflow small,
    .tt-section-lead, .tt-sol-desc,
    .vid-hero-card-desc,
    .x-feature-card-text, .x-targeting-card-text, .x-menu-sub, .x-menu-card-text,
    .x-purpose-card-text, .x-adokita-card-text, .x-industry-sub, .x-industry-card-text,
    .x-cta-card-text, .x-flow-sub, .x-flow-desc,
    .ysa-flow-step-desc
  ) {
    font-size: 16px !important;
    line-height: 1.85 !important;
    overflow-wrap: anywhere;
  }

  main :is(
    .adh-mini-sub, .adk-trust__note, .aff-price-note,
    .cf-hint, .cf-agree-note, .cf-center-note, .cf-agree-label, .gov-side-secure-text,
    .lsh-trust, .lp-s1-cta-note, .lp-s3-cta-note, .meta-cta-note,
    .oc-menu-note, .oc-note, .oc-pnote, .oc-pr2-side p, .oc-c2-body small,
    .pf-note, .pf-final-note, .pf-proof-src,
    .plan-card .rec, .recommend-card,
    .tt-cr-live-alert, .tt-cross-origin-copy small,
    .x-menu-note, .x-cta-note, .ysa-hero-sub-note
  ) {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }

  main .pf-goal-body { position: relative; padding: 22px 18px; background: var(--pf-navy, #16243a); }
  main .oc-tb { font-size: 16px; min-height: 48px; line-height: 1.6; }
  main .x-hero-strip-label { white-space: normal; flex-shrink: 1; }
  main .oc-live { left: auto; right: 8px; max-width: calc(100% - 16px); }
  main .vid-price-grid { grid-template-columns: minmax(0, 1fr); }
  main .vid-price-grid > * { min-width: 0; }
  main .vid-contact-panel a { max-width: 100%; white-space: normal; }
  main :is(.cf-btn-link, .cf-btn-clear) { font-size: 15px; }
  main :is(.flow-node small, .metric-label) { font-size: 14px; line-height: 1.6; }
}

@media (max-width: 360px) {
  .lst-hero.lsh-ref .lsh-sub-part { display: block; }
  main .mc-scope-head > * { min-width: 0; max-width: 100%; }
  main .mc-scope-adjust-pill { white-space: normal; }
  main .tk-list > div { grid-template-columns: minmax(0, 1fr); }
  main .tk-list dd { min-width: 0; overflow-wrap: anywhere; }
  main .oc-btn { max-width: 100%; justify-content: center; text-align: center; padding-inline: 20px; }
  main .rh-hero-lower { grid-template-columns: minmax(0, 1fr); }
  main :is(.rh-hero-copy, .rh-hero-side) { min-width: 0; }
  main .rh-tagline { white-space: normal; }
  main .x-section-h2 > .x-nowrap { white-space: normal; }
}

/* Phones: small standalone links (breadcrumbs, "詳しく見る", back links) were 20-28px tall.
   An invisible ::after widens the tap area by ~10px above and below without moving anything. */
@media (max-width: 600px) {
  .rc-bc a,
  .svc4-link,
  .cs-card-link,
  .brand-sec-link,
  .co-profile-info-link,
  .cf-btn-link,
  .cf-btn-clear,
  .gov-extlink,
  .rc-faq-more a {
    position: relative;
  }
  .rc-bc a::after,
  .svc4-link::after,
  .cs-card-link::after,
  .brand-sec-link::after,
  .co-profile-info-link::after,
  .cf-btn-link::after,
  .cf-btn-clear::after,
  .gov-extlink::after,
  .rc-faq-more a::after {
    content: "";
    position: absolute;
    inset: -10px -4px;
  }
}
