/*
 * コーポレートサイト トップページ専用のスタイル
 * 仕様: docs/plans/2026-11-25-corp-top-renewal-design-spec.md
 * IR 側と共有している CSS は読み込まない。クラス名は top- で始める。
 *
 * ブレークポイント（仕様書 3 章）
 *   スマホ       799px 以下（設計幅 375px）
 *   タブレット   800〜1279px（設計幅 800px）
 *   デスクトップ 1280px 以上（設計幅 1280px）
 */

/* ---------- 色・文字・角丸の定義（仕様書 4〜5 章） ---------- */

:root {
  --top-color-brand: #e06249;
  --top-color-text: #2d2d2d;
  --top-color-text-sub: #333;
  --top-color-muted: #777;
  --top-color-blue: #2892d7;
  --top-color-required: #ff5e61;
  --top-color-error: #f94132;
  --top-color-bg: #fff;
  --top-color-header-bg: rgba(255, 255, 255, 0.8);
  --top-color-note-bg: #fdf7f6;
  --top-color-line: #e1e1e1;
  --top-color-skeleton: #e1e4e6;
  --top-color-input-border: #ccc;
  --top-shadow-card: 0 0 4px 1px rgba(0, 0, 0, 0.08);

  --top-radius-pill: 9999px;
  --top-radius-card: 8px;
  --top-radius-input: 4px;

  --top-font-ja: "Noto Sans JP", sans-serif;
  --top-font-en: "Roboto", "Noto Sans JP", sans-serif;

  --top-content-max: 1280px;
}

/* ---------- 土台 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--top-color-bg);
  color: var(--top-color-text);
  font-family: var(--top-font-ja);
  font-size: 14px;
  line-height: 24px;
  /* 「」、」のように約物が続くところを詰めない。Figma Sites のフォントは詰めないので、
     詰めると改行の位置がデザインとずれる（2026-12-01 に比べて決めた） */
  text-spacing-trim: space-all;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--top-color-brand);
  outline-offset: 2px;
}

/* ---------- ヘッダー（仕様書 8 章、outline の <header>） ---------- */

.top-header {
  position: relative;
  z-index: 16;
  width: 100%;
  background-color: var(--top-color-bg);
}

.top-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
}

.top-header__logo {
  flex-shrink: 0;
}

.top-header__logo img {
  width: 67px;
  height: 16px;
}

.top-header__menu-button {
  display: block;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.top-header__menu-button img {
  width: 36px;
  height: 36px;
}

/* スマホ・タブレットのメニュー。開閉は top.js（下の「動き」）。JS が動かないときは開いた状態で並べる（仕様書 10 章） */
.js .top-nav {
  display: none;
}

.no-js .top-header__menu-button {
  display: none;
}

.no-js .top-header__inner {
  flex-wrap: wrap;
}

.no-js .top-nav {
  width: 100%;
  padding-top: 8px;
}

.no-js .top-nav__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.25px;
  white-space: nowrap;
  color: var(--top-color-text);
}

.top-nav__external {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (min-width: 1280px) {
  .top-header {
    background-color: var(--top-color-header-bg);
  }

  .top-header__inner {
    height: 64px;
    gap: 40px;
    padding: 20px 40px;
    overflow: clip;
  }

  .top-header__logo img {
    width: 83px;
    height: 20px;
  }

  .top-header__menu-button,
  .no-js .top-header__menu-button {
    display: none;
  }

  .js .top-nav,
  .no-js .top-nav {
    display: block;
    flex: 1 0 0;
    min-width: 1px;
    width: auto;
    padding-top: 0;
  }

  .top-nav__list,
  .no-js .top-nav__list {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
  }

  .no-js .top-header__inner {
    flex-wrap: nowrap;
  }
}

/* ---------- 本文 ---------- */

.top-main {
  display: block;
}

/* ---------- 共通の部品（仕様書 7 章） ---------- */

/* セクションの枠。境目に 1px の線。余白は仕様書 6 章（セクションごとの違いは各セクションで上書きする） */
/* 線は高さに含めない（デザインは線を重ねて描いているため） */
/* セクションの下の区切り線。高さを増やさないよう、背景として下端に 1px で描く。
   線の長さは中身の最大幅まで（デザインどおり。1280px より広い画面では中央の 1280px だけ。2026-12-02 に 1920px で確かめた） */
.top-section {
  background-image: linear-gradient(var(--top-color-line), var(--top-color-line));
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: min(100%, var(--top-content-max)) 1px;
  scroll-margin-top: 0;
}

.top-section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: var(--top-content-max);
  margin: 0 auto;
  padding: 64px 20px;
}

@media (min-width: 800px) {
  .top-section__inner {
    gap: 40px;
    padding: 64px 40px;
  }
}

@media (min-width: 1280px) {
  .top-section__inner {
    padding: 96px 40px;
  }
}

/* セクション見出し: ピル型の枠に、丸い点・英字・和文 */
.top-heading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--top-radius-pill);
  box-shadow: inset 0 0 0 1px var(--top-color-brand);
  font-weight: 400;
  white-space: nowrap;
}

.top-heading::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--top-color-brand);
}

.top-heading__en {
  font-family: var(--top-font-en);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0.8px;
  color: var(--top-color-text);
}

.top-heading__ja {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-feature-settings: "pwid" 1;
  color: var(--top-color-brand);
}

@media (min-width: 1280px) {
  .top-heading {
    gap: 8px;
    padding: 8px 16px;
  }

  .top-heading::before {
    width: 8px;
    height: 8px;
  }

  .top-heading__en {
    font-size: 20px;
  }

  .top-heading__ja {
    font-size: 16px;
    letter-spacing: 0.04em;
  }
}

/* ボタン: 高さ 48px、角丸なし、1px の枠。右下の角に斜めの線 */
.top-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--top-color-brand);
  border-radius: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}

/* 斜めの線は、両端が枠線に重なるところまで描く（枠線の内側で止めると、拡大したときに線が枠線に届いていないように見える。
   2026-12-03 デザイン担当の指摘）。描く範囲を枠線の外側の端まで 1px 広げる */
.top-button::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  background: linear-gradient(
    to top left,
    transparent calc(50% - 0.5px),
    currentColor calc(50% - 0.5px),
    currentColor calc(50% + 0.5px),
    transparent calc(50% + 0.5px)
  );
  pointer-events: none;
}

