/* Mobile layout refinements. */
@media (max-width: 650px) {
  #top .hero.psl-hero { top: 70px !important; height: 540px !important; }
  #top .hero.psl-hero .psl-hero__upper { height: 310px; padding: 26px 6% 0; box-sizing: border-box; }
  #top .hero.psl-hero .psl-hero__title { position: relative; inset: auto; font-size: clamp(28px, 8.1vw, 48px); width: 100%; gap: 0; line-height: 1.3; }
  #top .hero.psl-hero .psl-hero__title span,
  #top .hero.psl-hero .psl-hero__title > span:last-child { letter-spacing: 0; }
  #top .hero.psl-hero .psl-hero__english { position: relative; inset: auto; margin: 12px 0; font-size: clamp(13px, 3.7vw, 22px); letter-spacing: .025em; }
  #top .hero.psl-hero .sp-description { position: relative; inset: auto; width: 74%; font-size: 11px; line-height: 1.9; white-space: normal; }
  #top .hero.psl-hero .psl-hero__map { top: 145px; left: auto; right: 2%; width: 23%; transform: none; }
  #top .hero.psl-hero .psl-hero__photo { top: 280px; height: 260px; }
  #top .hero.psl-hero .psl-hero__credit { bottom: 14px; right: 14px; font-size: 9px; }
  .mobile-meaning { display: block; }
  #philosophy .hero-scroll { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); font-size: 11px; letter-spacing: .12em; gap: 6px; }
  #philosophy .hero-scroll__arrow { width: 13px; height: 13px; }
  .name-origin-dialog #psl-name .psl-name__heading { font-size: clamp(16px, 4.8vw, 23px); white-space: nowrap; letter-spacing: 0; }
  .name-origin-dialog #psl-name .psl-name__intro br { display: none; }
  .name-origin-dialog #psl-name .psl-name__intro .mobile-meaning { display: block; }
  .recruit-fixed { gap: 12px; padding: 9px 14px; box-sizing: border-box; }
  .recruit-fixed a { display: flex; justify-content: center; align-items: center; gap: 8px; width: auto; flex: 1; min-width: 0; font-size: 14px; letter-spacing: .06em; line-height: 1.4; padding: 9px 6px; white-space: nowrap; box-sizing: border-box; }
  .psl-recruit .people-link { padding: 58px 14px 48px; min-height: 0; display: flex; flex-direction: column; }
  .psl-recruit .people-title { left: 14px; top: 0; font-size: 42px; }
  .psl-recruit .people-portrait { position: relative; left: auto; bottom: auto; width: 100%; height: 180px; }
  .psl-recruit .people-portrait img,
  .psl-recruit .people-link:nth-child(2) .people-portrait img { position: static; width: 100%; height: 100%; object-fit: contain; object-position: left bottom; transform: none; }
  .psl-recruit .people-link p { top: auto; margin: 16px 0 0; width: 100%; font-size: 13px; line-height: 1.9; }
  .psl-recruit .people-link p br { display: none; }
  #philosophy .po-inner,
  #philosophy .po-layout,
  #philosophy .po-copy { min-width: 0; max-width: 100%; width: 100%; }
  #philosophy .po-copy,
  #philosophy .po-copy:hover,
  #philosophy .po-copy:focus-within { transform: none !important; scale: none !important; }
  #philosophy .po-copy h3 { font-size: 27px; }
  #philosophy .po-copy h4 { font-size: 17px; line-height: 1.7; }
  #philosophy .po-copy p,
  #philosophy .po-value li { font-size: 13px; line-height: 1.9; }
  #philosophy .po-copy br { display: none; }
}

#top .hero.psl-hero .hero-tablet-break {
  display: none;
}

