/* AI 共通（既存CSSと衝突しにくいよう ai- スコープ） */
:root{
  --ai-brand:#053050;
  --ai-ink:#0f172a;
  --ai-bg:#ffffff;
  --ai-muted:rgba(255,255,255,.85);
  --ai-border:rgba(255,255,255,.18);
  --ai-shadow:0 10px 30px rgba(0,0,0,.12);
}

.ai-container{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
  box-sizing:border-box;
}

.ai-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:40px;
  padding:0 14px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  box-sizing:border-box;
  border:1px solid transparent;
  cursor:pointer;
}
.ai-btn--cta{
  background:#fff;
  color:var(--ai-brand);
  border-color:#fff;
}
.ai-btn--cta:hover{ opacity:.9; }
.ai-btn--full{ width:100%; }

/* Header */
.ai-header{ position:relative; z-index:9999; }
.ai-header__top{
  background:var(--ai-brand);
  color:#fff;
}
.ai-header__top-inner{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 16px;
}
.ai-header__logo img{ height:40px; width:auto; display:block; }

.ai-header__util{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
  white-space:nowrap;
}
.ai-header__util a{
  color:var(--ai-muted);
  text-decoration:none;
  font-size:12px;
}
.ai-header__util a:hover{ opacity:.85; }

.ai-burger{
  display:none;
  margin-left:auto;
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  cursor:pointer;
}
.ai-burger span{
  display:block;
  height:2px;
  background:#fff;
  margin:7px 0;
  border-radius:2px;
}

/* PC Nav */
.ai-header__navwrap{
  background:var(--ai-brand);
  border-top:1px solid var(--ai-border);
}
.ai-nav__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:0;
}
.ai-nav__item{ position:relative;width:300px; }
.ai-nav__link{
  display:block;
  color:#fff;
  text-decoration:none;
  padding:14px 16px;
  font-weight:700;
  font-size:14px;
}
.ai-nav__link:hover{ text-decoration:underline; }

/* dropdown */
.ai-nav__sub{
  display:none;
  position:absolute;
  left:0;
  top:100%;
  width:320px;
  list-style:none;
  margin:0;
  padding:8px 0;
  background:var(--ai-brand);
  border:1px solid var(--ai-border);
  box-shadow:var(--ai-shadow);
}
.ai-nav__sub a{
  display:block;
  color:#fff;
  text-decoration:none;
  padding:10px 14px;
  font-size:13px;
}
.ai-nav__sub a:hover{ background:rgba(255,255,255,.12); }
.ai-nav__item--has-sub:hover .ai-nav__sub{ display:block; }