/* 枠だけ（例: 採用サイトへ。幅 184px） */
.top-button--outline {
  background-color: var(--top-color-bg);
  color: var(--top-color-brand);
}

/* 塗り（例: 送信する。幅 144px） */
.top-button--filled {
  background-color: var(--top-color-brand);
  color: #fff;
}

/* 矢印付きの文字リンク（例: 一覧へ、サービスサイトへ） */
.top-textlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: var(--top-color-brand);
}

.top-textlink__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* アイコンが 16px のもの（サービスサイトへ、お問い合わせの案内のリンクなど） */
.top-textlink--small {
  gap: 8px;
}

.top-textlink--small .top-textlink__icon {
  width: 16px;
  height: 16px;
}

/* 画面の読み上げだけに渡す文字 */
.top-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- フッター（仕様書 8 章、outline の最後のまとまり） ---------- */

.top-footer {
  background-color: var(--top-color-bg);
}

/* スマホ: ロゴ / リンクと SNS / コピーライトの 3 段 */
.top-footer__inner {
  display: grid;
  grid-template-areas:
    "logo"
    "links"
    "copyright";
  row-gap: 16px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 20px;
}

.top-footer__logo {
  grid-area: logo;
  width: 82px;
  height: 24px;
}

.top-footer__copyright {
  grid-area: copyright;
  font-family: var(--top-font-en);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  white-space: nowrap;
  color: #666;
}

.top-footer__links {
  grid-area: links;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-footer__pages {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-footer__pages a {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.24px;
  white-space: nowrap;
  color: var(--top-color-text);
}

/* 区切り線。デザインは幅 0 の線を重ねて描いているので、左右に -0.5px ずつ詰めて幅を取らないようにする */
.top-footer__divider {
  display: block;
  width: 1px;
  height: 17px;
  margin: 0 -0.5px;
  background-color: var(--top-color-line);
}

.top-footer__sns {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-footer__sns a,
.top-footer__sns img {
  display: block;
  width: 24px;
  height: 24px;
}

/* タブレット・デスクトップ: 1 行に、ロゴ・コピーライト ……… リンク | SNS */
@media (min-width: 800px) {
  .top-footer__inner {
    grid-template-areas: "logo copyright . links";
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    column-gap: 16px;
    max-width: var(--top-content-max);
    padding: 24px 40px;
  }

  .top-footer__copyright {
    color: var(--top-color-muted);
  }

  .top-footer__links {
    justify-content: flex-start;
    gap: 28px;
  }

  .top-footer__pages a {
    color: var(--top-color-muted);
  }

  .top-footer__divider {
    height: 20px;
  }
}

@media (min-width: 1280px) {
  .top-footer__inner {
    column-gap: 20px;
  }
}

/* ==================== FV・私たちについて（M2） ==================== */

/* ---------- FV（仕様書 8 章「FV」、outline の <h1>「Get Together」から写真まで） ---------- */

/*
 * スマホ: 見出しの下に写真（間隔 16px）。
 * タブレット・デスクトップ: 見出しが写真の上端に重なる（154px・248px 引き上げる）。
 * 写真の高さは常に「画面幅 × 9/16」。1280px より広い画面でも写真は画面幅いっぱい、見出しは中央。
 */
.top-fv {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  isolation: isolate;
}

.top-fv__heading {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: var(--top-content-max);
  padding-top: 48px;
}

/* Medium（500）。デザイン担当の指定（2026-12-03。Figma Sites の画面では太らせた表示に見えるが、指定は Medium） */
.top-fv__title {
  font-family: var(--top-font-en);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--top-color-brand);
}

.top-fv__subtitle {
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--top-color-text);
}

/* 写真の高さは幅の帯ごとに固定（デザインどおり。スマホ 375×9/16、タブレット 450px、デスクトップ 720px）。
   幅は画面いっぱいに広がり、はみ出した上下は切り取る（object-fit: cover、中央基準）。2026-12-02 に公開版を 22 の幅で測って確かめた */
.top-fv__photos {
  position: relative;
  z-index: 1;
  width: 100%;
  height: calc(375px * 9 / 16);
  overflow: hidden;
}

/* 4 枚を重ねて置き、is-active の 1 枚だけを見せる。切り替えの動きは下の「動き」 */
.top-fv__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}

.top-fv__photo.is-active {
  opacity: 1;
}

@media (min-width: 800px) {
  .top-fv {
    gap: 0;
  }

  .top-fv__photos {
    height: 450px;
  }

  .top-fv__heading {
    gap: 32px;
    margin-bottom: -154px;
    padding-top: 56px;
  }

  .top-fv__title {
    font-size: 68px;
  }

  .top-fv__subtitle {
    font-size: 48px;
  }
}

@media (min-width: 1280px) {
  .top-fv__photos {
    height: 720px;
  }

  .top-fv__heading {
    gap: 40px;
    margin-bottom: -248px;
    padding-top: 80px;
  }

  .top-fv__title {
    font-size: 72px;
  }

  .top-fv__subtitle {
    font-size: 56px;
  }
}

/* ---------- 私たちについて（仕様書 8 章、10 章「MVV タブ」、_index.json の Introduce） ---------- */

/* 幅ごとに改行の位置が違う本文の <br> */
.top-about__br-wide {
  display: none;
}

@media (min-width: 800px) {
  .top-about__br-sp {
    display: none;
  }

  .top-about__br-wide {
    display: inline;
  }
}

.top-about__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* タブ: スマホは 3 等分、タブレット以上は 96px ずつ間隔 12px で中央に並ぶ */
.top-about__tabs {
  display: flex;
  justify-content: center;
  width: 100%;
}

.top-about__tab,
.top-about__panel-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  text-align: center;
}

.top-about__tab {
  flex: 1 0 0;
  min-width: 1px;
  color: #999;
}

/* Roboto は 400・500 だけを読み込んでいる。700 を指定すると、デザイン（Figma Sites）と同じく Medium を太らせた表示になる */
.top-about__tab-en {
  display: block;
  width: 100%;
  font-family: var(--top-font-en);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.2px;
}

.top-about__tab-ja {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.25px;
}

/* 選んでいるタブ: 英字は本文の色、和文はブランド色、下に 1px の線（デザインは内側の線なので高さを変えない） */
.top-about__tab[aria-selected="true"],
.top-about__panel-label {
  color: var(--top-color-text);
  box-shadow: inset 0 -1px 0 var(--top-color-brand);
}