.business-mobile-break, .recruit-phone-break { display: none; }
@media (max-width: 650px) {
  #philosophy .po-value li { font-size: 17px; line-height: 1.7; }
  #business #business-heading-0 { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; white-space: nowrap; }
  #business #business-heading-0 > span { position: static; margin: 0; transform: none; }
  #business #business-heading-0 .business-heading-text { font: inherit; min-width: 0; }
  .psl-recruit #recruit-value .recruit-phone-break { display: initial; }
  .psl-recruit .people-portrait { z-index: 5; mix-blend-mode: normal; }
  .psl-recruit .people-portrait img,
  .psl-recruit .people-link:nth-child(2) .people-portrait img { object-position: center bottom; margin: 0 auto; }
  .story-contact { display: flex; gap: 12px; padding: 12px 14px; box-sizing: border-box; }
  .story-contact a { display: flex; flex: 1; justify-content: center; align-items: center; min-width: 0; width: auto; padding: 9px 6px; font-size: 14px; letter-spacing: .06em; white-space: nowrap; box-sizing: border-box; }
  .story-contact a br, .recruit-fixed a br { display: none; }
  #philosophy .hero-scroll { display: none; }
  #philosophy .hero-scroll__arrow { display: block; flex: 0 0 13px; width: 13px; height: 13px; border: 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); filter: drop-shadow(0 1px 2px #555); }
}

/* Bring the mountain and the scroll cue together; size map beside the copy. */
@media (max-width: 650px) {
  #top .hero.psl-hero { height: 560px !important; }
  #top .hero.psl-hero .psl-hero__upper {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    column-gap: 12px;
    align-content: start;
    height: auto;
  }
  #top .hero.psl-hero .psl-hero__title,
  #top .hero.psl-hero .psl-hero__english { grid-column: 1 / -1; }
  #top .hero.psl-hero .sp-description {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    font-size: 11px;
    line-height: 1.8;
  }
  #top .hero.psl-hero .psl-hero__map {
    position: static;
    grid-column: 2;
    grid-row: 3;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 150px;
    max-height: 195px;
    object-fit: contain;
    transform: none;
  }
  #top .hero.psl-hero .psl-hero__photo {
    top: 335px;
    bottom: 0;
    height: auto;
    background-size: cover;
    background-position: center 38%;
  }
  #philosophy .hero-scroll {
    position: absolute;
    top: -250px;
    bottom: auto;
    color: #aa453b;
    text-shadow: none;
  }
}

/* Hero: wider copy, a taller map, and the mountain directly below. */
@media (max-width: 650px) {
  #top .hero.psl-hero { height: auto !important; }
  #top .hero.psl-hero .psl-hero__upper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    position: relative;
    padding: 26px 5% 0;
    height: auto;
  }
  #top .hero.psl-hero .sp-description {
    grid-area: 3 / 1;
    width: 74%;
    container-type: inline-size;
    font-size: 11px;
    line-height: 1.85;
    position: relative;
    z-index: 2;
    padding: 0;
  }
  #top .hero.psl-hero .hero-description-line {
    display: block;
    font-size: min(1em, 4.25cqw);
    white-space: nowrap;
  }
  #top .hero.psl-hero .hero-description-line-spaced {
    margin-block-start: 0.45em;
  }
  #top .hero.psl-hero .psl-hero__map {
    position: static;
    grid-area: 3 / 1;
    justify-self: end;
    width: 43.33%;
    /* The image has about 20px of transparent space above Hokkaido. */
    margin-block-start: -16px;
    margin-inline-end: calc(22px - 5vw);
    height: 205px;
    min-height: 0;
    max-height: none;
    object-fit: fill;
    transform: none;
    z-index: 1;
  }
  #top .hero.psl-hero .psl-hero__photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: 220px;
    margin-top: 12px;
    background-size: cover;
    background-position: center top;
  }
  #philosophy .hero-scroll {
    top: -196px;
    bottom: auto;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.7);
  }
  #philosophy .hero-scroll__arrow {
    color: #fff;
    border-right-color: #fff;
    border-bottom-color: #fff;
  }
}

@media (max-width: 650px) {
  #top .hero.psl-hero .psl-hero__title,
  #top .hero.psl-hero .psl-hero__english {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    transform: none;
    translate: none;
  }
  #top .hero.psl-hero .psl-hero__title { display: flex; justify-content: center; }
}

@media (max-width: 650px) {
  #top .hero.psl-hero .psl-hero__title { font-size: clamp(37px, 11.6vw, 67px); }
}

/* Balance the visible outside margins of the copy and map. */
@media (max-width: 650px) {
  #top .hero.psl-hero .sp-description { left: 20px; }
}

