/* 制作会社向けの頁（/partner/。2026-11-30・見本。指示書 docs/briefs/2026-11-30-partner-page.md）
   見た目はサイトに合わせる：青空の地（base.css の .sky）・白い字と影・字の太さ。長い文は、法律の頁（legal.css）と同じ
   「白い字・後ろに濃い青のうすい幕」の板で読ませる。押す物は、サイトの押す物と同じ黄色。
   道案内（router.js）は読まない頁なので、選ぶ物は html[data-page="partner"] と .partner の中に絞る */

/* ロゴは頁の頭に置いたまま、下へ送ると一緒に流れる（メニューも足もとも無いので、画面に留めない） */
html[data-page="partner"] .site-head { position: absolute; }

/* 「得意とする表現」の札や「トップに戻る」を押したとき、ぱっと切り替えず、するすると動いて移る
   （本人 2026-11-30「カチッと場面が切り替わんじゃなくて、スルスルッとスライドするような感じにして」）。動きを減らす設定の人には、すぐ移す */
html[data-page="partner"] { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html[data-page="partner"] { scroll-behavior: auto; }
}

.partner {
  padding-bottom: 56px;
  text-shadow: var(--shadow-text);
  /* 日本語は文節の途中で折り返さず、最後の行に 1〜2 字だけ落ちるのを避ける。入りきらない語だけは途中で折る（legal.css と同じ） */
  word-break: auto-phrase;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

/* ---- 最初の画面：3 本の作品の静止画を後ろに並べ、真ん中に濃い青のうすい幕の板 ---- */
/* 板は、右の絵の人物の顔にかからない所に置く（本人 2026-11-30「おじさんの顔が見えるぐらいまで下げて」）。
   後ろの絵は縦 9:16。列の幅で高さが決まるときは上から置かれ、画面のほうが高いときは画面の高さいっぱいになる。
   その見かけの高さ（--hero-img-h）から、あごの下の線（絵の上から 35%。--hero-face-line）を出し、板の上の端をその線より下にする。
   空きが十分あるときは今までの通り真ん中（上下のすき間 ::before と ::after が同じだけ伸びる）、足りないときだけ上のすき間が板を押し下げる。
   検査は tests/partner.test.mjs の 9 */
.p-hero {
  --hero-h: min(100vh, 860px);
  --hero-pad-top: 140px;
  --hero-img-h: max(var(--hero-h), calc(100vw / 3 * 16 / 9));
  --hero-face-line: calc(var(--hero-img-h) * 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--hero-h);
  padding: var(--hero-pad-top) 40px 48px;
  overflow: hidden;
}
@supports (height: 100svh) {
  .p-hero { --hero-h: min(100svh, 860px); }
}
.p-hero::before,
.p-hero::after { content: ""; flex: 1 1 0; }
.p-hero::before { min-height: max(0px, calc(var(--hero-face-line) + 16px - var(--hero-pad-top))); }
.p-hero-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.p-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* 絵の上に濃い青をうすく重ね、下の端は空の色へ溶かす（ロゴと板の字を読みやすく） */
.p-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(6, 28, 70, 0.55) 0%, rgba(6, 28, 70, 0.18) 34%, rgba(6, 28, 70, 0.18) 70%, rgba(42, 107, 196, 0.85) 100%);
}
.p-hero-board {
  position: relative;
  max-width: 780px;
  padding: 36px 44px 38px;
  border-radius: 20px;
  background: rgba(8, 40, 96, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--white);
  text-shadow: 0 1px 2px rgba(6, 28, 70, 0.65), 0 0 10px rgba(6, 28, 70, 0.35);
}
.p-title {
  margin: 0;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
}
/* 2 行になるときは「御社案件の」と「3D動画を作ります」の間だけで割る（語の途中で割らない。Safari は auto-phrase を知らないため、塊で持つ） */
.p-title .p-line { display: inline-block; }
.p-lead { margin: 20px 0 0; font-size: 17px; font-weight: 500; line-height: 1.95; }

/* ---- 節 ---- */
.p-sec {
  max-width: 1080px;
  margin: 72px auto 0;
  padding: 0 40px;
}
.p-h2 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.4; letter-spacing: 0.04em; }
.p-text { max-width: 46em; margin: 14px 0 0; font-size: 16px; font-weight: 500; line-height: 1.95; }
.p-h3 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.5; letter-spacing: 0.02em; }

/* 長い文の板（法律の頁と同じ幕） */
.p-board {
  margin: 18px 0 0;
  padding: 26px 30px 28px;
  border-radius: 20px;
  background: rgba(8, 40, 96, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--white);
  text-shadow: 0 1px 2px rgba(6, 28, 70, 0.65), 0 0 10px rgba(6, 28, 70, 0.35);
}
.p-board p { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.9; }
.p-board p + p { margin-top: 10px; }