.top-about__tab[aria-selected="true"] .top-about__tab-ja,
.top-about__panel-label .top-about__tab-ja {
  color: var(--top-color-brand);
}

/* タブと中身の間。スマホは 28px（Value だけ 40px）、タブレット 56px、デスクトップ 64px */
.top-about__panel {
  --top-about-panel-gap: 28px;
  width: 100%;
  margin-top: var(--top-about-panel-gap);
}

.top-about__panel--value {
  --top-about-panel-gap: 40px;
}

/* JS が動くとき: 選んでいるタブの中身だけを出す（切り替えは M5） */
.js .top-about__panel:not(.is-active) {
  display: none;
}

/* JS が動かないとき: タブを隠し、3 つの中身を見出し付きで縦に並べる（仕様書 10 章） */
.top-about__panel-label {
  display: none;
}

.no-js .top-about__tabs {
  display: none;
}

.no-js .top-about__body {
  gap: 64px;
}

.no-js .top-about__panel {
  margin-top: 0;
}

.no-js .top-about__panel-label {
  display: flex;
  width: 96px;
  margin: 0 auto var(--top-about-panel-gap);
}

/* 中身（Mission・Vision）: スマホとタブレットは縦積みで中央揃え */
.top-about__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.top-about__photo {
  width: 100%;
  height: 208px;
  object-fit: cover;
  border-radius: var(--top-radius-card);
}

/* Vision のイラスト。デザインは 376×270 の枠の上下を切り取って見せている（画像は切り取り済み） */
.top-about__illust {
  width: 322px;
  height: 208px;
  object-fit: cover;
}

.top-about__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.top-about__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-weight: 500;
}

/* Medium（500）。デザイン担当の指定（2026-12-03） */
.top-about__title-en {
  display: block;
  font-family: var(--top-font-en);
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--top-color-brand);
}

.top-about__title-ja {
  display: block;
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--top-color-text);
}

/*
 * 本文。デザインは 1 行ずつ並べて行間を空けている（スマホ 24px の行に間隔 8px）。
 * 1 つの段落で同じ見た目にするため、行の高さに間隔を足し、段落の上下を半分ずつ詰める。
 */
.top-about__lead {
  margin: -4px 0;
  font-size: 14px;
  line-height: 32px;
  letter-spacing: 0.3px;
  text-align: center;
  color: var(--top-color-text);
}

/* 「きっかけ」「和」「ことのはじまり」など */
.top-about__keyword {
  margin: 0 2px;
  font-weight: 500;
  color: var(--top-color-brand);
}

/* Value: 4 項目を 2 列に並べる（左の列が上から 1・2 項目め） */
.top-about__values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  grid-auto-flow: column;
  align-items: center;
  gap: 40px 20px;
  width: 100%;
}

.top-about__value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

/* Medium（500）。デザイン担当の指定（2026-12-03） */
.top-about__value-en {
  font-family: var(--top-font-en);
  font-weight: 500;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.02em;
  color: var(--top-color-brand);
}

.top-about__value-ja {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--top-color-text);
}

@media (min-width: 800px) {
  .top-about__tabs {
    gap: 12px;
  }

  .top-about__tab {
    flex: 0 0 96px;
  }

  .top-about__tab-en {
    font-size: 18px;
  }

  .top-about__panel,
  .top-about__panel--value {
    --top-about-panel-gap: 56px;
  }

  .top-about__content {
    gap: 56px;
  }

  .top-about__photo {
    height: 240px;
  }

  .top-about__illust {
    width: 376px;
    height: 240px;
  }

  .top-about__title {
    flex-direction: row;
    justify-content: center;
  }

  .top-about__lead {
    font-size: 16px;
    line-height: 36px;
  }

  /* Value の本文だけ、行の間隔が 10px */
  .top-about__panel--value .top-about__lead {
    margin: -5px 0;
    line-height: 38px;
  }

  .top-about__values {
    gap: 56px 20px;
  }

  .top-about__value {
    gap: 16px;
  }

  .top-about__value-en {
    font-size: 24px;
    line-height: 24px;
  }

  .top-about__value-ja {
    font-size: 18px;
    line-height: 1;
  }
}