@media (max-width: 650px) {
  #business .business-showcase__copy > .business-english-programming {
    width: 100%;
    max-width: 100%;
    font-size: clamp(30px, 11.8vw, 76px);
    letter-spacing: -.025em;
    text-align: center;
    white-space: nowrap;
  }
}

/* Anchor the credit inside the photograph, above its color overlay. */
#top .hero.psl-hero .psl-hero__photo > .psl-hero__credit {
  display: block;
  position: absolute;
  inset: auto 12px 12px auto;
  z-index: 20;
  width: auto;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 3px 6px;
  color: #fff;
  background: rgba(0, 0, 0, .28);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
  text-shadow: 0 1px 2px #333;
  visibility: visible;
  opacity: 1;
}
@media (max-width: 650px) {
  #top .hero.psl-hero .psl-hero__photo > .psl-hero__credit {
    right: 8px;
    bottom: 8px;
    font-size: 10px;
  }
}

/* Keep the credit in the visible upper portion of the mobile photograph. */
@media (max-width: 650px) {
  #top .hero.psl-hero .psl-hero__photo > .psl-hero__credit {
    top: 105px;
    bottom: auto;
    right: 10px;
    left: auto;
    display: block;
    font-size: 10px;
    z-index: 30;
  }
}

@media (min-width: 651px) {
  #business .business-showcase__copy { container-type: inline-size; }
  #business .business-showcase__copy > .business-english-programming {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 48px;
    font-size: 16cqw;
    letter-spacing: -.025em;
    text-align: center;
    white-space: nowrap;
  }
  #top .hero.psl-hero .psl-hero__photo > .psl-hero__credit {
    top: 55%;
    right: 20px;
    bottom: auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 12px;
    z-index: 30;
  }
}


/* Readable spacing for name definitions and company information. */
.name-origin-dialog #psl-name .psl-name__definitions > div + div {
  margin-top: 20px;
}
#company .company-business-list > div,
#company .company-shareholders > div {
  display: block;
  line-height: 1.9;
}

/* Company details and deliberate Voice teaser line breaks. */
#company .company-officers > div { line-height: 1.9; }
#company .company-officers > div + div { margin-top: .5em; }
.psl-recruit .people-link .voice-teaser-line { display: block; }
@media (max-width: 650px) {
  .site-header .global-nav > .recruit-dropdown,
  .site-header .global-nav > a.nav-recruit { margin-top: 18px; }
}

/* Recruit copy: preserve the requested lines without extra wrapping. */
.psl-recruit .people-link .message-teaser-line { display: block; }
.psl-recruit .recruit-company-address > span { display: block; white-space: nowrap; }
.psl-recruit :is(.feature-works .feature-copy, .requirements-paper) {
  container-type: inline-size;
}

.psl-recruit .recruit-adjusted-heading {
  font-size: min(24px, 6cqw);
  line-height: 1.5;
  white-space: nowrap;
}
.psl-recruit .recruit-about h3 { font-size: 22px; }
.psl-recruit .recruit-company-address { font-size: 16px; line-height: 1.8; }
@media (max-width: 650px) {
  .psl-recruit .recruit-about h3 { font-size: 20px; }
  .psl-recruit .recruit-company-address { font-size: clamp(11px, 3.25vw, 15px); }
}

/* Philosophy headings: English label with its description alongside. */
#philosophy .po-copy h3.po-heading {
  display: flex; flex-wrap: wrap; align-items: baseline;
  column-gap: 14px; row-gap: 6px; margin-bottom: 20px;
}
#philosophy .po-copy h3.po-heading .po-caption {
  font-family: sans-serif; font-weight: 400; font-size: 12px;
  line-height: 1.5; margin: 0;
}
/* Keep Value subheadings subordinate to the blue section heading. */
#recruit-value .feature-copy h4 {
  margin: 0 0 8px;
  color: var(--recruit-display-blue);
  font-size: clamp(17px, 1.9vw, 20px);
  font-weight: 700;
}

#recruit-vision .feature-copy {
  container-type: inline-size;
}

#recruit-vision .feature-copy h3 {
  font-size: min(clamp(19px, 2.2vw, 23px), 7cqw);
  white-space: nowrap;
}