/* ---- 制作の記録：作品ごとの段。手本の絵から中の仕組みまでを 4 つ並べ、完成（動画）はその下に大きく ---- */
.p-work {
  margin-top: 36px;
  padding: 26px 28px 30px;
  border-radius: 22px;
  background: rgba(8, 40, 96, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(6, 28, 70, 0.65), 0 0 10px rgba(6, 28, 70, 0.35);
}
.p-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: p-step;
}
.p-step { counter-increment: p-step; min-width: 0; }
.p-step figure { margin: 0; }
.p-step--done { grid-column: 1 / -1; }
.p-shot {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(6, 28, 70, 0.35);
}
.p-step figcaption { margin-top: 10px; }
.p-step--done figcaption { text-align: center; }
/* 動画の下の文が 2 行になるときは、行の長さをそろえて割る（スマートフォンの幅で「として」の途中で割れた。点検 2026-11-30） */
.p-step--done .p-step-text { text-wrap: balance; }
/* 段の名前の前に、順の番号を小さな丸で（字ではなく飾り） */
.p-step-name { display: block; font-size: 16px; font-weight: 800; line-height: 1.5; }
.p-step-name::before {
  content: counter(p-step);
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 700;
  text-shadow: none;
  vertical-align: 1px;
}
.p-step-text { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; line-height: 1.7; }

/* 作品の段の小見出し（作品名）と、説明の 1〜3 文 */
.p-h3-sub { margin: 4px 0 0; font-size: 14px; font-weight: 500; line-height: 1.6; opacity: 0.92; }
.p-work-intro { max-width: 46em; margin: 12px 0 0; font-size: 15px; font-weight: 500; line-height: 1.9; }
/* 縦の作品も、自転車の段と同じく上に静止画を 4 こま並べ、動画はその下に置く。縦長の絵が大きくなりすぎないよう、形はそのままで段の幅を絞る
   （本人 2026-11-30「必ず4つにして、縦長であったとしても少しサイズを小さくして、もう原形はそのままで」） */
.p-work--tate .p-steps { max-width: 720px; margin-inline: auto; }

/* ---- 得意とする表現：4 つの札。押すとその作品の段へ動く ---- */
.p-work { scroll-margin-top: 24px; }
.p-skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.p-skill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px 18px 20px;
  border-radius: 16px;
  background: rgba(8, 40, 96, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--white);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(6, 28, 70, 0.65), 0 0 10px rgba(6, 28, 70, 0.35);
}
.p-skill:hover { background: rgba(8, 40, 96, 0.55); }
/* 札の右に置く、白い線の小さな絵（飾り） */
.p-skills .p-skill { position: relative; padding-right: 76px; }
.p-skill-art {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--white);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
  filter: drop-shadow(0 1px 2px rgba(6, 28, 70, 0.5));
  transition: transform 0.16s ease, opacity 0.16s ease;
}
@media (hover: hover) {
  .p-skills .p-skill:hover .p-skill-art { opacity: 1; transform: translateY(-50%) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .p-skill-art { transition: none; }
  .p-skills .p-skill:hover .p-skill-art { transform: translateY(-50%); }
}
.p-skill-no { color: var(--yellow); font-family: var(--font-latin); font-size: 15px; font-weight: 700; letter-spacing: 0.08em; }
.p-skill-name { font-size: 17px; font-weight: 800; line-height: 1.5; }
/* 幅が 768〜1099px のときは 2 列にする（4 列のままだと札が細く、名前が語の途中で 2〜3 行に割れる。点検 2026-11-30） */
@media (min-width: 768px) and (max-width: 1099px) {
  .p-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- 制作で大切にしていること：物語と声の 2 枚の板（本人 2026-11-30「もう根幹かもしれない」）。板は .p-board と同じ幕 ---- */
.p-core {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
}
.p-core-item { margin: 0; }
.p-core-tag { display: block; color: var(--yellow); font-size: 14px; font-weight: 700; line-height: 1.5; letter-spacing: 0.08em; }
.p-core-item .p-h3 { margin-top: 6px; }
.p-core-item .p-h3 + p { margin-top: 12px; }

/* ---- 押すまで読み込まない動画（js/partner.js）。縦か横かは js/partner.js の表が data-orientation に入れる ---- */
.player {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #0b1f44;
  box-shadow: 0 8px 22px rgba(6, 28, 70, 0.4);
}
.player[data-orientation="landscape"] { aspect-ratio: 16 / 9; }
.player[data-orientation="portrait"] { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }
.p-work--yoko .player { max-width: 880px; margin-inline: auto; }
.player-poster { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 28, 70, 0.12);
  cursor: pointer;
}
.player-play:hover { background: rgba(6, 28, 70, 0.2); }
.player-play:focus-visible { outline-offset: -6px; border-radius: 14px; }
/* 再生の印：サイトの push と同じ黄色の丸に、黒い三角 */
.player-icon {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 3px 0 var(--yellow-deep), 0 9px 18px rgba(21, 24, 30, 0.42);
}
.player-icon::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 24px;
  border-style: solid;
  border-width: 15px 0 15px 24px;
  border-color: transparent transparent transparent var(--ink);
}
.player-play:active .player-icon { transform: translateY(2px); box-shadow: 0 1px 0 var(--yellow-deep), 0 5px 12px rgba(21, 24, 30, 0.4); }

