/* =========================================================
   XUPDATE LP – base styles
   デスクトップのレイアウトは HTML のインラインスタイル（Claude Design で
   確定したデザイン）をそのまま使用。ここでは共通設定と、
   タブレット／スマホ向けの上書き（!important）を定義する。
   ========================================================= */

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: #ffffff;
  color: #1a2530;
  -webkit-font-smoothing: antialiased;
}
a { color: #1e6e96; }
a:hover { color: #164f6c; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid #1e6e96; outline-offset: 1px; }

/* ページ全体は 1280px 固定幅で中央寄せ（デスクトップ） */
.page {
  width: 1280px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  /* 注意: ここに overflow: hidden を付けると固定ヘッダー(sticky)が効かなくなる */
}
body.contact .page { background: #f4f7fa; }

/* ヘッダーを上部に固定（スクロールしても常に表示） */
.page > header {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 #e6ebf0, 0 6px 20px rgba(15,30,43,0.06);
}

/* ボタンのホバー */
a[href="contact.html"]:hover, a[href="https://uman-jp.com/#contact"]:hover, button[type="submit"]:hover { filter: brightness(1.06); }
a[style*="background: #ffffff"][href="contact.html"]:hover, a[style*="background: #ffffff"][href="https://uman-jp.com/#contact"]:hover { color: #b8300f; }

/* フォーム送信後メッセージ */
.form-done {
  display: none;
  padding: 16px 18px;
  border-radius: 8px;
  background: #eaf4f9;
  border: 1px solid #b9d6e5;
  color: #1e6e96;
  font-size: 14px;
  line-height: 1.8;
}
.form-done.show { display: block; }
.field-error { border-color: #d93a16 !important; }

/* =========================================================
   タブレット（〜1024px）
   ========================================================= */
@media (max-width: 1024px) {
  .page { width: 100%; }
  .page > header { padding: 0 20px !important; height: 72px !important; }
  .page > header img { height: 44px !important; }
  .page > header nav { gap: 16px !important; font-size: 13px !important; }
  .page > header nav a[href="contact.html"], .page > header nav a[href="https://uman-jp.com/#contact"] { padding: 10px 16px !important; }
  section, footer, main { padding-left: 32px !important; padding-right: 32px !important; }
  h2 { font-size: 32px !important; }
  p[style*="white-space: nowrap"], h2[style*="white-space: nowrap"], h3[style*="white-space: nowrap"], span[style*="white-space: nowrap"] { white-space: normal !important; }
}

/* =========================================================
   スマホ（〜767px）
   ========================================================= */
@media (max-width: 767px) {
  .page > header nav a:not([href="contact.html"]):not([href="https://uman-jp.com/#contact"]) { display: none !important; }
  section, footer, main { padding: 56px 20px !important; }
  .page > header { padding: 0 16px !important; }

  /* 見出し・本文 */
  h1 { font-size: 36px !important; line-height: 1.25 !important; }
  h2 { font-size: 26px !important; line-height: 1.4 !important; }
  h3 { font-size: 19px !important; }
  p { font-size: 15px !important; }
  p br, h2 br { display: none; }

  /* ヒーロー */
  #top > section:nth-of-type(1) { height: auto !important; flex-direction: column !important; align-items: flex-start !important; gap: 32px !important; padding: 48px 20px 40px !important; }
  #top > section:nth-of-type(1) > div { max-width: 100% !important; width: 100% !important; }
  #top > section:nth-of-type(1) img[alt="XUPDATE クロスアップデート"] { width: 78% !important; }
  #top > section:nth-of-type(1) img[alt=""] { display: none !important; }
  #top > section:nth-of-type(1) span[style*="font-size: 28px"] { font-size: 20px !important; }

  /* 数値バンド */
  #top > section:nth-of-type(2) { flex-wrap: wrap !important; gap: 24px 32px !important; justify-content: space-around !important; padding: 28px 16px !important; }
  #top > section:nth-of-type(2) > div { width: 40% !important; }
  #top > section:nth-of-type(2) span[style*="font-size: 34px"] { font-size: 30px !important; }

  /* グリッド（3列・2列）を1列に */
  div[style*="grid-template-columns: repeat(3"], div[style*="grid-template-columns: repeat(2"] { grid-template-columns: 1fr !important; }

  /* 「AIに使われる側に陥るケース」ブロック */
  #problem div[style*="display: flex; align-items: stretch"] { flex-direction: column !important; }
  #problem div[style*="width: 360px"] { width: 100% !important; padding: 28px 20px 8px !important; }
  #problem div[style*="padding: 40px 40px"] { padding: 20px !important; }
  #problem div[style*="font-size: 22px; font-weight: 700; text-align: center"] { font-size: 17px !important; padding: 14px 16px !important; }
  #problem div[style*="border-top: 4px solid #d93a16"] { font-size: 17px !important; padding: 16px !important; }

  /* 原因（2カラム→縦） */
  section div[style*="display: flex; gap: 48px; align-items: center"] { flex-direction: column !important; gap: 24px !important; }
  section div[style*="width: 440px"] { width: 100% !important; }
  section div[style*="padding: 22px 28px; background: #f4f7fa"] { padding: 18px !important; }
  section div[style*="width: 60px; height: 60px"] { width: 48px !important; height: 48px !important; }

  /* XUPDATEとは：定義ボックスと図解 */
  #solution div[style*="border-left: 6px solid #d93a16"] { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; padding: 20px !important; }
  #solution div[style*="padding: 8px 24px 0"] { padding: 0 !important; }
  #solution div[style*="display: flex; align-items: center; gap: 0"] { flex-direction: column !important; gap: 16px !important; }
  #solution div[style*="width: 160px"] { width: 100% !important; height: auto !important; }
  #solution div[style*="display: flex; align-items: stretch; gap: 0"] { flex-direction: column !important; gap: 16px !important; }
  #solution div[style*="font-size: 24px; font-weight: 900; line-height: 1.45"] { font-size: 20px !important; }
  #solution div[style*="font-size: 22px; font-weight: 900; line-height: 1.5"] { font-size: 18px !important; }
  #solution p[style*="font-size: 34px"] { font-size: 22px !important; }
  #solution svg[width="120"] { width: 72px !important; height: 72px !important; }

  /* 選ばれる理由 */
  #reason span[style*="font-size: 26px"] { font-size: 19px !important; }

  /* 受講生の声 */
  #voice span[style*="font-size: 56px"] { font-size: 44px !important; }
  #voice span[style*="font-size: 30px"] { font-size: 24px !important; }
  #voice blockquote { padding: 20px !important; }

  /* 開催までの流れ（横並び→縦） */
  #flow div[style*="display: flex; align-items: stretch; width: 100%"] { flex-direction: column !important; gap: 8px !important; }
  #flow div[style*="width: 32px"] { width: 100% !important; height: 32px !important; }
  #flow div[style*="width: 32px"] svg { transform: rotate(90deg); }

  /* 会社概要 */
  section div[style*="width: 110px"] { width: 84px !important; font-size: 15px !important; }

  /* 最終CTA */
  #contact { padding: 64px 20px !important; }
  #contact h2 { font-size: 26px !important; }
  #contact img[alt=""] { width: 420px !important; right: -160px !important; }
  #contact img[alt="XUPDATE クロスアップデート"] { width: 220px !important; }

  /* フッター */
  footer > div { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }
  footer nav { flex-wrap: wrap !important; gap: 12px 18px !important; }

  /* お問い合わせページ */
  body.contact main { flex-direction: column !important; gap: 28px !important; padding: 40px 20px 56px !important; }
  body.contact form { width: 100% !important; padding: 24px 20px 28px !important; }
  body.contact h1 { font-size: 26px !important; }
  body.contact button[type="submit"] { align-self: stretch !important; text-align: center; }
}
