/* Preserve the supplied layout while keeping body copy and form controls readable on phones. */
@media (max-width: 960px) {
  .header__logo a { min-height: 44px; justify-content: center; }
  .header__menu-btn {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }
  .header__menu-btn span { width: 28px; height: 2px; }
  .header__menu-btn span + span { margin-top: 0; }
  .header__nav-row { position: relative; min-height: 44px; }
  .header__nav-toggle {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
  }
  .header__nav-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
  .header__drawer-close { min-width: 44px; min-height: 44px; }
}

@media (max-width: 960px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  .hero__lead,
  .mission__text,
  .works__lead,
  .works__text,
  .news-item__excerpt,
  .news-archive__message,
  .service__lead,
  .media__lead,
  .media-channel__body,
  .request__lead,
  .company-hero__lead,
  .company-message__text,
  .company-deck__text,
  .company-contact__lead,
  .contact__lead {
    font-size: 16px;
  }

  .company-message__role,
  .contact__note { font-size: 14px; }
  .company-message__name { font-size: 18px; }
  .company-message__text { min-height: 0; line-height: 1.9; }

  .company-dl__row { height: auto !important; min-height: 0; padding: 16px 0 !important; }
  .company-dl dt { height: auto; font-size: 14px; line-height: 1.5; }
  .company-dl dd { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }

  .lead-form .klf-label { font-size: 14px; }
  .lead-form .klf-input,
  .lead-form .klf-textarea { min-height: 44px; font-size: 16px; }
  .lead-form .klf-textarea { min-height: 100px; }
  .lead-form .klf-consent,
  .lead-form .klf-err,
  .lead-form .klf-done { font-size: 14px; }
  .lead-form .klf-req::after { font-size: 12px; }
  .lead-form .klf-btn { font-size: 16px; letter-spacing: normal; }

  .works__badge { width: min(min(90vw,540.001px), 400px); }
  .works__badge-row { gap: 6px; }
  .works__badge-icon { width: 60px; height: 34px; font-size: 14px; white-space: nowrap; }
  .works__btn { margin-top: calc(min(17.1875vw,103.126px) + 40px); }
  .header__nav-sublink { font-size: 14px; }
  .hero__btn,
  .service-card__name,
  .service-card__more,
  .news-item__category,
  .news-item__date,
  .link-btn,
  .company-contact__btn { font-size: 14px; }

  .section-title__sub-text,
  .footer__tagline,
  .footer__copyright { font-size: 12px; }

  .header__drawer-link,
  .footer__link,
  .footer__nav-heading,
  .footer__nav-sublink { font-size: 14px; }
  .footer__nav-sublink { white-space: normal; }

  .news-archive__inner { max-width: calc(100% - 24px); }
}

/* Keep the archive legible as its layout changes from phone to desktop. */
@media (min-width: 601px) and (max-width: 960px) {
  .news-archive { padding-block: 126px 145px; }
  .news-archive .page-hd { font-size: 44px; }
  .news-archive__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: min(4vw,24.001px);
    row-gap: 44px;
    margin-top: 128px;
  }
  .news-archive .news-item__thumb-frame { height: auto; aspect-ratio: 361 / 194; }
  .news-archive .news-item__category { font-size: 14px; }
  .news-archive .news-item__date { font-size: 14px; }
  .news-archive .news-item__excerpt { font-size: 16px; line-height: 1.8; }
  .news-archive .pager { gap: 24px; margin-top: 140px; }
  .news-archive .pager__num { width: 42px; height: 42px; font-size: 16px; }
  .news-archive .pager__arrow { width: 24px; height: 24px; }
}

/* The fixed-position hero copy needs room to wrap on narrow phones. */
@media (max-width: 400px) {
  .hero { min-height: calc(150vw + 15px); }
  .hero__lead {
    max-width: calc(100% - 8.3333333333vw);
    white-space: normal;
  }
  .hero__btn { top: 130vw; }
}

