/* ========================================
   osA Beyond Inc. - 共通スタイル
   カラーパレット：紺・黒・白 + 赤アクセント
======================================== */

/* CSS変数定義 */
:root {
  --navy:       #1B2A4A;
  --navy-dark:  #0D1B2E;
  --navy-light: #243558;
  --red:        #C8181E;
  --red-dark:   #A01015;
  --white:      #FFFFFF;
  --off-white:  #F5F7FA;
  --gray-light: #E8ECF2;
  --gray-mid:   #8A95A8;
  --gray-dark:  #4A5568;
  --black:      #0D0D0D;
  --font-main:  'Noto Sans JP', 'Segoe UI', sans-serif;
  --font-en:    'Segoe UI', 'Helvetica Neue', sans-serif;
  --shadow-sm:  0 2px 8px rgba(13,27,46,0.10);
  --shadow-md:  0 4px 20px rgba(13,27,46,0.15);
  --shadow-lg:  0 8px 40px rgba(13,27,46,0.20);
  --radius:     8px;
  --radius-lg:  16px;
  --transition: 0.3s ease;
}

/* リセット */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--black);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

/* ========================================
   ユーティリティ
======================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-dark);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--red);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-dark);
  font-size: 1rem;
  margin-bottom: 52px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.bg-navy {
  background: var(--navy-dark);
  color: var(--white);
}

.bg-off-white {
  background: var(--off-white);
}

.text-red {
  color: var(--red);
}

/* ========================================
   ボタン
======================================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  letter-spacing: 0.02em;
  text-align: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,24,30,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy-dark);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy-dark);
  border-color: var(--navy-dark);
}

.btn-outline-dark:hover {
  background: var(--navy-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* ========================================
   ヘッダー・ナビゲーション
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy-dark);
  box-shadow: var(--shadow-md);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  height: 36px;
  width: auto;
}

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

.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.10);
}

.nav-cta {
  margin-left: 8px;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* モバイルナビ */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--navy-dark);
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav .nav-link {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-nav .btn {
  margin-top: 16px;
  width: 100%;
}

/* ページコンテンツのマージン（固定ヘッダー分） */
.page-content {
  margin-top: 72px;
}

/* ========================================
   ヒーローセクション
   本番サイト（osabeyond.com）と同じ実写写真をそのまま使用
======================================== */
.hero {
  background: var(--navy-dark);
  color: var(--white);
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

/* 背景写真レイヤー（加工なし・そのまま表示） */
.hero .bg-photo {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

/* テキストの可読性を確保する薄い暗幕（写真の見た目は変えない程度） */
.hero .bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
    rgba(5,12,30,0.30) 0%,
    rgba(5,12,30,0.15) 50%,
    rgba(5,12,30,0.35) 100%);
  pointer-events: none;
}

/* コンテナとコンテンツを最前面に */
.hero > .container {
  position: relative;
  z-index: 10;
}

.hero-inner {
  position: relative;
  z-index: 10;
  max-width: 760px;
}

.hero-tag {
  display: inline-block;
  background: rgba(0,150,220,0.20);
  color: #80e0ff;
  border: 1px solid rgba(0,180,255,0.45);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
}

.hero-title span {
  color: var(--red);
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 40px;
  max-width: 580px;
  line-height: 1.8;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.12);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}

.stat-num span {
  color: var(--red);
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.60);
  font-weight: 500;
}

/* ========================================
   サービスカード
======================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(27,42,74,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.6rem;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 12px;
}

.service-card p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--off-white);
  color: var(--navy);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.80rem;
  font-weight: 600;
  border: 1px solid var(--gray-light);
}

/* ========================================
   実績セクション
======================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.stats-card {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.stats-card .num {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.stats-card .num span {
  color: var(--red);
}

.stats-card .label {
  color: rgba(255,255,255,0.65);
  font-size: 0.90rem;
}

/* 対応国フラグ */
.countries {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 48px;
}