/* デスクトップ: 画像と文章が横に並ぶ（間隔 64px）。文章は左揃え */
@media (min-width: 1280px) {
  .top-about__panel,
  .top-about__panel--value {
    --top-about-panel-gap: 64px;
  }

  .top-about__content {
    flex-direction: row;
    gap: 64px;
  }

  .top-about__photo {
    flex-shrink: 0;
    width: 448px;
  }

  /* イラストの枠は 448px 幅（イラストは 376px で中央） */
  .top-about__illust {
    flex-shrink: 0;
    margin: 0 36px;
  }

  .top-about__text {
    flex: 1 0 0;
    min-width: 1px;
    justify-content: center;
    gap: 32px;
  }

  .top-about__title {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .top-about__title-en {
    font-size: 48px;
  }

  .top-about__title-ja {
    font-size: 36px;
  }

  .top-about__lead,
  .top-about__panel--value .top-about__lead {
    margin: -5px 0;
    line-height: 38px;
    text-align: left;
  }

  /* Value: 左に 2 列の項目、右に本文。上揃えで、上下に 20px */
  .top-about__panel--value .top-about__content {
    align-items: flex-start;
    gap: 0;
    padding: 20px 0;
  }

  .top-about__values {
    flex: 1 0 0;
    min-width: 1px;
    align-items: start;
    gap: 80px 40px;
  }

  .top-about__value {
    align-items: flex-start;
    text-align: left;
  }

  .top-about__value-ja {
    font-size: 20px;
  }

  .top-about__panel--value .top-about__lead {
    flex: 0 0 auto;
  }
}


/* ==================== サービス・経営陣紹介（M2） ==================== */

/* ---------- サービス・経営陣紹介の共通（仕様書 6 章、outline の Service / Management） ---------- */

/* 見出しと中身の間は、スマホでも 40px（outline の 375px 版） */
.top-service .top-section__inner,
.top-management .top-section__inner {
  gap: 40px;
}

/* ---------- サービス（仕様書 8 章、outline の Service） ---------- */

.top-service__list {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
}

/* スマホ: 画像が上、文章が下の縦積み */
.top-service__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* TOIRO の段だけ、画像と文章の間が 8px（outline の 375px 版） */
.top-service__row--toiro {
  gap: 8px;
}

.top-service__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.top-service__logo img {
  width: 138px;
  height: 24px;
}

.top-service__logo--toiro img {
  width: 79px;
  height: 18px;
}

.top-service__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.top-service__catch {
  font-weight: 700;
  font-size: 18px;
  line-height: 32px;
  letter-spacing: 0.72px;
  color: var(--top-color-text);
}

.top-service__desc {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  color: var(--top-color-text-sub);
}

/* デザインの改行の位置を幅ごとに合わせる
   --catch: キャッチコピーの改行（スマホとデスクトップ。タブレットは 1 段落で折り返す）
   --desc: TOIRO の説明の 1 文目のあとの改行（デスクトップだけ） */
.top-service__br--desc {
  display: none;
}

.top-service__image {
  order: -1;
  width: 100%;
  height: 240px;
}

.top-service__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* タブレット: 左に文章、右に画像（間隔 20px、画像の高さ 320px） */
@media (min-width: 800px) {
  .top-service__row,
  .top-service__row--toiro {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }

  .top-service__body {
    flex: 1 0 0;
    min-width: 1px;
    width: auto;
  }

  .top-service__br--catch {
    display: none;
  }

  .top-service__image {
    order: 0;
    flex: 1 0 0;
    min-width: 1px;
    width: auto;
    height: 320px;
  }
}

/* デスクトップ: 間隔 48px、画像の高さ 400px、キャッチコピー 24px / 40px */
@media (min-width: 1280px) {
  .top-service__row,
  .top-service__row--toiro {
    gap: 48px;
  }

  .top-service__body {
    gap: 28px;
  }

  .top-service__logo img {
    width: 161px;
    height: 28px;
  }

  .top-service__logo--toiro img {
    width: 88px;
    height: 20px;
  }

  .top-service__text {
    gap: 20px;
  }

  .top-service__catch {
    font-size: 24px;
    line-height: 40px;
    letter-spacing: 0.96px;
  }

  .top-service__br--catch,
  .top-service__br--desc {
    display: inline;
  }

  .top-service__image {
    height: 400px;
  }
}

/* ---------- 経営陣紹介（仕様書 8・10 章、outline の Management） ---------- */

/* スマホ: 1 列（間隔 48px） */
.top-management__list {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
}

/* スマホの 1 名: 写真の列（128px）と文章の列を横に並べる。奇数番目は写真が左、偶数番目は右 */
.top-member {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "photo profile"
    "photo detail";
  column-gap: 20px;
  align-items: start;
}

.top-member:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) 128px;
  grid-template-areas:
    "profile photo"
    "detail photo";
}

.top-member__profile {
  grid-area: profile;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.top-member__role {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  color: var(--top-color-brand);
}

/* 氏名と英字名。入りきらないときは英字名を次の行へ送る */
.top-member__names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}

.top-member__name {
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0.7px;
  white-space: nowrap;
  color: var(--top-color-text);
}

.top-member__name-en {
  font-family: var(--top-font-en);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: var(--top-color-text);
}

/* 写真（正方形に切り抜き済みの画像）。下端に、左 24px がブランド色・残りが #e1e1e1 の線が重なる */
.top-member__photo {
  grid-area: photo;
  position: relative;
  width: 128px;
  height: 128px;
  margin-top: 8px;
  overflow: hidden;
}

.top-member__photo img {
  width: 100%;
  height: 100%;
}

.top-member__photo::after,
.top-member::after {
  background: linear-gradient(
    to right,
    var(--top-color-brand) 0,
    var(--top-color-brand) 24px,
    var(--top-color-line) 24px
  );
}

.top-member__photo::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
}

/* 経歴と More。More は写真と反対側に寄せる */
.top-member__detail {
  grid-area: detail;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.top-member:nth-child(even) .top-member__detail {
  align-items: flex-start;
}

.top-member__bio {
  width: 100%;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  color: var(--top-color-text);
}

.top-member__more {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--top-radius-card);
  font-family: var(--top-font-en);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: var(--top-color-brand);
}

.top-member__more-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* 開閉（仕様書 10 章）。JS が動くときは経歴を 2 行で切り、More で全文を開く。
   開いている状態は M5 の JS が .top-member に .is-open を付け、ボタンの aria-expanded を true にする */
.js .top-member__bio {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.js .top-member.is-open .top-member__bio {
  display: block;
  -webkit-line-clamp: none;
  line-clamp: none;
  overflow: visible;
}

.top-member__more-text--close,
.top-member.is-open .top-member__more-text {
  display: none;
}

.top-member.is-open .top-member__more-text--close {
  display: inline;
}

/* 開いているあいだは矢印を上向きにする（デザインの Active=True の矢印） */
.top-member.is-open .top-member__more-icon {
  transform: rotate(180deg);
}

/* JS が動かないときは全文を出し、More は出さない */
.no-js .top-member__more {
  display: none;
}

/* タブレット: 3 列で 3 名・2 名・3 名（列の間隔 48px、行の間隔 64px）。
   6 つの列に 1 名 2 列ずつ置き、4 人目を 2 列目から始めて 2 段目を中央に寄せる */
@media (min-width: 800px) {
  .top-management__list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 64px;
    align-items: start;
  }

  .top-member,
  .top-member:nth-child(even) {
    grid-column: span 2;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "profile"
      "photo"
      "line"
      "detail";
  }

  .top-member:nth-child(4) {
    grid-column: 2 / span 2;
  }

  /* 写真の下の線は 1 名の幅いっぱい。写真の最下段 1px に重ねる */
  .top-member::after {
    content: "";
    grid-area: line;
    position: relative;
    z-index: 1;
    height: 1px;
    margin-top: -1px;
  }

  .top-member__photo {
    justify-self: center;
    width: 144px;
    height: 144px;
  }

  .top-member__photo::after {
    content: none;
  }

  .top-member__detail,
  .top-member:nth-child(even) .top-member__detail {
    align-items: flex-end;
    gap: 6px;
    margin-top: 16px;
  }

  .top-member__names {
    flex-wrap: nowrap;
  }

  .top-member__more {
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
  }
}