@media (max-width: 300px) {
  .hero { min-height: calc(155vw + 15px); }
  .hero__btn { top: 134vw; }
}

/* The supplied desktop design scales body text down with the viewport. */
@media (min-width: 961px) {
  .company-message__text,
  .company-deck__text,
  .company-contact__lead { font-size: 16px; }

  .company-message__role,
  .company-dl dt { font-size: 14px; }

  .company-dl dd { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
  .company-dl__row { height: auto !important; min-height: 70px; padding: 10px 0 !important; }
  .company-dl dt { height: auto; line-height: 1.5; }
  .lead-form .klf-consent { font-size: 14px; }

  .hero__btn,
  .service-card__more,
  .news-item__date,
  .link-btn { font-size: 14px; }

  .footer__inner { padding-inline: 4vw; }
  .footer__tagline,
  .footer__link,
  .footer__nav-sublink,
  .footer__cta { font-size: 14px; }
  .footer__nav-heading { font-size: 16px; }
  .footer__nav { gap: 20px; }
  .footer__nav-col { width: 270px; }
  .footer__nav-sublink { white-space: normal; }
  .footer__cta { width: 154px; padding: 8px 12px; }
}

/* Long policy URLs must wrap on narrow screens. */
.wp-block-list a { overflow-wrap: anywhere; }

/* 2026-10-16: fixed header, drawer and fallback-page readability. */
.header.is-scrolled { background: #fff; box-shadow: 0 2px 12px rgb(0 0 0 / 10%); }
.main > .section:first-child { padding-top: 48px; }
.entry-content { overflow-wrap: anywhere; }
.entry-content h2 { margin-block: 32px 12px; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 16px; }
.header__nav a:focus-visible, .header__menu-btn:focus-visible { outline: 2px solid #239da5; outline-offset: 4px; }
@media (max-width: 960px) {
  :root { --header-height-sp: 72px; }
  .header { height: var(--header-height-sp); padding-block: 10px; }
  .header__logo-image { width: clamp(90px, min(23vw,138.001px), 129px); }
  .header.header--contact .header__logo { display: block; }
  .main > .section:first-child { padding-top: calc(var(--header-height-sp) + 32px); }
  .header__nav { padding: 84px 24px 32px; visibility: hidden; transition: transform .3s, visibility .3s; }
  .header__nav.is-open { visibility: visible; }
  .header__nav-link { padding: 18px 4px; font-size: 20px; }
  .header__nav-sublink { font-size: 16px; white-space: normal; }
  .header__nav-subitem:not(:last-child) { width: 100%; }
  .header__drawer-close { top: 14px; right: 16px; width: 44px; height: 44px; }
  .header__drawer-close img { width: 28px; height: 28px; }
  .header__drawer-cta { width: min(100%, 360px); height: 60px; margin-top: 36px; font-size: 20px; line-height: 60px; }
  .header__drawer-links { margin-top: 28px; gap: 16px; }
  .header__drawer-link { font-size: 14px; }
  .request__title { font-size: clamp(24px, min(7vw,42.001px), 42px); }
  .contact .page-hd { font-size: clamp(32px, min(8vw,48.001px), 48px); }
  .kanal-lf.lead-form { margin-top: 40px; }
  .heading--section { font-size: clamp(26px, min(6vw,36.001px), 40px); line-height: 1.5; }
}
@media (min-width: 601px) and (max-width: 960px) {
  .section-title__main { font-size: 48px; }
  .request__lead, .contact__lead { font-size: 18px; }
  .request { padding-block: 80px; }
  .contact { padding-block: 112px 80px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .header__nav { transition: none; }
}

/* Keep visual order, reading order and keyboard order identical. */
.kanal-lf.lead-form, .form .kanal-lf {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px; grid-auto-flow: row; transform: none;
}
.kanal-lf .klf-field { min-width: 0; grid-column: auto; grid-row: auto; order: 0; }
.kanal-lf .klf-field--inquiry { grid-column: 1 / -1; }
.kanal-lf .klf-field .klf-label { margin: 0 0 6px; font-size: 16px; line-height: 1.6; }
.kanal-lf .klf-field .klf-input, .kanal-lf .klf-field .klf-textarea {
  width: 100%; height: 48px; min-height: 48px; margin: 0; padding: 10px 12px;
  font-size: 16px; line-height: 1.5; scroll-margin-top: 100px;
}
.kanal-lf .klf-field .klf-textarea { height: 120px; resize: vertical; }
.kanal-lf .klf-field-error { margin: 6px 0 0; color: #b42318; font-size: 14px; line-height: 1.6; }
.kanal-lf .klf-field-error[hidden] { display: none; }
.kanal-lf .klf-field [aria-invalid="true"] { border: 2px solid #b42318; }
.kanal-lf .klf-field :focus-visible { outline: 2px solid #167981; outline-offset: 3px; }
.kanal-lf .klf-consent, .kanal-lf .klf-btn, .kanal-lf .klf-err, .kanal-lf .klf-done {
  grid-column: 1 / -1; grid-row: auto; order: 0;
}
.kanal-lf.lead-form .klf-consent, .form .kanal-lf .klf-consent { margin: 10px 0 0; font-size: 14px; }
.kanal-lf.lead-form .klf-btn, .form .kanal-lf .klf-btn {
  max-width: 100%; margin: 0 auto; min-height: 56px; height: auto;
  padding: 18px 36px; font-size: 16px; line-height: 1.5; letter-spacing: normal;
  white-space: normal; text-wrap: balance;
}
.kanal-lf.lead-form .klf-err, .form .kanal-lf .klf-err { margin: 0; font-size: 14px; }
@media (max-width: 960px) {
  .kanal-lf.lead-form, .form .kanal-lf { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* The grouped fields replace legacy per-label rows from WordPress custom CSS. */
:is(.post-name-site-home, .post-name-contact) .kanal-lf.lead-form .klf-label {
  margin-top: 0;
}
:is(.post-name-site-home, .post-name-contact) .kanal-lf.lead-form > :is(.klf-consent, .klf-btn, .klf-err, .klf-done) {
  grid-row: auto;
}
/* Keep required marks centered beside labels at desktop and mobile sizes. */
.kanal-lf.lead-form .klf-field .klf-label {
  display: flex;
  align-items: center;
  column-gap: 4px;
}
.kanal-lf.lead-form .klf-req {
  display: inline-flex;
  flex: none;
  align-items: center;
  font-size: 0;
  line-height: 1;
}
.kanal-lf.lead-form .klf-req::after {
  margin: 0;
  font-size: 12px;
  line-height: 1;
  vertical-align: baseline;
}

/* 2026-10-18: 601〜960px（タブレット）は、600px 幅のスマホと同じ形を真ん中に置く。
   それまでは画面の幅に合わせて文字も余白も伸び、768px で本文が 28px になっていた。 */
@media (min-width: 601px) and (max-width: 960px) {
  /* 一番上の写真の飾りはスマホと同じく右端に付け、見出し・説明・ボタンはほかの段と同じ左端・中央にそろえる */
  .hero__inner { max-width: 600px; margin-right: 0; }
  .hero-mv--sp { left: 140px; width: 460px; }
  .hero__heading, .hero__lead { left: calc(25px - (100vw - 600px) / 2); }
  .hero__btn { left: calc(112.5px - (100vw - 600px) / 2); font-size: 16px; }
  .hero__lead { font-size: 18px; }
  .header__nav-toggle img { width: 21.875px; height: 10px; }
  .header { padding-inline: calc((100vw - 600px) / 2 + 25px); }
  .footer { padding-inline: calc((100vw - 600px) / 2 + 25px); }
}

/* 2026-10-18: 強制改行（<br>）で区切った文が、狭い幅で 1〜3 文字だけ次の行にはみ出すのを防ぐ。
   <wbr> を入れた文は、その位置（文節の切れ目）でだけ折り返す。どの幅でも収まらないときは途中で折る。 */
main p:has(wbr) { word-break: keep-all; overflow-wrap: anywhere; }
/* 両端そろえ（justify）のままだと、文節で折り返した行の字の間が大きく空くので、左そろえにする */
:is(.mission__text, .media__lead, .media-channel__body, .company-message__text) p:has(wbr), p.company-hero__lead:has(wbr) { text-align: left; }
@media (min-width: 961px) { p.company-deck__text:has(wbr) { text-align: left; } }
/* 961〜1160px で「まだ若手に届いていない」の「い」だけが 2 行目に落ちるので、見出しを幅に合わせて少し小さくする */
@media (min-width: 961px) {
  .mission .section-title__heading { font-size: min(4.195rem, 3.6vw); }
}

/* 2026-10-18: 下層ページ（プライバシー・特商法・404）の見出しを、お知らせ・お問い合わせと同じ「中央＋下線」にそろえ、
   本文は読みやすい幅（880px まで）に。特商法の表は項目の列に薄い地色を付け、スマホでは項目と中身を縦に並べる。 */
.section--page .container { max-width: 880px; }
.section--page .page-hd { margin-bottom: 48px; }
.section--page .entry-content { font-size: 1.6rem; line-height: 1.9; }
.section--page .entry-content h2 { margin-block: 48px 16px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); font-size: 2rem; line-height: 1.5; }
.section--page .entry-content h3 { margin-block: 28px 8px; font-size: 1.7rem; }
.section--page .entry-content ol, .section--page .entry-content ul { padding-left: 1.6em; }
.section--page .entry-content ol { list-style: decimal; }
.section--page .entry-content ul { list-style: disc; }
.section--page .entry-content .wp-block-table { margin: 0; }
.section--page .entry-content .wp-block-table table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--color-border); }
.section--page .entry-content .wp-block-table td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.section--page .entry-content .wp-block-table td:first-child { width: 32%; background: var(--color-bg-gray); font-weight: 700; }
@media (max-width: 960px) {
  .not-found__text, .not-found__links a { font-size: 16px; }
  .section--page .page-hd { margin-bottom: 32px; }
  .section--page .entry-content h2 { margin-top: 36px; font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .section--page .entry-content .wp-block-table tr, .section--page .entry-content .wp-block-table td { display: block; width: auto; }
  .section--page .entry-content .wp-block-table td:first-child { width: auto; padding: 12px 4px 2px; background: none; border-bottom: 0; font-size: 1.4rem; color: var(--color-text-light); }
  .section--page .entry-content .wp-block-table td:last-child { padding: 0 4px 12px; }
}

/* 2026-10-18: ボタンの色をそろえる。会社情報の「採用に関するご相談はこちら」と、送信完了ページの
   「トップページへ戻る」だけ橙だったので、トップと同じ青緑（塗り）にする。LP（/tiktok/・/instagram/）は別の見た目なので変えない。 */
.company-contact__btn--orange { background: var(--color-primary); }
.entry-content .kanal-contact-thanks a { background: var(--color-primary); border-radius: 0; font-weight: 700; }

/* 2026-10-18: Google Fonts（Noto Sans JP）を読まなくしたので、本文の既定も他の部分と同じ游ゴシックに。
   游ゴシックの標準の太さは Windows で細く見えるため、プライバシー・特商法の本文は 1 段太く（500）する。 */
.main > .section > .container > article > .entry-content { font-weight: 500; }

/* 2026-10-18: フッターの小さなリンクを、指で押せる高さ（24px 以上）にする */
.footer__nav-sublink { min-height: 24px; padding-block: 3px; }
.footer__nav-sublist { gap: 0; }
.footer__link { display: inline-block; padding-block: 3px; }

/* 2026-10-18: PC のヘッダーのメニューを 14px → 15px に（1440px 以上で小さく見える） */
@media (min-width: 961px) { .header__nav-link { font-size: 1.5rem; } }