.country-badge {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
}

/* ========================================
   CTAバナー
======================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--red) 0%, #8B0000 100%);
  color: var(--white);
  padding: 72px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   フッター
======================================== */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.65);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  height: 32px;
  margin-bottom: 16px;
  /* ロゴを白背景に馴染ませる */
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.60);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

/* ========================================
   ページヒーロー（内部ページ）
======================================== */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 80px 0 72px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ========================================
   サービス詳細
======================================== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 72px 0;
  border-bottom: 1px solid var(--gray-light);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail.reverse {
  direction: rtl;
}

.service-detail.reverse > * {
  direction: ltr;
}

.service-detail-badge {
  display: inline-block;
  background: rgba(200,24,30,0.10);
  color: var(--red);
  border: 1px solid rgba(200,24,30,0.25);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.service-detail h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.service-detail p {
  color: var(--gray-dark);
  margin-bottom: 28px;
  line-height: 1.8;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--gray-dark);
}

.feature-item::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.70rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.service-detail-visual {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  color: var(--white);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-detail-visual .icon-lg {
  font-size: 3rem;
  margin-bottom: 20px;
}

.service-detail-visual h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-detail-visual p {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ========================================
   会社紹介
======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-message {
  background: var(--off-white);
  border-left: 4px solid var(--red);
  padding: 32px;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin-bottom: 32px;
}

.about-message p {
  color: var(--gray-dark);
  line-height: 1.9;
  font-size: 0.97rem;
  margin-bottom: 16px;
}

.about-message p:last-child {
  margin-bottom: 0;
}

.about-message .ceo-name {
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 1rem;
  margin-top: 24px;
}

.company-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.company-info-table tr {
  border-bottom: 1px solid var(--gray-light);
}

.company-info-table tr:last-child {
  border-bottom: none;
}

.company-info-table th {
  text-align: left;
  padding: 14px 16px 14px 0;
  color: var(--navy-dark);
  font-weight: 700;
  width: 35%;
  vertical-align: top;
}

.company-info-table td {
  padding: 14px 0;
  color: var(--gray-dark);
  line-height: 1.7;
}

/* ミッション */
.mission-box {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 56px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.mission-box .label {
  display: inline-block;
  background: rgba(200,24,30,0.25);
  color: #ff6b6e;
  border: 1px solid rgba(200,24,30,0.4);
  padding: 5px 16px;
  border-radius: 100px;
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.mission-box p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.90);
}

/* ========================================
   FAQ
======================================== */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-dark);
  font-size: 1rem;
  background: var(--white);
  user-select: none;
  gap: 16px;
}

.faq-question .q-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.80rem;
  font-weight: 800;
  flex-shrink: 0;
}

.faq-question .q-text {
  flex: 1;
}

.faq-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 1.2rem;
  color: var(--navy-dark);
}

.faq-item.open .faq-toggle {
  background: var(--navy-dark);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 28px 24px 72px;
  color: var(--gray-dark);
  line-height: 1.8;
  font-size: 0.97rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ========================================
   お問い合わせフォーム
======================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--gray-dark);
  line-height: 1.8;
  margin-bottom: 32px;
  font-size: 0.97rem;
}

.contact-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-point {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-point .icon {
  width: 44px;
  height: 44px;
  background: rgba(27,42,74,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-point .text strong {
  display: block;
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.contact-point .text span {
  color: var(--gray-dark);
  font-size: 0.88rem;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--red);
  margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-main);
  color: var(--black);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,42,74,0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 送信完了メッセージ */
.form-success {
  display: none;
  text-align: center;
  padding: 40px 24px;
}

.form-success .checkmark {
  width: 64px;
  height: 64px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--white);
  margin: 0 auto 24px;
}

.form-success h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 12px;
}

.form-success p {
  color: var(--gray-dark);
}

/* ========================================
   チャットボット
======================================== */
.chatbot-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
}