@media (min-width: 651px) and (max-width: 1024px) {
  .psl-recruit :is(#recruit-mission, #recruit-vision, #recruit-value) .feature-copy h3 {
    font-size: clamp(19px, 2.6vw, 23px);
  }
}

/* Keep the top-page Vision statement on one line. */
#philosophy .po-vision { container-type: inline-size; }
#philosophy .po-copy h4.po-vision-title {
  white-space: nowrap;
  font-size: min(25px, 6.6cqw);
}
@media (max-width: 650px) {
  #philosophy .po-copy h4.po-vision-title { font-size: min(17px, 6.6cqw); }
}

/* Contact Form 7 */
.wpcf7 .g-recaptcha {
  display: flex;
  justify-content: center;
}

/* タブレット幅のヘッダー */
@media (min-width: 651px) and (max-width: 1024px) {
  .site-header .nav-toggle:not(:checked) ~ .global-nav {
    display: none;
  }

  .site-header .global-nav > .recruit-dropdown,
  .site-header .global-nav > .nav-recruit,
  .site-header .global-nav > .nav-contact {
    align-self: center;
    margin-inline: 0;
  }

  .site-header .global-nav > .recruit-dropdown,
  .site-header .global-nav > .nav-recruit {
    margin-top: 16px;
  }
}

#business .business-showcase__copy,
#business .business-showcase__copy::after {
  border-radius: 0;
}

/* タブレットの事業内容：写真と説明を横並びにして、3項目を縦に並べる */
@media (min-width: 651px) and (max-width: 1024px) {
  #business .business-showcase__slide {
    display: flex;
    align-items: center;
    gap: 5%;
    box-sizing: border-box;
    width: 100%;
    padding-inline: 6%;
    margin-block-end: 0;
    padding-block: 24px;
    border-top: var(--business-divider);
  }

  #business .business-showcase__visual {
    position: relative;
    inset: auto;
    flex: 0 0 36%;
    width: 36%;
    aspect-ratio: 1;
    margin: 0;
  }

  #business .business-showcase__visual > img {
    top: 0;
    left: 0;
    width: 100%;
  }

  #business .business-showcase__copy {
    position: relative;
    inset: auto;
    flex: 0 0 59%;
    width: 59%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  #business .business-showcase__copy h3 {
    font-size: clamp(18px, 2.6vw, 22px);
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 10px;
  }

  #business .business-showcase__copy > p:not(.business-showcase__english) {
    font-size: 15px;
    line-height: 1.65;
  }

  #business .business-showcase__copy > .business-showcase__english {
    display: none;
  }
}

/* リクルートトップのMessage・Voice */
.psl-recruit .people-link .people-portrait {
  mix-blend-mode: normal;
}

