/* ==========================================================================
   TMPS医学館 個別ページ共通ポリッシュ（assets/subpage-polish.css）
   - アクセシビリティ / タイポグラフィの底上げ
   - 共通フッター（JSで自動注入される場合のスタイル）
   - AIコンシェルジュ（Yuiちゃん）ウィジェット
   ========================================================================== */

::selection{background:rgba(7,104,172,.18)}
:focus-visible{outline:2px solid #0768ac;outline-offset:3px;border-radius:2px}
body{font-feature-settings:"palt";-webkit-tap-highlight-color:transparent}
/* img content-visibility removed for mobile stability */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* ---- 共通フッター（未設置ページにJS注入） ---- */
.tmps-footer{
  background:#0e2a5c;color:#a9bad8;padding:44px 0 88px;font-size:12.5px;line-height:1.9;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",system-ui,sans-serif;
}
.tmps-footer a{color:inherit;text-decoration:none;opacity:.85}
.tmps-footer a:hover{opacity:1;color:#fff}
.tmps-footer .tf-wrap{max-width:1040px;margin:0 auto;padding:0 24px}
.tmps-footer .tf-title{color:#fff;font-weight:900;font-size:15px;letter-spacing:.05em;margin-bottom:14px}
.tmps-footer .tf-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 24px;margin-bottom:22px}
@media(min-width:768px){.tmps-footer .tf-grid{grid-template-columns:repeat(3,1fr)}}
.tmps-footer address{font-style:normal;line-height:2}
.tmps-footer .tf-copy{margin-top:20px;font-size:11px;color:#5f7398}
.tmps-footer .tf-top{display:inline-block;margin-top:14px;color:#e9dcc0;font-weight:800}

/* ---- Yuiコンシェルジュ ---- */
.yp-widget{position:fixed;right:24px;bottom:24px;z-index:99;display:flex;align-items:flex-end;gap:10px;
  font-family:"Noto Sans JP","Hiragino Sans","BIZ UDPGothic",Meiryo,sans-serif}
@media (max-width: 860px) {
  .yp-widget{right:12px;bottom:84px;}
}
.yp-avatar-wrap{position:relative;width:70px;height:92px;flex-shrink:0;cursor:pointer;display:flex;align-items:flex-end;justify-content:center;
  transition:transform .25s cubic-bezier(.34,1.56,.64,1);-webkit-tap-highlight-color:transparent;user-select:none;
  animation:ypBounce 7s infinite ease-in-out}
@keyframes ypBounce{0%,90%,100%{transform:none}93%{transform:translateY(-7px)}96%{transform:translateY(0)}}
.yp-avatar-wrap:hover,.yp-avatar-wrap:active{transform:scale(1.08) translateY(-3px)}
.yp-avatar{width:auto;height:92px;object-fit:contain;filter:drop-shadow(0 4px 12px rgba(0,0,0,.38)) drop-shadow(0 0 10px rgba(56,189,248,.35))}
.yp-dot{position:absolute;bottom:5px;right:5px;width:12px;height:12px;background:#10b981;border:2px solid #fff;border-radius:50%;
  box-shadow:0 0 10px #10b981;animation:ypPulse 2.2s infinite ease-in-out}
@keyframes ypPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.22);opacity:.85}}
.yp-card{width:min(292px,calc(100vw - 94px));padding:15px 16px 13px;border-radius:16px;position:relative;
  opacity:0;visibility:hidden;transform:translateX(12px) scale(.94);
  transition:opacity .35s cubic-bezier(.16,1,.3,1),transform .35s cubic-bezier(.16,1,.3,1),visibility .35s;
  pointer-events:none;box-shadow:0 14px 34px rgba(15,23,42,.18);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.yp-card.is-open{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.yp-card::after{content:"";position:absolute;bottom:22px;right:-9px;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:9px solid rgba(240,249,255,.96)}
.yp-theme-blue{background:rgba(240,249,255,.96);border:1.5px solid #bae6fd}
.yp-theme-blue .yp-badge{background:#e0f2fe;color:#0369a1;border:1px solid #7dd3fc}
.yp-theme-amber{background:rgba(255,251,235,.96);border:1.5px solid #fde68a}
.yp-theme-amber .yp-badge{background:#fef3c7;color:#b45309;border:1px solid #fcd34d}
.yp-theme-amber::after{border-left-color:rgba(255,251,235,.96)}
.yp-theme-rose{background:rgba(255,241,242,.96);border:1.5px solid #fecdd3}
.yp-theme-rose .yp-badge{background:#ffe4e6;color:#be123c;border:1px solid #fda4af}
.yp-theme-rose::after{border-left-color:rgba(255,241,242,.96)}
.yp-theme-cyan{background:rgba(240,253,250,.96);border:1.5px solid #a7f3d0}
.yp-theme-cyan .yp-badge{background:#ccfbf1;color:#0f766e;border:1px solid #5eead4}
.yp-theme-cyan::after{border-left-color:rgba(240,253,250,.96)}
.yp-theme-purple{background:rgba(245,243,255,.96);border:1.5px solid #ddd6fe}
.yp-theme-purple .yp-badge{background:#ede9fe;color:#6d28d9;border:1px solid #c4b5fd}
.yp-theme-purple::after{border-left-color:rgba(245,243,255,.96)}
.yp-card.is-no-btn .yp-text{margin-bottom:2px}
.yp-card.is-no-btn .yp-btn{display:none!important}
.yp-close{position:absolute;top:6px;right:8px;width:26px;height:26px;background:transparent;border:0;color:#64748b;font-size:18px;cursor:pointer;border-radius:50%;display:flex;align-items:center;justify-content:center;line-height:1}
.yp-close:hover{color:#0f172a;background:rgba(0,0,0,.07)}
.yp-badge{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:800;letter-spacing:.04em;padding:2.5px 8.5px;border-radius:20px;margin-bottom:7px}
.yp-text{font-size:12.5px;line-height:1.75;color:#0f172a;margin:0 0 10px}
.yp-btn{display:block;text-align:center;background:#0768ac;color:#fff;font-size:12px;font-weight:800;padding:9px 12px;border-radius:9px;text-decoration:none;letter-spacing:.03em}
.yp-btn:hover{background:#054c7f}


/* ==========================================================================
   TMPS医学館 共通ヘッダー（クリーンバー ✕ スライドメニュー）& 共通フッター
   ========================================================================== */
.site-header {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background: rgba(244, 242, 237, 0.97) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif !important;
}

.site-header .header-inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
  height: 70px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  position: relative !important;
}

.header-logo, a.logo {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

.header-logo-shield {
  height: 38px !important;
  width: auto !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

.logo-text-wrap {
  display: flex !important;
  flex-direction: column !important;
}

.logo-main {
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  font-size: 16.5px !important;
  line-height: 1.15 !important;
}
.logo-blue { color: #0d47a1 !important; }
.logo-red { color: #e53935 !important; }
.logo-sub {
  display: block !important;
  font-size: 8px !important;
  letter-spacing: .15em !important;
  font-weight: 700 !important;
  color: #0d47a1 !important;
  opacity: 0.82 !important;
  margin-top: 1px !important;
}

.header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.header-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #0768ac !important;
  background: #ffffff !important;
  border: 1.5px solid #0768ac !important;
  border-radius: 9999px !important;
  padding: 6px 14px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}
.header-back-btn:hover {
  background: #0768ac !important;
  color: #ffffff !important;
}

.header-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 7px 16px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}
.header-cta-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35) !important;
}

.menu-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.menu-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}
.menu-btn .hamburger-box {
  font-size: 16px !important;
  line-height: 1 !important;
}

/* ナビドロワー（普段は完全に隠れ、メニューボタン押下時のみ展開） */
.subpage-nav-drawer {
  display: none !important;
  position: absolute !important;
  top: 70px !important;
  right: 0 !important;
  width: min(380px, 92vw) !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
  padding: 20px 22px 24px !important;
  z-index: 10000 !important;
  flex-direction: column !important;
  animation: drawerSlideDown 0.22s ease-out !important;
}

@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-header.menu-open .subpage-nav-drawer,
header.header.menu-open .subpage-nav-drawer {
  display: flex !important;
}

.drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  margin-bottom: 12px !important;
}
.drawer-title {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  letter-spacing: 0.05em !important;
}
.drawer-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 16px !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 4px !important;
  line-height: 1 !important;
}
.drawer-close-btn:hover { color: #0f172a !important; }

.drawer-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  max-height: 60vh !important;
  overflow-y: auto !important;
}
.drawer-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
}
.drawer-link:hover {
  background: #f0f9ff !important;
  color: #0284c7 !important;
  padding-left: 16px !important;
}
.drawer-link.home {
  background: #f8fafc !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
}

.drawer-cta {
  display: block !important;
  margin-top: 14px !important;
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  text-align: center !important;
  padding: 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}
.drawer-cta:hover {
  background: #0369a1 !important;
}

@media (max-width: 640px) {
  .header-back-btn {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
  }
  .header-cta-btn {
    display: none !important;
  }
  .menu-btn-label {
    display: none !important;
  }
  .menu-btn {
    padding: 6px 8px !important;
  }
}

/* 共通フッター */
footer.footer {
  background: #05080c !important;
  color: #ffffff !important;
  padding: 44px 16px 100px !important;
  margin-top: 60px !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
}
footer.footer .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
}
footer.footer a {
  color: #94a3b8 !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}
footer.footer a:hover {
  color: #ffffff !important;
}
footer.footer small {
  color: #64748b !important;
  line-height: 1.6 !important;
  display: inline-block !important;
}


/* ==========================================================================
   上部余白完全解消（スマホ・PC共通）
   ========================================================================== */
html, body {
  margin: 0 !important;
  padding-top: 0 !important;
}

/* stickyヘッダー導入により不要となった旧 fixed用の margin-top:72px を全撤廃 */
.page-hero, .rep-hero, main section:first-of-type, .hero-impact {
  margin-top: 0 !important;
}

/* スマホ表示時の上部余白最適化（個別ページ専用） */
@media (max-width: 768px) {
  .site-header {
    padding: 0 10px !important;
  }
  .site-header .header-inner {
    height: 52px !important;
  }
  .site-header .header-logo-shield {
    height: 30px !important;
  }
  .site-header .logo-main {
    font-size: 14px !important;
  }
  .site-header .logo-sub {
    font-size: 6.5px !important;
  }
  .page-hero, .rep-hero {
    margin-top: 0 !important;
    padding-top: 12px !important;
    padding-bottom: 24px !important;
  }
  .hero-banner-wrap, .hero-card-frame {
    margin-top: 0 !important;
  }
}