/* デスクトップ: 列の間隔 72px、行の間隔 80px。1 名は左右 16px の余白の中で、左に役職と氏名、右に写真 */
@media (min-width: 1280px) {
  .top-management__list {
    column-gap: 72px;
    row-gap: 80px;
  }

  .top-member,
  .top-member:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) 160px;
    grid-template-areas:
      "profile photo"
      "line line"
      "detail detail";
    column-gap: 0;
    padding: 0 16px;
  }

  .top-member__profile {
    align-self: center;
    gap: 8px;
  }

  .top-member__role {
    font-size: 16px;
    line-height: 28px;
  }

  .top-member__names {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .top-member__name {
    font-size: 24px;
    line-height: 32px;
    letter-spacing: 0.95px;
  }

  .top-member__name-en {
    font-size: 14px;
    line-height: 24px;
  }

  .top-member__photo {
    justify-self: auto;
    width: 160px;
    height: 160px;
    margin-top: 0;
  }

  .top-member__detail,
  .top-member:nth-child(even) .top-member__detail {
    gap: 8px;
    margin-top: 24px;
  }
}


/* ==================== 会社情報・採用情報・お問い合わせ（M2） ==================== */

/* ---------- 会社情報（仕様書 8 章、outline の Company） ---------- */

.top-company .top-section__inner {
  gap: 40px;
}

/* スマホ・タブレット: 一覧の下に地図。デスクトップ: 左に一覧、右に地図 */
.top-company__body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.top-company__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

/* スマホ: アイコン（36px）の右に、項目名と内容を縦に並べる */
.top-company__term {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
}

.top-company__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  /* 項目名の下端（6 + 24px）から 4px あけて内容を置くため、dt の高さを 34px にする */
  margin-bottom: -2px;
}

.top-company__label {
  padding-top: 6px;
}

.top-company__value {
  margin: 0 0 0 48px;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0.3px;
  overflow-wrap: anywhere;
}

/* 所在地・関連会社はスマホだけ 14px / 24px */
.top-company__item--long .top-company__value {
  font-size: 14px;
  line-height: 24px;
}

/* 関連会社は項目名と内容の間が 8px */
.top-company__item--related .top-company__value {
  margin-top: 4px;
}

.top-company__related {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-company__related-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.top-company__related-link {
  color: var(--top-color-brand);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

/* Google マップ（いまのページと同じ埋め込み。高さはすべての幅で 384px） */
.top-company__map {
  width: 100%;
  height: 384px;
}

.top-company__map-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 800px) {
  /* アイコン（40px）・項目名（幅 64px）・内容を横に並べる */
  .top-company__item {
    display: flex;
    align-items: flex-start;
  }

  .top-company__term {
    flex-shrink: 0;
    align-items: center;
  }

  .top-company__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
  }

  .top-company__label {
    width: 64px;
    padding-top: 0;
  }

  .top-company__value,
  .top-company__item--long .top-company__value {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 0 0 20px;
    padding-top: 8px;
    font-size: 16px;
    line-height: 28px;
  }

  /* 資本金だけ、デザインは項目名を内容の 1 行目の上下中央にそろえている（ほかの項目はアイコンの中央） */
  .top-company__item--label-on-value .top-company__label {
    position: relative;
    top: 2px;
  }

  /* 会社名と設立は、内容をアイコンの上下中央に揃える（デザインどおり） */
  .top-company__item--center .top-company__value {
    padding-top: 6px;
  }

  .top-company__item--related .top-company__value {
    margin-top: 0;
  }

  /* タブレットだけ、関連会社 2 社を横に並べ、間に縦線 */
  .top-company__related {
    flex-direction: row;
  }

  .top-company__related-item {
    flex: 1 1 0;
    min-width: 0;
  }

  .top-company__related-item:first-child {
    border-right: 1px solid var(--top-color-line);
  }
}

@media (min-width: 1280px) {
  .top-company__body {
    flex-direction: row;
    align-items: flex-end;
  }

  .top-company__list,
  .top-company__map {
    flex: 1 1 0;
    min-width: 0;
  }

  .top-company__related {
    flex-direction: column;
  }

  .top-company__related-item:first-child {
    border-right: 0;
  }
}

/* ---------- 採用情報（仕様書 8 章、outline の Recruit） ---------- */

.top-recruit .top-section__inner {
  gap: 40px;
  padding-bottom: 40px;
}

/* 見出し「（ロゴ）のメンバーと気軽に話そう!」。スマホは 2 行（行の間 16px） */
.top-recruit__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  font-size: 28px;
  line-height: 32px;
  letter-spacing: 0.95px;
  text-align: center;
  color: var(--top-color-text);
  /* デザイン（Figma Sites）は Medium を機械的に太らせて表示している。本物の Bold（700）より、
     500 に 0.6px の輪郭を足したほうが近い（2026-12-01 に画素で比べて決めた） */
  -webkit-text-stroke: 0.6px currentColor;
}

/* ロゴの下端を文字のベースラインに揃える */
/* ロゴは文字の下端（ベースライン）にそろえる。フォントのファイルの違いで行が 1px 低くなるため、
   スマホとデスクトップでは 1px 持ち上げて、デザインと同じ行の高さ・文字の位置にする（2026-12-01 に測って決めた） */
.top-recruit__logo {
  display: inline-block;
  width: auto;
  height: 28px;
  margin-right: 6px;
  vertical-align: 1px;
}

@media (min-width: 800px) and (max-width: 1279px) {
  .top-recruit__logo {
    vertical-align: baseline;
  }
}

/* 本文。スマホは 2 行（行の間 4px） */
.top-recruit__lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  text-align: center;
}

.top-recruit__accent {
  font-weight: 500;
  color: var(--top-color-brand);
}

.top-recruit__button {
  width: 184px;
}

.top-recruit__photo {
  position: relative;
  width: 100%;
  max-width: 1024px;
}

.top-recruit__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 400;
  object-fit: cover;
}

@media (min-width: 800px) {
  .top-recruit__title {
    display: block;
    font-size: 32px;
    line-height: 40px;
    letter-spacing: 1.5px;
  }

  .top-recruit__logo {
    height: 32px;
  }

  .top-recruit__lead {
    display: block;
    font-size: 16px;
    line-height: 28px;
  }

  /* 写真の下端を白くぼかす。デザインではセクションの下端から 120px（写真にかかるのは下の 80px） */
  .top-recruit__photo::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 80px;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.667));
    pointer-events: none;
  }
}