.psl-recruit .people-link::before {
  inset: 0;
  background: linear-gradient(135deg, #edf8fd, #c6e6f6);
}

.psl-recruit .people-link::after {
  display: block;
  inset: 0 0 0 48%;
  background: radial-gradient(circle, #9ecfe6 2px, transparent 3px)
    0 0 / 18px 18px;
  opacity: .85;
  mask-image: linear-gradient(to left, #000, transparent);
  pointer-events: none;
}

@media (min-width: 651px) {
  .psl-recruit .recruit-people {
    width: min(1200px, 96%);
    gap: 28px;
    margin-block: 44px 60px;
  }

  .psl-recruit .people-link {
    display: grid;
    grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
    gap: 10px 18px;
    align-items: start;
    min-height: 0;
    padding: 0 16px 0 0;
    border-radius: 0;
    background: #fff;
  }

  .psl-recruit .people-link .people-portrait {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: end;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .psl-recruit .people-link .people-portrait img,
  .psl-recruit .people-link:nth-child(2) .people-portrait img {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin-inline: auto;
    transform: none;
  }

  .psl-recruit .people-link .people-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    position: static;
    margin-top: 16px;
    padding-left: 12px;
    border-left: 4px solid #087fdd;
    color: #087fdd;
    font-size: clamp(42px, 6.6vw, 76px);
    letter-spacing: -.05em;
  }

  .psl-recruit .people-link p {
    grid-column: 2;
    grid-row: 2;
    top: auto;
    margin-block-start: clamp(24px, 4vw, 64px);
    padding-left: 16px;
    color: #202020;
    font-size: clamp(15px, 1.6vw, 19px);
    font-weight: 500;
    line-height: 1.7;
  }

  .psl-recruit .people-link .more {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: end;
    position: static;
    margin-bottom: 12px;
    padding: 7px 18px;
    border-radius: 0;
  }
}

/* PCの採用トップ：人物写真の高さを抑える */
@media (min-width: 769px) {
  .psl-recruit .people-link .people-portrait img,
  .psl-recruit .people-link:nth-child(2) .people-portrait img {
    width: auto;
    max-width: 92%;
    height: auto;
    max-height: clamp(230px, 29vw, 410px);
    object-fit: contain;
    object-position: center bottom;
  }

  .psl-recruit .people-link p {
    margin-block-start: clamp(20px, 2.7vw, 38px);
  }
}

/* 社員紹介ページの共通見出し */
.story-page .story-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px clamp(10px, 2vw, 16px);
  margin-bottom: 20px;
  color: #087fda;
  font-size: clamp(32px, 6.4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.story-page .story-title-ja {
  color: #222;
  font-family: sans-serif;
  font-size: clamp(14px, 2.2vw, 16px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* 社員紹介ページのタブレット幅の縦並び */
@media (min-width: 651px) and (max-width: 768px) {
  .story-page .message-card,
  .story-page .story-row,
  .story-page .story-row.intro,
  .story-page .story-row.photo-left {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .story-page .story-row {
    margin: 28px 0 20px;
  }

  .story-page .story-photo {
    width: min(100%, 720px);
    justify-self: center;
  }

  .story-page .message-card > .story-photo {
    width: min(100%, 460px);
  }

  .story-page .message-card > .story-photo img {
    aspect-ratio: auto;
  }

  .story-page .story-row > div:has(> h3) {
    display: contents;
  }

  .story-page .story-row h3 {
    grid-row: 1;
    margin: 0;
  }

  .story-page .story-row:has(h3) > .story-photo {
    grid-row: 2;
  }

  .story-page .story-row:has(h3) .story-copy {
    grid-row: 3;
  }

  .story-page .message-card {
    padding: 20px 0 0;
    margin-bottom: 56px;
  }

  .story-page .message-copy {
    padding: 0 clamp(16px, 5vw, 40px);
  }

  .story-page .message-copy .story-copy,
  .story-page .message-copy .representative {
    font-size: 16px;
  }

  .story-page .representative {
    margin: 0 0 12px;
  }

  .story-page .message-card > .blue-return {
    position: static;
    justify-self: end;
  }
}

/* スマホ幅だけ会社名と事業概要の間で改行 */
.story-page .business-summary .story-mobile-break {
  display: none;
}

@media (max-width: 650px) {
  .story-page .business-summary .story-mobile-break {
    display: initial;
  }
}

#top .hero.psl-hero .psl-hero__map-picture {
  display: contents;
}

/* トップのファーストビュー：タブレット幅では横書きと2列の紹介 */
@media (min-width: 651px) and (max-width: 1024px) {
  #top .hero.psl-hero {
    height: auto !important;
    top: 72px !important;
  }

  #top .hero.psl-hero .psl-hero__upper {
    display: grid;
    grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
    container-type: inline-size;
    align-items: center;
    gap: 14px 16px;
    width: 88%;
    height: auto;
    padding: 32px 0 24px;
  }

  #top .hero.psl-hero .psl-hero__title,
  #top .hero.psl-hero .psl-hero__english {
    position: static;
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
  }

  #top .hero.psl-hero .psl-hero__title {
    grid-row: 1;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    font-size: clamp(48px, 9.4vw, 94px);
  }

  #top .hero.psl-hero .psl-hero__title span {
    writing-mode: horizontal-tb;
  }

  #top .hero.psl-hero .psl-hero__title > span:last-child {
    margin-top: 0;
  }

  #top .hero.psl-hero .psl-hero__english {
    grid-row: 2;
    font-size: clamp(19px, 3.7vw, 37px);
    letter-spacing: .04em;
  }

  #top .hero.psl-hero .pc-description {
    display: none;
  }

  #top .hero.psl-hero .sp-description {
    display: block;
    position: static;
    width: auto;
    box-sizing: border-box;
    grid-area: 3 / 1;
    align-self: start;
    padding-block-start: 24px;
    padding-inline-start: calc(10% + 35px);
    font-size: clamp(13px, 1.9vw, 20px);
    line-height: 1.85;
  }

  #top .hero.psl-hero .hero-tablet-break {
    display: initial;
  }

  #top .hero.psl-hero .psl-hero__map-picture {
    display: block;
    grid-area: 3 / 2;
    align-self: start;
    min-width: 0;
    margin-top: 4px;
  }

  #top .hero.psl-hero .psl-hero__map {
    position: static;
    width: 100%;
    max-width: min(100%, 29cqw);
    height: auto;
    max-height: none;
    object-fit: contain;
    transform: none;
  }

  #top .hero.psl-hero .psl-hero__photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(260px, 40vw, 410px);
  }
}

