/* Progmile — smartphone overrides (≤767px). Desktop layout stays inline; these rules only apply on small screens. */
/* 日本語の改行を文節（て・に・を・は）単位に寄せる。全画面共通 */
body{word-break:auto-phrase;overflow-wrap:anywhere;line-break:strict}
p,li,dd,td,th,span,a,div{text-wrap:pretty}
h1,h2,h3{text-wrap:balance}
@media (max-width:767px){
  html,body{overflow-x:hidden}
  img,video,iframe{max-width:100%}
  /* generic utilities — opt-in via data-m="token token" */
  [data-m~="col"]{grid-template-columns:minmax(0,1fr)!important}
  [data-m~="col2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  [data-m~="stack"]{flex-direction:column!important;align-items:stretch!important}
  [data-m~="stackc"]{flex-direction:column!important;align-items:center!important}
  [data-m~="wrap"]{flex-wrap:wrap!important}
  [data-m~="px"]{padding-left:20px!important;padding-right:20px!important}
  [data-m~="py"]{padding-top:56px!important;padding-bottom:56px!important}
  [data-m~="pt0"]{padding-top:0!important}
  [data-m~="pad"]{padding:24px 20px!important}
  [data-m~="hide"]{display:none!important}
  [data-m~="show"]{display:flex!important}
  [data-m~="block"]{display:block!important}
  [data-m~="nobr"] br{display:none}
  [data-m~="nowrap-off"]{white-space:normal!important}
  [data-m~="full"]{width:100%!important;max-width:none!important;min-width:0!important}
  /* 採用情報：一日の流れの時刻カラムを詰める */
  [data-screen-label="Schedule"] [style*="width: 80px"]{width:44px!important;padding-right:8px!important;font-size:14px!important}
  [data-screen-label="Schedule"] [style*="padding-left: 15px"]{padding-left:10px!important}
  [data-screen-label="Schedule"] p{font-size:14px!important;padding:10px 12px!important;line-height:1.75!important}
  /* 採用情報：INTERVIEW 見出しの斜めカットが本文を隠さないように */
  [data-screen-label="Interview"]>div:first-child{clip-path:none!important;padding:48px 20px 40px!important;margin-bottom:40px!important}
  [data-screen-label="Interview"]>div:first-child>div{grid-template-columns:minmax(0,1fr) auto!important;gap:18px!important;align-items:start!important}
  [data-screen-label="Interview"]>div:first-child>div>div:last-child{flex-direction:column!important;gap:10px!important}
  [data-screen-label="Interview"]>div:first-child>div>div:last-child>div{width:88px!important}
  [data-screen-label="Interview"] h2{font-size:26px!important}
  /* スマホではキャッチコピーを常時表示 */
  [data-screen-label="Interview"] a[data-iv] [data-catch]{opacity:1!important;transform:none!important;min-height:0!important;font-size:15px!important}
  [data-screen-label="Interview"]>div:first-child p{font-size:13px!important;line-height:1.85!important}
  [data-m~="static"]{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important}
  [data-m~="center"]{text-align:center!important}
  [data-m~="left"]{text-align:left!important}
  [data-m~="gap"]{gap:16px!important}
  [data-m~="gap24"]{gap:24px!important}
  [data-m~="mt0"]{margin-top:0!important}
  [data-m~="mt24"]{margin-top:24px!important}
  [data-m~="mt40"]{margin-top:40px!important}
  [data-m~="mx0"]{margin-left:0!important;margin-right:0!important}
  [data-m~="h1"]{font-size:32px!important;line-height:1.3!important}
  [data-m~="h2"]{font-size:24px!important;line-height:1.4!important}
  [data-m~="h3"]{font-size:20px!important;line-height:1.5!important}
  [data-m~="t15"]{font-size:15px!important}
  [data-m~="t14"]{font-size:14px!important}
  [data-m~="ls0"]{letter-spacing:.04em!important}
  [data-m~="hauto"]{height:auto!important;min-height:0!important}
  [data-m~="order1"]{order:1!important}
  [data-m~="order2"]{order:2!important}
  [data-m~="noshadow"]{box-shadow:none!important}
  [data-m~="ratio43"]{aspect-ratio:4/3!important}
  [data-m~="btn"]{width:100%!important;min-width:0!important;box-sizing:border-box!important;justify-content:center!important}
  [data-m~="gap24"]{gap:24px!important}
  /* 共通の読みやすさ調整 */
  section{padding-top:56px!important;padding-bottom:56px!important}
  h1{font-size:clamp(28px,8vw,38px)!important;line-height:1.3!important}
  h2{font-size:clamp(20px,5.6vw,26px)!important;line-height:1.45!important}
  input,textarea,select{font-size:16px!important}
  label{padding-top:0!important}

  /* ページ上部の共通ヒーロー：スマホでは背景アニメを抑え、高さも詰める */
  [data-screen-label="Page Hero"]{height:160px!important}
  [data-screen-label="Page Hero"]>div:first-child{transform:scale(.4);transform-origin:88% 50%}
  [data-screen-label="Page Hero"]>div:last-child{padding-left:20px!important;padding-right:36%!important}
  [data-screen-label="Page Hero"] h1{font-size:21px!important;margin-top:8px!important;letter-spacing:.1em!important}
  [data-screen-label="Page Hero"]>div:last-child>div{min-width:0!important;max-width:100%!important;padding:13px 16px!important;border-radius:12px!important}
  [data-screen-label="Page Hero"]>div:last-child>div>div:last-child{margin-top:6px!important;font-size:11px!important}

  /* 採用情報：ヒーローの高さを画面の4割程度に */
  [data-screen-label="Recruit Hero"]{height:auto!important;min-height:0!important;padding:40px 0 32px!important}
  [data-screen-label="Recruit Hero"]>div:nth-child(3){position:relative!important;padding:0 20px!important;height:auto!important;display:block!important}
  [data-screen-label="Recruit Hero"] h1{font-size:44px!important;margin-bottom:22px!important}
  [data-screen-label="Recruit Hero"] p{font-size:14px!important;line-height:1.9!important}
  [data-screen-label="Recruit Hero"]>div:last-child{position:relative!important;left:auto!important;bottom:auto!important;margin:26px 0 0 20px!important}

  /* 採用情報：Benefits 4カードを2×2で横並びに */
  [data-screen-label="Benefits"]>div[style*="flex-wrap"]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
  [data-screen-label="Benefits"] [data-card]{width:auto!important;padding:18px 14px!important}
  [data-screen-label="Benefits"] [data-card]>div:first-child{font-size:17px!important}
  [data-screen-label="Benefits"] [data-card] span+span{font-size:13px!important}

  /* 各事業ページ：偶数番セクションはスマホでも「番号→タイトル→本文→画像」の順にする */
  #mobile>div>div:first-child,
  #power>div>div:first-child,
  #subsidy>div>div:first-child,
  #hp>div>div:first-child,
  #agent>div>div:first-child,
  #welfare>div>div:first-child{order:2!important}
  #mobile>div>div:last-child,
  #power>div>div:last-child,
  #subsidy>div>div:last-child,
  #hp>div>div:last-child,
  #agent>div>div:last-child,
  #welfare>div>div:last-child{order:1!important}

  /* 代表挨拶：本文の行末を揃えて読みやすくする */
  [data-screen-label="ご挨拶"] p,
  [data-screen-label="President Message"] p{text-align:justify!important;text-justify:inter-ideograph!important;word-break:normal!important;line-break:strict!important}

  /* インタビュー詳細：冠と顔写真の間に余白、PREV/BACK/NEXTを横並びに */
  [data-screen-label="Interview Body"]>div>div:first-child{transform:translateY(-24px)!important;margin-bottom:8px!important}
  [data-screen-label="Interview Body"] a{min-width:0!important;width:auto!important;flex:1 1 0!important;padding:14px 8px!important;font-size:12px!important;letter-spacing:.06em!important}
  [data-screen-label="Interview Body"]>div>div:last-child{flex-wrap:nowrap!important;gap:8px!important}

  /* ニュース記事：前／一覧／次 を横一列のまま */
  [data-m~="news-nav"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin-top:48px!important}
  [data-m~="news-nav"] a{padding:14px 6px!important;font-size:12px!important;letter-spacing:.04em!important;white-space:nowrap}

  /* header */
  [data-m~="hd-nav"]{display:none!important}
  [data-m~="hd-burger"]{display:flex!important}
  [data-m~="hd-root"]{height:64px!important;padding:0 16px 0 20px!important;gap:16px!important}

  /* footer */
  [data-m~="ft-grid"]{grid-template-columns:minmax(0,1fr)!important;gap:32px!important;padding:56px 20px 40px!important}

  /* TOP page */
  [data-m~="top-hero"]{height:auto!important;min-height:0!important;padding-top:0!important;padding-bottom:24px!important}
  [data-m~="top-img"]{position:relative!important;left:0!important;right:0!important;top:0!important;bottom:auto!important;height:40vh;min-height:360px;max-height:440px}
  [data-m~="top-title"]{left:20px!important;right:20px!important;top:28px!important}
  [data-m~="top-scrim"]{background:linear-gradient(180deg,rgba(16,22,32,.74) 0%,rgba(16,22,32,.62) 60%,rgba(16,22,32,.3) 100%)!important}
  [data-m~="top-copy"]{top:24px!important}
  [data-m~="top-title"] h1{font-size:44px!important}
  [data-m~="top-copy"] h1{font-size:30px!important;line-height:1.5!important}
  [data-m~="top-title"] p{font-size:15px!important;letter-spacing:.08em!important;margin-top:20px!important}
  [data-m~="top-copy"] h1+div{font-size:13px!important;line-height:1.85!important;margin-top:20px!important}
  [data-m~="top-dots"]{left:20px!important;bottom:auto!important;top:calc(clamp(360px,40vh,440px) - 30px)!important}
  [data-m~="top-news"]{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important;margin:28px 16px 0!important;padding:20px 18px 2px!important}
  [data-m~="top-news-row"]{display:flex!important;flex-wrap:wrap!important;gap:8px 12px!important;padding:14px 0!important}
  [data-m~="top-news-title"]{flex:1 1 100%!important;font-size:14px!important;line-height:1.7}
  [data-m~="top-news-cat"]{padding:3px 12px!important;font-size:11px!important}
  [data-m~="top-spacer"]{height:48px!important}
  [data-m~="logo-stage"]{min-height:0!important;height:calc(100vh - 64px)!important;top:64px!important}
  [data-m~="logo-title"]{left:20px!important;top:24px!important}
  [data-m~="logo-title"] h2{font-size:15px!important;letter-spacing:.2em!important}
  [data-m~="logo-num"]{font-size:150px!important;left:auto!important;right:-2%!important;bottom:auto!important;top:8px!important}
  [data-m~="logo-scene"]{left:50%!important;top:22%!important;width:160px!important;height:160px!important;margin:-80px 0 0 -80px!important}
  [data-m~="logo-glow"]{left:50%!important;top:24%!important;width:260px!important;height:260px!important;margin-left:-130px}
  [data-m~="logo-card"]{left:14px!important;right:14px!important;width:auto!important;min-width:0!important;max-width:none!important;top:auto!important;bottom:14px!important;transform:none!important;padding:18px 18px 16px!important;border-radius:16px!important}
  [data-m~="logo-card"] [data-m~="logo-head"]{font-size:24px!important;margin-top:8px!important}
  [data-m~="logo-card"] [data-m~="logo-body"]{font-size:13px!important;line-height:1.75!important;margin-top:10px!important}
  [data-m~="logo-card"] [data-m~="logo-body"] p{margin:0 0 6px!important}
  [data-m~="logo-card"] [data-m~="logo-body"] br{display:none}
  [data-m~="logo-segs"]{margin-top:14px!important;gap:8px!important}
  [data-m~="logo-segs"] [data-m~="logo-seg-label"]{font-size:10px!important;margin-top:6px!important;letter-spacing:.12em!important}
}
@media (max-width:767px) and (max-height:700px){
  [data-m~="logo-scene"]{width:120px!important;height:120px!important;margin:-60px 0 0 -60px!important;top:20%!important}
  [data-m~="logo-card"] [data-m~="logo-body"]{font-size:12px!important;line-height:1.65!important}
  [data-m~="logo-card"] [data-m~="logo-head"]{font-size:20px!important}
}