@media (min-width: 1280px) {
  .top-recruit .top-section__inner {
    padding-bottom: 64px;
  }

  .top-recruit__title {
    font-size: 36px;
  }

  .top-recruit__logo {
    height: 36px;
  }

  .top-recruit__photo::after {
    height: 160px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
  }
}

/* ---------- お問い合わせ（仕様書 8・12 章、outline の Contact） ---------- */

/* 見出しの下は 40px（ほかのセクションと同じ）。公開版はスマホだけ 64px だったが、デザイン担当の指摘で 40px にした（2026-12-03）。
   デスクトップは 64px（下の 1280px 以上） */
.top-contact .top-section__inner {
  gap: 40px;
}

/* スマホ: 案内の下にフォーム（間 80px）。タブレット: 最大幅 560px（間 64px）。デスクトップ: 2 列（間 80px） */
.top-contact__body {
  display: flex;
  flex-direction: column;
  gap: 80px;
  width: 100%;
  max-width: 1024px;
}

.top-contact__info {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.top-contact__guide {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-contact__lead {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  color: var(--top-color-text-sub);
}

/* 注意書き 3 点 */
.top-contact__notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--top-radius-card);
  background-color: var(--top-color-note-bg);
}

.top-contact__note {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
}

.top-contact__note::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  margin-top: 10px;
  border-radius: 50%;
  background-color: var(--top-color-brand);
}

/* インスタベースへの問い合わせ先 2 つ（枠付き。スマホは縦、タブレット以上は横に並べる） */
.top-contact__supports {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-contact__support {
  display: flex;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 12px;
  box-shadow: inset 0 0 0 1px var(--top-color-brand); /* 線は高さに含めない（デザインと同じ） */
  background-color: var(--top-color-bg);
  color: var(--top-color-text);
  white-space: normal;
  text-align: center;
}

.top-contact__support-text {
  flex: 1 1 0;
  min-width: 0;
}

.top-contact__support .top-textlink__icon {
  align-self: center;
}

/* 文言の改行位置は幅ごとにデザインに合わせる */
.top-contact__br--tab,
.top-contact__br--pc {
  display: none;
}

/* 予約サポートのカード。スマホは写真が上（高さ 144px）、タブレット以上は写真が左（幅 184px） */
.top-contact__booking {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--top-radius-card);
  overflow: hidden;
  background-color: var(--top-color-bg);
}

/* 枠線は写真の上に重ねる（デザインどおり） */
.top-contact__booking::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--top-color-line);
  border-radius: inherit;
  pointer-events: none;
}

.top-contact__booking-photo {
  position: relative;
  height: 144px;
}

.top-contact__booking-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-contact__booking-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 16px;
}

.top-contact__booking-logo {
  width: 111px;
  height: 20px;
}

.top-contact__booking-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-contact__booking-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0.3px;
}

.top-contact__booking-desc {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
}

.top-contact__booking-more {
  align-self: stretch;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  text-align: right;
}

.top-contact__booking-link {
  color: var(--top-color-blue);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

/* カード全体を押せるようにする（いまのページと同じ） */
.top-contact__booking-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* フォーム。項目は縦に並び、間隔 24px、最大幅 480px。スマホ・タブレットは中央に寄せる */
.top-contact__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.top-contact__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 480px;
}

.top-contact__label {
  display: flex;
  align-items: flex-start;
  align-self: flex-start;
  gap: 2px;
  font-weight: 700;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
}

/* お問い合わせ内容の欄だけ、デザインは「*」を上下中央に置いている（ほかの欄は上揃え） */
.top-contact__label--center {
  align-items: center;
}

/* 必須の「*」は 20px に揃える（仕様書 16 章 #2） */
.top-contact__required {
  font-family: var(--top-font-en);
  font-weight: 400;
  font-size: 20px;
  line-height: 20px;
  letter-spacing: 0.8px;
  color: var(--top-color-required);
}

.top-contact__input {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--top-color-input-border);
  border-radius: var(--top-radius-input);
  background-color: var(--top-color-bg);
  color: var(--top-color-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  -webkit-appearance: none;
  appearance: none;
}

.top-contact__textarea {
  height: 172px;
  min-height: 40px;
  max-height: 480px;
  padding: 8px 12px;
  resize: vertical;
}

/* 入力エラーの表示（中身は M4 で入れる）。欄の枠を赤くし、欄の下 8px に文言 */
.top-contact__input[aria-invalid="true"] {
  border-color: var(--top-color-error);
}

.top-contact__error {
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--top-color-error);
}

.top-contact__error:empty {
  display: none;
}