.chatbot-btn {
  width: 60px;
  height: 60px;
  background: var(--navy-dark);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  color: var(--white);
  position: relative;
}

.chatbot-btn:hover {
  background: var(--navy-light);
  transform: scale(1.08);
}

.chatbot-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.chatbot-window {
  display: none;
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  flex-direction: column;
  max-height: 520px;
}

.chatbot-window.open {
  display: flex;
}

.chatbot-header {
  background: var(--navy-dark);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-header .avatar {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chatbot-header .info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.chatbot-header .info span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
}

.chatbot-header .online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.chatbot-key-reset {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.70);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 6px;
  transition: color var(--transition);
}

.chatbot-key-reset:hover {
  color: var(--white);
}

.chatbot-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.70);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  transition: color var(--transition);
}

.chatbot-close:hover {
  color: var(--white);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.msg.user {
  flex-direction: row-reverse;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.msg.bot .msg-bubble {
  background: var(--white);
  color: var(--black);
  border-radius: 4px 16px 16px 16px;
  box-shadow: var(--shadow-sm);
}

.msg.user .msg-bubble {
  background: var(--navy-dark);
  color: var(--white);
  border-radius: 16px 4px 16px 16px;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 4px 16px 16px 16px;
  box-shadow: var(--shadow-sm);
  width: fit-content;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--gray-mid);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chatbot-input-area {
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chatbot-input-area textarea {
  flex: 1;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: var(--font-main);
  resize: none;
  outline: none;
  max-height: 100px;
  line-height: 1.5;
  transition: border-color var(--transition);
}

.chatbot-input-area textarea:focus {
  border-color: var(--navy);
}

.chatbot-send {
  width: 38px;
  height: 38px;
  background: var(--navy-dark);
  border: none;
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
  flex-shrink: 0;
}

.chatbot-send:hover {
  background: var(--navy-light);
}

/* APIキー設定モーダル */
.api-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.api-modal-overlay.open {
  display: flex;
}

.api-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.api-modal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 12px;
}

.api-modal p {
  color: var(--gray-dark);
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.api-modal input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.api-modal input:focus {
  border-color: var(--navy);
}

/* ========================================
   英日併記ユーティリティ
======================================== */

/* ナビゲーション内の日本語サブテキスト */
.nav-ja {
  font-size: 0.76em;
  opacity: 0.65;
  margin-left: 2px;
}

/* セクションタイトル内の日本語サブテキスト */
.section-title .ja-sub,
h1 .ja-sub,
h2 .ja-sub,
h3 .ja-sub {
  display: block;
  font-size: 0.48em;
  font-weight: 500;
  color: var(--gray-mid);
  letter-spacing: 0.06em;
  margin-top: 5px;
}

.bg-navy h2 .ja-sub,
.bg-navy h1 .ja-sub,
.page-hero h1 .ja-sub {
  color: rgba(255,255,255,0.50);
}

.cta-banner h2 .ja-sub {
  color: rgba(255,255,255,0.60);
}

/* タグ・バッジ内の小さい日本語 */
.tag-ja {
  font-size: 0.82em;
  opacity: 0.80;
}

/* ヒーロー内のサブ（統計ラベルなど） */
.stat-label .ja-sub {
  display: block;
  font-size: 0.85em;
  color: rgba(255,255,255,0.45);
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 80px 0 72px; }
  .hero-stats { gap: 28px; }

  .services-grid { grid-template-columns: 1fr; }

  .service-detail { grid-template-columns: 1fr; gap: 32px; }
  .service-detail.reverse { direction: ltr; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  .contact-layout { grid-template-columns: 1fr; gap: 40px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .chatbot-window { width: calc(100vw - 56px); right: -14px; }

  .form-row { grid-template-columns: 1fr; }

  .stats-row { grid-template-columns: 1fr 1fr; }

  .section { padding: 56px 0; }
  .section-title { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; text-align: center; }
  .cta-btns { flex-direction: column; align-items: center; }
  .stats-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
}