/* Drawer + overlay (SP) */
.ai-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  z-index:10000;
}
.ai-drawer{
  display:none;
  position:fixed;
  top:0;
  right:0;
  width:min(92vw, 360px);
  height:100vh;
  background:#fff;
  z-index:10001;
  box-shadow:var(--ai-shadow);
}
.ai-drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid #e5e7eb;
}
.ai-drawer__logo img{ height:32px; width:auto; }
.ai-drawer__close{
  width:40px;
  height:40px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  cursor:pointer;
  font-size:20px;
  line-height:1;
}
.ai-drawer__body{
  padding:14px;
  overflow:auto;
  height:calc(100vh - 70px);
  box-sizing:border-box;
}
.ai-drawer__section{ margin-top:16px; }
.ai-drawer__title{
  font-weight:800;
  font-size:13px;
  color:var(--ai-ink);
  margin:0 0 8px;
}
.ai-drawer__list{
  list-style:none;
  margin:0;
  padding:0;
}
.ai-drawer__list a{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  text-decoration:none;
  color:var(--ai-ink);
  border:1px solid #eef2f7;
  margin-bottom:8px;
}
.ai-drawer__list a:hover{ background:#f8fafc; }

/* Open state */
body.ai-menu-open .ai-overlay{ display:block; }
body.ai-menu-open .ai-drawer{ display:block; }

/* Footer */
.ai-footer{
  margin-top:40px;
  background:var(--ai-brand);
  color:#fff;
}
.ai-footer a{ color:#fff; text-decoration:none; }
.ai-footer a:hover{ text-decoration:underline; }

.ai-footer__top{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:24px;
  padding:28px 16px;
}
.ai-footer__brand img{ height:42px; width:auto; display:block; }
.ai-footer__desc{
  margin:12px 0 14px;
  font-size:13px;
  line-height:1.7;
  color:var(--ai-muted);
}
.ai-footer__cols{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:18px;
}
.ai-footer__h{
  font-size:13px;
  margin:0 0 10px;
  padding-bottom:8px;
  border-bottom:1px solid var(--ai-border);
}
.ai-footer__col ul{ list-style:none; margin:0; padding:0; }
.ai-footer__col li{ margin:0 0 8px; }
.ai-footer__col a{ font-size:12px; color:var(--ai-muted); }
.ai-footer__col a:hover{ color:#fff; }

.ai-footer__groups{
  padding:0 16px 22px;
}
.ai-footer__group-title{
  font-weight:800;
  font-size:13px;
  margin:10px 0 10px;
}
.ai-footer__group-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap:10px;
}
.ai-footer__group-grid a{
  display:block;
  padding:10px 10px;
  border:1px solid var(--ai-border);
  border-radius:10px;
  font-size:12px;
  color:var(--ai-muted);
}
.ai-footer__group-grid a:hover{ color:#fff; background:rgba(255,255,255,.08); }

.ai-footer__bottom{
  border-top:1px solid var(--ai-border);
  padding:14px 0 18px;
}
.ai-footer__copy{
  margin:0;
  font-size:12px;
  line-height:1.6;
  color:var(--ai-muted);
}

.ai-header__logoRow{display:flex;align-items:center;gap:8px}

.ai-header__tagline{margin:0 0 6px;font-size:11px;line-height:1.2;color:rgba(255,255,255,.85)}
.ai-header__left{display:flex;flex-direction:column;gap:6px}
.ai-header__ctaImg img{display:block;width:250px;height:auto}

/* 左側（ミニ文字＋ロゴ）を上下に固定 */
.ai-header__left{display:flex;flex-direction:column;gap:6px}

/* ロゴ＋jpxを横並び */
.ai-header__logoRow{display:flex;align-items:center;gap:8px}

/* ミニ文字 */
.ai-header__tagline{margin:0 0 6px;font-size:11px;line-height:1.2;color:rgba(255,255,255,.85)}

/* 登録ボタン画像（PC） */
.ai-header__ctaImg{display:block;line-height:0}
.ai-header__ctaImg img{display:block;width:250px;height:auto}

/* ドロワー内の登録ボタン画像（SPで縮むように） */
.ai-drawer__ctaImg{display:block;margin:0 0 12px;line-height:0}
.ai-drawer__ctaImg img{display:block;max-width:100%;height:auto;margin:0 auto}

/* Responsive */
@media (max-width: 900px){
  .ai-header__util{ display:none; }
  .ai-burger{ display:block; }

  .ai-header__top-inner{ justify-content:space-between; }
  .ai-header__navwrap{ display:none; }

  .ai-footer__top{
    grid-template-columns: 1fr;
  }
  .ai-footer__cols{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .ai-footer__group-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}
@media (max-width: 520px){
  .ai-footer__cols{ grid-template-columns: 1fr; }
}

/* ブラウザ標準余白を消す */
html, body { margin:0; padding:0; }

/* ヘッダー/フッターの背景を全面に */
.ai-header__top,
.ai-header__navwrap,
.ai-footer {
  width:100%;
}

@media (max-width: 768px){
  .ai-header__top{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  body{
    padding-top: 100px; /* ←ヘッダーの高さに合わせて調整 */
  }
}

.ai-is-sp .ai-header .pcbox { display: none !important; }
.ai-is-sp .ai-header .spbox { display: block !important; }

#ai-header .ai-overlay{
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,.45) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity .2s ease, visibility .2s ease !important;
  z-index: 9998 !important;
}

#ai-header .ai-drawer{
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  height: 100vh !important;
  width: min(86vw, 360px) !important;
  background: #fff !important;
  overflow-y: auto !important;

  /* ここが肝：初期状態は画面外へ飛ばして「見えない」 */
  transform: translateX(110%) !important;

  transition: transform .25s ease !important;
  z-index: 9999 !important;
}

/* 開いた時だけ表示 */
#ai-header.is-open .ai-overlay{
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#ai-header.is-open .ai-drawer{
  transform: translateX(0) !important;
}

/* 開いてる間は背景スクロール止める（任意） */
html.ai-lock,
body.ai-lock{
  overflow: hidden !important;
}

.ai-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 9998;
}

/* idが #ai-drawer ならここが本体 */
#ai-drawer{
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  height: 100vh;
  width: min(86vw, 360px);
  background: #fff;
  overflow-y: auto;

  /* ここが肝：閉じた状態で画面外へ */
  transform: translateX(110%);
  transition: transform .25s ease;
  z-index: 9999;
}

/* 開いた時だけ表示 */
body.ai-menu-open .ai-overlay{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.ai-menu-open #ai-drawer{
  transform: translateX(0);
}

/* 任意：開いてる間は背景スクロール止める */
body.ai-menu-open{
  overflow: hidden;
}

#ai-drawer{ transform: translateX(110%) !important; }
body.ai-menu-open #ai-drawer{ transform: translateX(0) !important; }