/* 作っている様子（横の動画） */
.p-making .player { max-width: 880px; margin: 22px auto 0; }

/* ---- 進め方：番号つきの 5 つ ---- */
.p-flow { list-style: none; counter-reset: p-flow; }
.p-flow li {
  counter-increment: p-flow;
  position: relative;
  padding-left: 44px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
}
.p-flow li + li { margin-top: 12px; }
.p-flow li::before {
  content: counter(p-flow);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 15px;
  font-weight: 700;
  text-shadow: none;
}

/* ---- 締め：左にメールのボタン（黄色）、右に電話のボタン（LINE のような黄緑）。受付時間は電話のボタンの真下。
   その下に、屋号と名前・住所・電話番号を控えめな白い字で（Profile の頁と同じ表記） ---- */
.p-close { display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: 56px; }
.p-close-buttons { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px 18px; }
.p-close-item { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.p-btn-icon { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.p-call-hours { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.p-addr { margin: 0; font-style: normal; font-size: 13px; font-weight: 500; line-height: 1.8; text-align: center; }
.p-mail,
.p-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 264px;
  min-height: 58px;
  padding: 0 36px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: none;
}
.p-mail { background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 var(--yellow-deep), 0 6px 16px rgba(21, 24, 30, 0.22); }
/* 電話のボタン：LINE の黄緑に近い色・白い字 */
.p-call { background: #06c755; color: var(--white); box-shadow: 0 3px 0 #04993f, 0 6px 16px rgba(21, 24, 30, 0.22); }
/* カーソルを合わせると、少し浮いて明るくなる（揺らさない。本人 2026-11-30「ちょっと揺れるって感じじゃないけど、反応するようなボタンに」）。押すと沈む */
.p-mail,
.p-call { transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease; }
@media (hover: hover) {
  .p-mail:hover { transform: translateY(-3px); filter: brightness(1.05); box-shadow: 0 6px 0 var(--yellow-deep), 0 13px 24px rgba(21, 24, 30, 0.3); }
  .p-call:hover { transform: translateY(-3px); filter: brightness(1.07); box-shadow: 0 6px 0 #04993f, 0 13px 24px rgba(21, 24, 30, 0.3); }
}
.p-mail:active { transform: translateY(2px); filter: none; box-shadow: 0 1px 0 var(--yellow-deep), 0 3px 10px rgba(21, 24, 30, 0.2); }
.p-call:active { transform: translateY(2px); filter: none; box-shadow: 0 1px 0 #04993f, 0 3px 10px rgba(21, 24, 30, 0.2); }
.p-mail:focus-visible { outline-color: var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--yellow-deep), 0 0 0 6px rgba(255, 255, 255, 0.8); }
.p-call:focus-visible { outline-color: var(--ink); border-radius: 999px; box-shadow: 0 3px 0 #04993f, 0 0 0 6px rgba(255, 255, 255, 0.8); }

/* ---- いちばん下（小さめの字） ---- */
.p-small {
  max-width: 1080px;
  margin: 64px auto 0;
  padding: 0 40px;
  text-align: center;
}
.p-small p { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.8; }
.p-small p + p { margin-top: 4px; }
.p-small a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.p-small a:hover { text-decoration-thickness: 2px; }

/* ---- Works の頁へのリンク：札と同じ幕に、細い白い縁と黄色い丸の矢印。押したくなる程度に、目立ちすぎない
   （本人 2026-11-30「結構戻ってほしいから…若干目立つような感じ…あまり目立ちすぎないよう自然な感じ」） ---- */
.p-more { display: flex; justify-content: center; margin: 44px auto 0; padding: 0 40px; }
.p-more-link { flex-direction: row; align-items: center; gap: 26px; height: auto; padding: 16px 20px 17px 28px; border: 1px solid rgba(255, 255, 255, 0.4); transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease; }
.p-more-text { display: flex; flex-direction: column; gap: 3px; }
.p-more-go { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); transition: transform 0.16s ease; }
.p-more-go svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .p-more-link:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.75); }
  .p-more-link:hover .p-more-go { transform: translateX(4px); }
}

/* 動きを減らす設定の人には、浮かせない */
@media (prefers-reduced-motion: reduce) {
  .p-mail, .p-call, .p-more-link, .p-more-go { transition: none; }
  .p-mail:hover, .p-call:hover, .p-more-link:hover, .p-more-link:hover .p-more-go { transform: none; }
}

/* ---- 頁の頭へ戻るボタン（「得意とする表現」の札と同じ幕・黄色の印・白い太い字）。
   パソコンの幅では、締めの枠（.p-foot）の中で、電話のボタンの右下（住所の行の右）に置く。
   上からの位置は、ボタン 58 + 受付時間 30 + すき間 26 = 住所の頭 114px に、住所 3 行との高さの差の半分を足した値。
   スマートフォンの幅では、いちばん下に置く（下の @media） ---- */
.p-foot { position: relative; }
/* 右からの位置で決める：広い画面では真ん中から 196px 右（＝右から 50% - 382px）、狭い画面でも右の端から 24px はあける
   （left で決めると 768〜811px で右の端に寄り、Tab の輪郭が切れた。点検 2026-11-30） */
.p-totop { position: absolute; top: 122px; right: max(24px, calc(50% - 382px)); margin: 0; padding: 0; }
.p-totop-link { flex-direction: row; align-items: center; gap: 10px; height: auto; padding: 14px 28px 15px; font-size: 16px; font-weight: 800; letter-spacing: 0.04em; transition: transform 0.16s ease, background-color 0.16s ease; }
/* ほかのボタンと同じく、カーソルを合わせると少し浮く（動きを減らす設定の人には浮かせない） */
@media (hover: hover) {
  .p-totop-link:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .p-totop-link { transition: none; }
  .p-totop-link:hover { transform: none; }
}
.p-totop-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--yellow); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- スマートフォン（幅 767px まで。base.css と同じ境目） ---- */
@media (max-width: 767px) {
  .p-hero { --hero-pad-top: 104px; padding: var(--hero-pad-top) 16px 48px; }
  .p-hero-board { padding: 24px 20px 26px; border-radius: 18px; }
  .p-title { font-size: 27px; }
  .p-lead { margin-top: 14px; font-size: 15px; line-height: 1.85; }
  .p-sec { margin-top: 52px; padding: 0 16px; }
  .p-h2 { font-size: 23px; }
  .p-text { font-size: 15px; line-height: 1.85; }
  .p-h3 { font-size: 17px; }
  .p-board { padding: 20px 18px 22px; border-radius: 18px; }
  .p-board p, .p-flow li { font-size: 15px; line-height: 1.8; }
  .p-work { margin-top: 24px; padding: 18px 14px 22px; border-radius: 18px; }
  .p-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; margin-top: 14px; }
  .p-h3-sub { font-size: 12px; }
  .p-work-intro { font-size: 14px; line-height: 1.85; }
  .p-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-skill { padding: 14px 14px 16px; border-radius: 14px; }
  .p-skill-name { font-size: 15px; }
  /* 幅が狭いので、絵は番号の行の右上に小さく置く（札の名前に重ねない） */
  .p-skills .p-skill { padding-right: 14px; }
  .p-skill-art { top: 11px; right: 12px; width: 28px; height: 28px; transform: none; }
  .p-skills .p-skill:hover .p-skill-art { transform: none; }
  .p-core { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
  .p-core-tag { font-size: 13px; }
  .p-step-name { font-size: 14px; }
  .p-step-name::before { width: 20px; height: 20px; margin-right: 6px; font-size: 12px; }
  .p-step-text { font-size: 12px; }
  .player[data-orientation="portrait"] { max-width: 300px; }
  .player-icon { width: 64px; height: 64px; }
  .player-icon::before { left: 25px; top: 19px; border-width: 13px 0 13px 21px; }
  .p-close { margin-top: 44px; padding: 0 16px; }
  .p-close-buttons { flex-direction: column; align-items: center; width: 100%; gap: 14px; }
  .p-close-item { width: 100%; }
  .p-more { margin-top: 36px; padding: 0 16px; }
  .p-more-link { gap: 18px; padding: 14px 16px 15px 22px; }
  .p-totop { position: static; display: flex; justify-content: center; margin: 36px auto 0; padding: 0 16px; }
  .p-totop-link { padding: 13px 24px 14px; font-size: 15px; }
  .p-addr { font-size: 12px; }
  .p-mail, .p-call { width: 100%; max-width: 340px; min-width: 0; padding: 0 24px; font-size: 17px; }
  .p-small { margin-top: 48px; padding: 0 16px; }
  .p-small p { font-size: 12px; }
}
