/* ===== 基本レイアウト ===== */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.8;
  background-color: #fff;
  color: #222;
}

/* ===== モバイルヘッダー ===== */
.mobile-header {
  display: none;
  background-color: #fff;
  color: #004d80;
  align-items: center;
  padding: 8px 12px;
  justify-content: space-between;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 64px;
  z-index: 1000;
}

.mobile-logo {
  height: 48px;
}

.menu-toggle {
  font-size: 42px;
  background: none;
  border: none;
  color: #004d80;
  margin-left: auto;
  cursor: pointer;
}

.spacer {
  flex: 1;
}

/* 全体デフォルト（PC用） */
nav {
  background-color: #f2f2f2;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
}

nav .logo-inside {
  width: 140px;
  margin: 0 auto 16px auto;
  display: block;
}

nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

nav ul li {
  margin-bottom: 0.8em;
}

nav ul li a {
  display: inline-block;
  line-height: 1.2;
  text-decoration: none;
  color: inherit;
  word-wrap: break-word;
}

nav a {
  color: #0056b3;
  text-decoration: none;
}

nav a:hover {
  color: #007bff;
  text-decoration: underline;
}

nav a.active,
nav ul li a.active {
  font-weight: bold;
  color: #d80000;
}

/* 折りたたみ式メニュー */
nav li.has-children > strong {
  cursor: pointer;
  display: inline-block;
}

nav li.has-children > strong::before {
  content: "\25B6";
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  transform: rotate(0deg);
  transition: transform 0.2s;
  position: relative;
  top: 1px;
}

nav li.has-children.expanded > strong::before {
  transform: rotate(90deg);
}

nav li.has-children ul {
  display: none;
  margin-left: 16px;
}

nav li.has-children.expanded ul {
  display: block;
}

/* ===== メインエリア ===== */
main {
  padding: 20px;
  margin-left: 280px;
  max-width: 960px;
}

.alert-box {
  background-color: #ffeaea;
  padding: 10px;
  border-left: 4px solid red;
  margin: 10px 0;
}

.manual-image {
  max-width: 100%;
  height: auto;
}

/* ===== 閉じるボタン（モバイル） ===== */
.close-btn-mobile {
  display: none; /* PCでは非表示 */
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  padding: 10px 16px;
  cursor: pointer;
  position: absolute;
  width: 100%;
  top: 12px;
  right: 16px; 
  box-sizing: border-box;
}
/* 通常（PC）用スタイル */
.nav-special-button {
  display: block;
  background-color: #004b6b;
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 5px 10px;
  margin: 10px;  /* ← 通常は10pxにしておく */
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background-color 0.3s, transform 0.1s, box-shadow 0.1s;
}

.nav-special-button:hover {
  background-color: #006f9c;
  transform: translate(1px, 1px);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15); /* 押し込み感を演出：影を浅く */
}

.nav-special-button:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(0,0,0,0); /* 影を完全になくす */
}


/* ===== サポートチャットカード ===== */
#chat-toggle-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;

  width: 320px;
  max-width: calc(100vw - 40px);
  background: #002b5c;          /* ベースカラー */
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  cursor: pointer;
  overflow: hidden;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  transform: translateY(8px);
  opacity: 0;
  animation: chatCardIn .35s ease-out .3s forwards;
  border: none;
}

/* ヘッダー部分 */
#chat-toggle-button .chat-header {
  background: #014080;          /* ヘッダー帯 */
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

/* 本文部分 */
#chat-toggle-button .chat-body {
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  letter-spacing: 0.2px;
  font-weight: 500;
}

/* ホバー効果 */
#chat-toggle-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transform: translateY(0);
}

/* 開いている時のスタイル（close-mode流用） */
#chat-toggle-button.close-mode {
  left: 20px;
  right: auto;
  background: #b22222;          /* 本体 */
}
#chat-toggle-button.close-mode .chat-header {
  background: #b73434;          /* ヘッダー帯 */
}
#chat-toggle-button.close-mode::after {
  background: #b22222;
  left: 14px;
  right: auto;
}
/* ふわっと登場 */
@keyframes chatCardIn {
  to { transform: translateY(0); opacity: 1; }
}


#chat-tooltip {
  position: fixed;
  top: 20px;                /* 画面上からの距離 */
  left: 50%;                /* 中央寄せ */
  transform: translateX(-50%); /* 正確に中央に配置 */
  background: #fdf7f0;
  color: #5a3825;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  line-height: 1.4;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

#chat-tooltip.hidden {
  opacity: 0;
  pointer-events: none;
}

#chat-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===== チャットボックス ===== */
#chat-box {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 400px;
  height: 600px;
  display: none;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-radius: 0px;
  overflow: hidden;
  z-index: 9999;
  background-color: transparent;
  border: none;
}

#close-chat {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  background-color: #c0392b;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#close-chat:hover {
  color: #000;
}

#chat-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.menu-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 1.5em 0;
}