/* スマホ・タブレットの事業内容：写真の外側を回る白い円弧 */
#business .business-photo-arc {
  display: none;
}

@media (min-width: 651px) and (max-width: 1024px) {
  #business .business-photo-arc {
    display: block;
    position: absolute;
    z-index: 3;
    inset: 4.5%;
    --arc-width: clamp(2px, .7vw, 4px);
    border-radius: 50%;
    background: conic-gradient(from 45deg, transparent 0deg 90deg, #fff 195deg 255deg, transparent 360deg);
    -webkit-mask-image: radial-gradient(circle closest-side, transparent calc(100% - var(--arc-width)), #000 calc(100% - var(--arc-width) + .6px), #000 calc(100% - .6px), transparent 100%);
    mask-image: radial-gradient(circle closest-side, transparent calc(100% - var(--arc-width)), #000 calc(100% - var(--arc-width) + .6px), #000 calc(100% - .6px), transparent 100%);
    pointer-events: none;
  }
}

@media (min-width: 651px) and (max-width: 1024px) {
  #business .business-photo-arc {
    inset: -5.5%;
  }
}

@media (min-width: 651px) and (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  #business .business-photo-arc {
    animation: business-photo-arc-turn 3s ease-in-out infinite;
  }
}

@keyframes business-photo-arc-turn {
  from {
    transform: rotate(0deg);
  }

  72%, to {
    transform: rotate(360deg);
  }
}

/* 横から入る事業紹介のアニメーションで横スクロールを出さない */
@media (max-width: 1024px) {
  #business {
    --business-divider: 1px solid #ffffff55;
    overflow-x: clip;
  }
}

/* スマホの事業内容：横長の写真の下に、赤地に白文字で説明を置く */
@media (max-width: 650px) {
  #business {
    --business-divider: 1px solid #ffffff66;
  }
  #business .business-showcase__slide {
    margin-inline: 0;
    padding-block: 24px 30px;
  }

  #business .business-showcase__slide + .business-showcase__slide {
    border-top: var(--business-divider);
  }

  #business .business-showcase__visual {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 auto 8px;
  }

  #business .business-showcase__visual > img {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    object-fit: cover;
  }

  #business .business-showcase__copy {
    background: transparent;
    margin: 0;
    padding: 6px 6% 0;
  }

  #business .business-showcase__copy h3 {
    font-size: clamp(14px, 5vw, 22px);
    margin: 0 0 8px;
    padding: 0;
    border: 0;
  }

  #business .business-showcase__copy h3 > span {
    font-size: 1em;
  }

  #business .business-showcase__copy > p:not(.business-showcase__english) {
    font-size: 14px;
    line-height: 1.8;
  }

  #business .business-showcase__copy > .business-showcase__english {
    display: none;
  }
}

/* タブレットの企業理念：2列を保ち、項目ごとに細い罫線を入れる */
@media (min-width: 651px) and (max-width: 1024px) {
  #philosophy .po-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 32px;
  }

  #philosophy .po-copy {
    border-top: 1px solid #ffffff77;
    padding-block: 16px 8px;
  }

  #philosophy .po-copy h3.po-heading {
    display: block;
    text-align: left;
    margin-bottom: 14px;
  }

  #philosophy .po-copy h3.po-heading .po-caption {
    display: block;
    margin-top: 6px;
  }

  #philosophy .po-copy h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  #philosophy .po-copy h4.po-vision-title {
    font-size: 17px;
  }

  #philosophy .po-copy p br {
    display: none;
  }

  #philosophy .po-value ul {
    list-style: disc;
    padding-inline-start: 1.2em;
  }

  #philosophy .po-value li {
    font-size: 14px;
    line-height: 1.8;
  }
}