/* プライバシーポリシーへの同意 */
.top-contact__check {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.top-contact__checkbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 4px 2px;
  border: 1px solid #999;
  border-radius: 4px;
  background-color: var(--top-color-bg);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.top-contact__checkbox:checked {
  border-color: var(--top-color-brand);
  background: var(--top-color-brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px 12px no-repeat;
}

.top-contact__check-label {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.top-contact__privacy-link {
  margin-right: 4px;
  color: var(--top-color-brand);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.top-contact__field--privacy .top-contact__error,
.top-contact__field--recaptcha .top-contact__error {
  text-align: center;
}

/* reCAPTCHA。部品が読み込まれる前から場所を取っておき、読み込み後にずれないようにする。
   本物の部品は 78px だが、デザインの絵は 76px なので 76px だけ取り、下端の 2px は下の余白に重ねる */
.top-contact__field--recaptcha {
  align-items: center;
  width: auto;
}

.top-contact__field--recaptcha .g-recaptcha {
  height: 76px;
}

/* 送信ボタンと、その下の送信失敗の文言（M4 で入れる。間隔 8px） */
.top-contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
}

.top-contact__submit {
  width: 144px;
}

/* 「送信する」には斜めの線を付けない（デザインどおり。2026-12-03 デザイン担当の指摘） */
.top-contact__submit::after {
  content: none;
}

.top-contact__status {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  text-align: center;
  color: var(--top-color-error);
}

.top-contact__status:not(:empty) {
  margin-top: 8px;
}

@media (min-width: 800px) {
  .top-contact__body {
    gap: 64px;
    max-width: 560px;
  }

  .top-contact__supports {
    flex-direction: row;
  }

  .top-contact__supports-item {
    flex: 1 1 0;
    min-width: 0;
  }

  .top-contact__support {
    gap: 8px;
    padding: 12px 16px;
  }

  .top-contact__br--sp {
    display: none;
  }

  .top-contact__br--tab {
    display: inline;
  }

  .top-contact__booking {
    flex-direction: row;
  }

  .top-contact__booking-photo {
    flex: 0 0 184px;
    height: auto;
  }

  .top-contact__booking-body {
    flex: 1 1 0;
    min-width: 0;
    border-left: 1px solid var(--top-color-line);
  }
}

@media (min-width: 1280px) {
  .top-contact .top-section__inner {
    gap: 64px;
  }

  .top-contact__body {
    flex-direction: row;
    align-items: flex-start;
    gap: 80px;
    max-width: 1024px;
  }

  .top-contact__info,
  .top-contact__form-area {
    flex: 1 1 0;
    min-width: 0;
  }

  .top-contact__support {
    gap: 12px;
    padding: 12px;
  }

  .top-contact__br--tab {
    display: none;
  }

  .top-contact__br--pc {
    display: inline;
  }

  .top-contact__form,
  .top-contact__field--recaptcha,
  .top-contact__actions {
    align-items: flex-start;
  }

  .top-contact__check {
    justify-content: flex-start;
  }

  .top-contact__field--privacy .top-contact__error,
  .top-contact__field--recaptcha .top-contact__error,
  .top-contact__status {
    text-align: left;
  }
}

/* ==================== ニュース（M3。仕様書 8 章「ニュース」、9 章、11 章） ==================== */

/* 余白（上・左右・下）: スマホ 40・20・96px、タブレット 40・40・96px、デスクトップ 64・40・96px */
.top-news__inner {
  align-items: flex-start;
  gap: 24px;
  padding: 40px 20px 96px;
}

.top-news__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.top-news__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
}

/* JS が動かないときは記事を読み込めないので、一覧は出さない（「一覧へ」は残る） */
.no-js .top-news__list {
  display: none;
}

.top-news__link,
.top-news__item--skeleton {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

/* マウスを乗せると 1.025 倍に拡大（3 件とも。仕様書 9 章・16 章）。0.3 秒、イージング B（デザインの設定どおり） */
.top-news__link {
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.top-news__link:hover {
  transform: scale(1.025);
}

@media (prefers-reduced-motion: reduce) {
  .top-news__link {
    transition: none;
  }

  .top-news__link:hover {
    transform: none;
  }
}

/* カテゴリ・縦線・日付 */
.top-news__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.top-news__category {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  color: var(--top-color-text);
}

.top-news__category:empty {
  display: none;
}

.top-news__category:empty + .top-news__divider {
  display: none;
}

.top-news__divider {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  margin: 0 -0.5px; /* デザインは幅 0 の線を重ねて描いている */
  background-color: var(--top-color-brand);
}

.top-news__date {
  flex: 1 0 0;
  min-width: 1px;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--top-color-muted);
}

/* タイトル。長いときは「…」で切る（スマホ 2 行、タブレット以上 3 行） */
.top-news__title {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0.3px;
  color: var(--top-color-text);
}

/* 読み込み中のスケルトン（いまの rebase.co.jp と同じ見え方。仕様書 11 章） */
.top-news__bar {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background-color: var(--top-color-skeleton);
}

.top-news__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  animation: top-news-skeleton 1.2s linear infinite;
}

@keyframes top-news-skeleton {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-news__bar::after {
    animation: none;
    display: none;
  }
}

/* 帯の大きさは、それぞれの文字の行に合わせる（行の高さの中に、文字の高さぶんの帯） */
.top-news__bar--category {
  width: 56px;
  height: 14px;
  margin: 5px 0;
}

.top-news__bar--date {
  width: 80px;
  height: 12px;
  margin: 4px 0;
}

.top-news__bar--title {
  width: 100%;
  height: 16px;
  margin: 6px 0;
}

/* タイトルの帯。1 行 28px（帯 16px ＋ 上下 6px）で並べる */
.top-news__bars {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.top-news__bar--short {
  width: 60%;
}

/* スマホはタイトル 2 行なので、3 本目の帯は出さない */
.top-news__item--skeleton .top-news__bar--short {
  display: none;
}

@media (min-width: 800px) {
  .top-news__inner {
    gap: 28px;
    padding: 40px 40px 96px;
  }

  .top-news__list {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }

  .top-news__item {
    flex: 1 0 0;
    min-width: 1px;
  }

  .top-news__link,
  .top-news__item--skeleton {
    gap: 12px;
  }

  .top-news__title {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .top-news__item--skeleton .top-news__bar--short {
    display: block;
  }
}

@media (min-width: 1280px) {
  /* デザインは、ニュースの見出しの和文だけ字間 0.32px（ほかの見出しは 0.64px） */
  .top-news .top-heading__ja {
    letter-spacing: 0.32px;
  }

  .top-news__inner {
    gap: 40px;
    padding: 64px 40px 96px;
  }

  .top-news__list {
    gap: 40px;
  }

  .top-news__date {
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.3px;
  }

  .top-news__bar--date {
    height: 14px;
    margin: 5px 0;
  }
}

/* ==================== お問い合わせフォームの状態（M4。仕様書 12 章） ==================== */

/* 送信中: ボタンを押せなくし、表記を「送信中…」に、右下の斜めの線を消して不透明度 50% */
.top-contact__submit-label--sending {
  display: none;
}

.top-contact__form.is-sending .top-contact__submit-label {
  display: none;
}

.top-contact__form.is-sending .top-contact__submit-label--sending {
  display: inline;
}

.top-contact__form.is-sending .top-contact__submit {
  opacity: 0.5;
  cursor: default;
}

.top-contact__form.is-sending .top-contact__submit::after {
  content: none;
}

/* 送信完了（デザインの contact-done）。フォームを隠して、同じ場所に出す */
.top-contact__done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.top-contact__done[hidden] {
  display: none;
}

.top-contact__done-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
}

.top-contact__done-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.top-contact__done-title {
  width: 100%;
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0.95px;
  text-align: center;
  color: var(--top-color-text);
}

.top-contact__done-title:focus {
  outline: none;
}

.top-contact__done-title:focus-visible {
  outline: 2px solid var(--top-color-brand);
  outline-offset: 4px;
}

.top-contact__done-en {
  font-family: var(--top-font-en);
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0.8px;
  color: var(--top-color-brand);
}

.top-contact__done-text {
  width: 100%;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.3px;
  text-align: center;
  color: var(--top-color-text-sub);
}

/* スマホは見出しを「お問い合わせ」「ありがとうございます」の 2 行にする */
@media (min-width: 800px) {
  .top-contact__done-br {
    display: none;
  }
}

/* 入力エラーの欄（JustValidate が is-invalid を付ける。aria-invalid は top.js が付ける） */
.top-contact__input.is-invalid {
  border-color: var(--top-color-error);
}

/* フォームを隠したとき（送信完了）。display: flex の指定が hidden 属性に勝たないようにする */
.top-contact__form[hidden] {
  display: none;
}

/* お問い合わせ内容の欄は、エラー文言が出ても欄全体の高さ（204px）を変えず、入力欄を 144px に縮める（デザインどおり） */
.top-contact__field:has(> .top-contact__error:not(:empty)) .top-contact__textarea {
  height: 144px;
}

/* 送信完了の見出し。デザインは Medium を機械的に太らせた表示なので、採用情報の見出しと同じく 0.6px の輪郭を足す */
.top-contact__done-title {
  -webkit-text-stroke: 0.6px currentColor;
}

/* タブレットだけ、デザインはプライバシーポリシーのエラー文言を、左に寄せた幅 472px の枠の中で中央にそろえている */
@media (min-width: 800px) and (max-width: 1279px) {
  .top-contact__field--privacy .top-contact__error {
    width: 472px;
    max-width: 100%;
    align-self: flex-start;
    text-align: center;
  }
}

/* ==================== 動き（M5。仕様書 9 章・10 章） ==================== */

/* イージング A: cubic-bezier(0, 0, 0.58, 1)（仕様書 9 章） */

/* ---------- FV の写真: 2 秒表示して、1 秒のフェードで次へ ---------- */
.top-fv__photo {
  transition: opacity 1s cubic-bezier(0, 0, 0.58, 1);
}

/* ---------- MVV タブ: 下線と中身がそれぞれ 0.5 秒で入れ替わる（デザインどおり。文字の色はすぐ変わる） ---------- */
/* 下線: 前のタブで消えながら、新しいタブで現れる（デザインの設定どおり 0.5 秒、イージング A）。
   色だけを変えるため、選んでいないタブにも透明な線を置く。
   公開版は途中の色が灰色がかるが、Figma の描画の都合とみなし、合わせない（2026-12-02 依頼者の方針） */
.js .top-about__tab {
  transition: box-shadow 0.5s cubic-bezier(0, 0, 0.58, 1);
}

.js .top-about__tab:not([aria-selected="true"]) {
  box-shadow: inset 0 -1px 0 transparent;
}

/* 中身: 前の中身は、切り替える直前の位置に重ねたまま消える（位置は JS が入れる）。新しい中身は本来の位置で現れる */
.js .top-about__body {
  position: relative;
}

/* 前の中身は、白い地ごと新しい中身の上に重ねる。新しい中身は、前の中身が薄くなるにつれて見えてくる（公開版の見え方に近い）。
   重ねないと、HTML で後ろにある新しい中身が上に描かれ、2 つの文章が半透明で重なって読みにくくなる */
.js .top-about__panel.is-leaving {
  display: block;
  position: absolute;
  z-index: 1;
  margin-top: 0;
  background-color: var(--top-color-bg);
  pointer-events: none;
  animation: top-about-fade-out 0.5s cubic-bezier(0, 0, 0.58, 1) forwards;
}

.top-about__panel.is-entering {
  animation: top-about-fade-in 0.5s cubic-bezier(0, 0, 0.58, 1);
}

@keyframes top-about-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 消え始めの不透明度は JS が入れる（現れている途中で次のタブが押された場合は、その時点の値から消す） */
@keyframes top-about-fade-out {
  from {
    opacity: var(--top-about-leave-from, 1);
  }
  to {
    opacity: 0;
  }
}

/* ---------- ハンバーガーメニュー（スマホ・タブレット。デザインの Header_sp の Active=True） ---------- */
.top-header__menu-icon--close {
  display: none;
}

.top-header.is-open .top-header__menu-icon {
  display: none;
}

.top-header.is-open .top-header__menu-icon--close {
  display: block;
}

@media (max-width: 1279px) {
  /* ヘッダーのすぐ下、右端に開くパネル。項目が 9 つあるので、幅は最低 160px で、いちばん長い項目に合わせて広げる */
  .js .top-header.is-open .top-nav {
    display: block;
    position: absolute;
    top: 100%;
    right: 20px; /* デザインどおり。閉じるボタン（右の余白 24px）より 4px 右に出る */
    min-width: 160px;
    padding: 20px;
    background-color: var(--top-color-bg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }

  .js .top-header.is-open .top-nav__list {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  .js .top-header.is-open .top-nav__link {
    gap: 8px;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.3px;
  }
}

/* ==================== 折り返し（どの幅でも整って見えるように。2026-12-02） ==================== */

/* 段落の最後の行が 1〜2 文字だけにならないようにする（対応していないブラウザでは、いままでどおり）。
   Chrome 系のブラウザだけに当てる。Safari（WebKit）の text-wrap: pretty は段落全体の行の長さをそろえるため、
   左揃えの文章で各行の右に大きな余白（最大 70px ほど）ができる（2026-12-03、デザイン担当の iOS Safari での指摘。
   WebKitGTK 2.54 で確かめた）。目印には、いまは Chrome 系だけが対応している word-break: auto-phrase を使う */
@supports (word-break: auto-phrase) {
  body {
    text-wrap: pretty;
  }
}

/* 中央に置く短い見出しと文: 行の長さをそろえ、日本語は文節の切れ目で折り返す */
.top-about__title-ja,
.top-about__lead,
.top-service__catch,
.top-recruit__title-line,
.top-recruit__lead-line {
  word-break: auto-phrase;
  text-wrap: balance;
}

/* スマホの設計幅（375px）より狭い画面では、スマホ用の改行の位置で 1 行に収まらないため、改行を外して文節で折り返す */
@media (max-width: 374px) {
  .top-about__br-sp {
    display: none;
  }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  .top-fv__photo,
  .js .top-about__tab {
    transition: none;
  }

  .top-about__panel.is-entering,
  .js .top-about__panel.is-leaving {
    animation: none;
  }
}