.download-section {
  padding: 1em;
  margin: 1.5em 0;
  background: #f9fcff;
  border: 2px solid #d0e8f2;
  border-radius: 8px;
}

.download-title {
  font-weight: bold;
  font-size: 16px;
  color: #005b8e;
  margin-bottom: 0.5em;
}

.download-group {
  margin-bottom: 1.8em;
}

.group-title {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  font-weight: bold;
  font-size: 14px;
  color: #003d66;
  background: #e9f4fb;
  border-left: 4px solid #4da3c4;
  border-radius: 4px;
  padding: 0.4em 0.6em;
  line-height: 1.4;
}

.group-title .icon {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 0em; /* 上に少し寄せたいとき */
}

.group-title .text {
  flex: 1;
  font-size: 14px;
  word-break: break-word;
}

.download-list {
  list-style: none;
  font-size: 15px;
  padding-left: 0em;
  margin-top: 5px; 
}

.download-list li {
  margin-bottom: 0.4em;
}

.download-list li a {
  font-size: 0.95em;
  padding-left: 0em;
  color: #006699;
}

.download-list a:hover {
  text-decoration: underline;
}

.item-title {
  display: flex;
  align-items: flex-start;
  gap: 0.4em;
  margin-left: 1.5em;
  line-height: 1.6;
  font-size: 14px;
  color: #003d66;
}

.item-title .icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.4;
}

.item-title .text {
  flex: 1;
  font-size: 14px;
  word-break: break-word;
}

.inquiry-link-box {
  background-color: #f3faff;
  padding: 5px;
  border-left: 4px solid #0077cc;
  margin: 10px 0;
  font-size: 14px;
}
.inquiry-link-box a {
  color: #0077cc;
  text-decoration: underline;
}
.coldbrew-column {
  background: #fdf7f0; /* ペールベージュ */
  border: 2px solid #d0c3b0; /* ややグレージュ系の優しい枠線 */
  border-radius: 8px;
  padding: 0rem 1rem 0rem 1rem;
  margin: 1.5rem 0 1.5rem 0;
}

.coldbrew-column h3 {
  font-size: 1rem;
  font-weight: bold;
  color: #5a3825; /* タイトル用に落ち着いたブルー */
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.3rem;
}

.coldbrew-box {
  background: #fff; /* 中身のボックスは白背景で区別 */
  border: 1px solid #ccc;
  border-left: 5px solid #d69a2d; /* アクセントカラー（黄土色） */
  border-radius: 6px;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.coldbrew-box h4 {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #444;
}

.coldbrew-box .download-button {
  background: #0077cc;
  color: #fff;
  padding: 0.6rem;
  display: inline-block;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
}
.coldbrew-title {
  font-size: 14px;
  font-weight: bold;
  color: #5a3825; /* コーヒー系のブラウン */
  border-bottom: 1px dashed #c5aa7d;
  padding-bottom: 0.3rem;
}
.coldbrew-button {
  font-size: 14px;
  font-weight: bold;
  color: #5a3825; /* コーヒー系のブラウン */
  padding-bottom: 0.3rem;
}

@media (min-width: 769px) {
  #chat-toggle-button.close-mode {
    right: 20px;
    left: auto;
  }
}
/* ===== モバイル対応 ===== */
@media (max-width: 768px) {
  /* ===== オーバーレイ背景 ===== */
#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 1200;
  pointer-events: auto;  /* ← 明示的にクリック可能にする */
}

#overlay.active {
  display: block;
}
    .mobile-header {
    display: flex;
  }
   nav .logo-inside {
    display: none !important;
  }
  main {
    margin: 72px 12px 40px 12px;
    margin-left: 0;
  }

  nav {
    left: auto;                /* ← 左固定を解除 */
    right: 0;
    transform: translateX(100%);  /* ← 初期状態で右に隠す */
    transition: transform 0.4s ease;
    width: 70vw;
    max-width: 380px;
    z-index: 1300;
  }

  nav.open {
    transform: translateX(0);
  }

  .close-btn-mobile {
    display: block;
    text-align: right;
  }
  #menu-close-button {
    font-size: 32px;
  }  
#close-chat {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: auto;
  }
#chat-toggle-button.close-mode {
    right: auto;
    left: 20px;
  }
.nav-special-button {
  padding: 7px;
  margin: 45px 0px 10px 0px;
}
}

/* モバイル対応 */
@media (max-width: 480px) {
  #chat-toggle-button {
    width: auto;
    left: 12px;
    right: 12px;
    bottom: 16px;
  }
  #chat-toggle-button .chat-header {
    padding: 10px 14px;
    font-size: 14px;
  }
  #chat-toggle-button .chat-body {
    padding: 12px 14px;
    font-size: 13px;
  }
}
/* ふわっと表示アニメーション */
@keyframes chatCardIn {
  to { transform: translateY(0); opacity: 1; }
}