/* 社名の由来：説明を列内で折り返す */
.name-origin-dialog #psl-name .psl-name__text {
  width: auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.wpcf7 .psl-required-label {
  position: relative;
  padding-inline-end: 76px;
}

.wpcf7 .psl-required-label .psl-required-badge {
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  white-space: nowrap;
}

@media (min-width: 651px) {
  .company-founded-mobile-break {
    display: none;
  }
}

@media (min-width: 651px) and (max-width: 1024px) {
  #philosophy .po-value li {
    font-size: 17px;
    font-weight: 700;
  }
}

@media (min-width: 651px) and (max-width: 1024px) {
  .site-header .global-nav {
    padding-inline: 0;
  }

  .site-header .global-nav > a:not(.nav-recruit):not(.nav-contact) {
    align-self: stretch;
    text-align: center;
  }
}

@media (max-width: 650px) {
  .psl-recruit .people-link {
    padding-top: 34px;
  }

  .psl-recruit .people-link--message {
    padding-top: 44px;
  }
}

.name-origin-dialog #psl-name .origin-intro-line {
  display: block;
}

.psl-recruit .people-link :is(.message-teaser, .voice-teaser) {
  text-align: center;
  padding-inline: 0;
}

@media (max-width: 1024px) {
  .site-header .global-nav > :is(.recruit-dropdown, .nav-recruit, .nav-contact) {
    align-self: center;
    margin-inline: auto;
  }
}

@media (max-width: 650px) {
  .name-origin-dialog #psl-name .origin-intro-line:first-child {
    font-size: min(12px, 5.2cqw);
    white-space: nowrap;
  }
}

@media (max-width: 1024px) {
  #business .business-showcase__sticky {
    border-bottom: var(--business-divider);
  }

  .psl-recruit .recruit-people {
    grid-auto-rows: 1fr;
  }

  .psl-recruit .requirements-paper {
    --recruit-job-font-size: 16px;
  }

  .psl-recruit .requirements-paper .recruit-content,
  .psl-recruit .requirements-paper > .recruit-invitation {
    font-size: var(--recruit-job-font-size);
  }

  .site-header .global-nav > .recruit-dropdown {
    width: fit-content;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .psl-recruit .requirements-paper {
    --recruit-job-font-size: 14px;
  }
}

/* タブレットのSafariでも、スクロール案内を写真の上に置く */
@media (min-width: 651px) and (max-width: 1024px) {
  #philosophy.po-section {
    position: relative;
  }

  #philosophy .hero-scroll {
    position: absolute;
    top: -76px;
    bottom: auto;
  }

  #company .company-name-layout {
    gap: 12px 20px;
    flex-wrap: wrap;
  }

  #company .company-name-copy {
    flex: 1 0 max-content;
    max-width: 100%;
  }

  #company .company-name-layout .name-origin-trigger {
    flex: 0 1 180px;
    width: 180px;
    margin-inline: 0;
  }
}

/* スマホの開閉メニュー：リクルートとお問い合わせを同じ中央線に揃える */
@media (max-width: 650px) {
  .site-header .global-nav > .recruit-dropdown {
    width: 100%;
    align-self: stretch;
  }

  .site-header .global-nav > .recruit-dropdown > summary.nav-recruit {
    display: flex;
    margin-inline: auto;
  }

  .site-header .global-nav > a.nav-contact,
  .site-header .global-nav > a.nav-recruit {
    align-self: center;
    margin-inline: auto;
  }
}

/* 採用ページの事業紹介は、スマホ・タブレットで文の区切りを揃える */
@media (min-width: 1025px) {
  .psl-recruit .recruit-service-break {
    display: none;
  }
}

@media (max-width: 650px) {
  .psl-recruit .recruit-sentence-ending {
    white-space: nowrap;
  }
}


.home-red-sections {
  display: contents;
}

@media (min-width: 1025px) {
  .psl-recruit #recruit-value .recruit-value-break {
    display: none;
  }
}

@media (min-width: 651px) and (max-width: 1024px) {
  .name-origin-dialog #psl-name .psl-name__columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .name-origin-dialog #psl-name .psl-name__column,
  .name-origin-dialog #psl-name .psl-name__column + .psl-name__column {
    min-width: 0;
    padding: 0 clamp(0px, 2vw, 20px);
    border: 0;
    box-shadow: none;
  }

  .name-origin-dialog #psl-name .psl-name__column + .psl-name__column {
    border-top: 1px solid #d96c62;
    padding-block-start: 18px;
  }

  .name-origin-dialog #psl-name .psl-name__definitions dd {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .name-origin-dialog #psl-name :is(.pc-br, .psl-name__definitions dd br:last-of-type, .psl-name__definitions dd br:nth-last-of-type(2)) {
    display: none;
  }

  #philosophy .po-value ul {
    list-style: none;
    padding-inline-start: 0;
  }

  #business .business-showcase__copy > p.business-description {
    font-size: clamp(15px, 1.8vw, 18px);
    overflow-wrap: anywhere;
  }

  #business .business-showcase__copy .business-heading-ending {
    white-space: nowrap;
  }

  /* Paint the whole section group above the sticky hero, including its margins. */
  #top .home-red-sections {
    position: relative;
    z-index: 1;
    display: flow-root;
    background-color: var(--red);
  }

  #top .home-red-sections > section {
    margin-block: 0;
    background-color: var(--red);
  }

  #philosophy.po-section {
    padding-block-end: 36px;
  }

  #company.section {
    padding-block: 56px 36px;
  }

}

@media (min-width: 651px) {
  .psl-recruit .people-link :is(.message-teaser, .voice-teaser) {
    container-type: inline-size;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-align: left;
    padding-inline-start: 16px;
  }

  .psl-recruit .people-link :is(.message-teaser-line, .voice-teaser-compact) {
    /* The longest line is the 27-character second Voice line. */
    font-size: 3.65cqw;
    white-space: nowrap;
  }
}

#top .hero.psl-hero .hero-name-meaning {
  display: inline-block;
  white-space: nowrap;
}

.name-origin-dialog #psl-name .origin-meaning-line {
  white-space: nowrap;
}

@media (max-width: 650px) {
  #top .hero.psl-hero .hero-name-meaning {
    display: block;
    font-size: min(1em, 3vw);
  }

  .name-origin-dialog #psl-name .origin-meaning-line {
    font-size: min(1em, 5.2cqw);
  }
}

@media (min-width: 651px) {
  #philosophy .po-copy {
    text-align: left;
  }
}

@media (min-width: 1025px) {
  #philosophy .po-vision p {
    font-size: min(clamp(12px, 1vw, 14px), 4.35cqw);
  }

  #philosophy :is(.po-mission, .po-value),
  #philosophy :is(.po-mission, .po-value) .po-heading,
  #philosophy .po-value ul {
    text-align: right;
  }

  #philosophy :is(.po-mission, .po-value) h3.po-heading {
    justify-content: flex-end;
  }

  #philosophy .po-vision h3.po-heading {
    text-align: left;
  }
}

@media (min-width: 1025px) {
  .psl-recruit .people-link :is(.message-teaser, .voice-teaser) {
    color: #3d4850;
    font-weight: 400;
  }

  .psl-recruit .people-link :is(.message-teaser-line, .voice-teaser-compact) {
    font-size: min(17px, 3.4cqw);
  }
}

.psl-policy-close {
  position: fixed;
  z-index: 999;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #c84c40;
  border-radius: 50%;
  background: #fff;
  color: #c84c40;
  text-decoration: none;
}

.psl-policy-close::before,
.psl-policy-close::after {
  content: "";
  grid-area: 1 / 1;
  width: 17px;
  height: 2px;
  background-color: currentColor;
}

.psl-policy-close::before {
  transform: rotate(45deg);
}

.psl-policy-close::after {
  transform: rotate(-45deg);
}

.admin-bar .psl-policy-close {
  top: calc(var(--wp-admin--admin-bar--height, 32px) + 12px);
}

.psl-policy-close:hover,
.psl-policy-close:focus-visible {
  background: #c84c40;
  color: #fff;
}
