@charset "UTF-8";
/* ニッピコラーゲン チャットボット（自作版）
   2026-11-04 当社デザインに変更（v2）。色・角の丸み・ボタンの飾り（v3：選択肢は塗りのボタン）に加え、閉じている時は右下の丸いボタン＋吹き出し、
   スマホで開いた時は全画面（右端の縦の帯なし）、操作アイコンには日本語を添えた。
   色は下の変数で決める。クラス名はすべて ncb- で始まる */

#ncb-root, #ncb-root * { box-sizing: border-box; }
#ncb-root {
  --ncb-blue: #165c9e;        /* 基本の青＝グラデーションの濃い側（白地の文字にも使える濃さ） */
  --ncb-blue-2: #3b95d4;      /* グラデーションの明るい側。文字は左寄せで濃い側にのるので、文字のある左半分は白文字との比4.5以上 */
  --ncb-blue-pale: #eaf3fb;   /* ボタンを押す前の淡い青 */
  --ncb-line: #d7e5f2;        /* 枠線 */
  --ncb-bg: #f4f8fb;          /* 会話欄の地 */
  --ncb-ink: #22303d;         /* 文字 */
  --ncb-grad: linear-gradient(120deg, var(--ncb-blue) 0%, var(--ncb-blue-2) 100%);
  --ncb-grad-btn: linear-gradient(90deg, #2168ae 0%, #3485c8 45%, #6fb3e5 100%); /* 選択肢ボタン用のやわらかい青（案①）。左端は少し濃い青、右端は明るすぎない空色 */
  position: fixed; right: 16px; bottom: 16px; z-index: 2147483000;
  font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "メイリオ", Meiryo, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--ncb-ink);
  -webkit-text-size-adjust: 100%;
  font-weight: 500; /* サイトの body{font-weight:300!important} を引き継ぐと答えの文字が細く読みづらい */
}

/* ===== ヘッダー（閉じている時の帯・開いている時の上部で共通） ===== */
.ncb-head {
  display: flex; align-items: center; gap: 10px;
  background: var(--ncb-grad); color: #fff;
  padding: 10px 8px 10px 16px;
}
.ncb-head .ncb-logo { width: 46px; height: 46px; padding: 7px; border-radius: 50%; background: #fff; flex: none; object-fit: contain; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.ncb-names { flex: 1; min-width: 0; }
.ncb-company { font-size: 11px; letter-spacing: .08em; opacity: .9; }
.ncb-title { font-size: 17px; font-weight: bold; letter-spacing: .06em; margin-top: 1px; }
.ncb-icon-btn {
  border: 0; background: none; padding: 0; cursor: pointer; flex: none; color: #fff; font: inherit;
}
.ncb-icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
/* アイコンの下に日本語（最初へ／閉じる） */
.ncb-labeled {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 48px; height: 48px; padding: 4px 6px; border-radius: 10px; transition: background .15s;
}
.ncb-labeled:hover, .ncb-labeled:focus-visible { background: rgba(255,255,255,.2); outline: none; }
.ncb-icon-label { font-size: 10.5px; line-height: 1; font-weight: bold; letter-spacing: .04em; white-space: nowrap; }

/* ===== 閉じている時：右下の丸いボタン「ご質問」＋上の吹き出し ===== */
.ncb-teaser { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ncb-bubble {
  position: relative; width: 250px; padding: 14px 34px 14px 16px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--ncb-line); border-radius: 16px;
  box-shadow: 0 6px 18px rgba(31,111,181,.18);
  font-size: 13.5px; line-height: 1.6; color: var(--ncb-ink);
}
.ncb-bubble::after { /* 下の丸いボタンを指す三角 */
  content: ""; position: absolute; right: 28px; bottom: -8px; width: 14px; height: 14px; background: #fff;
  border-right: 1.5px solid var(--ncb-line); border-bottom: 1.5px solid var(--ncb-line); transform: rotate(45deg);
}
.ncb-bubble-x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 3px; border: 0; border-radius: 50%;
  background: none; color: #8a96a3; cursor: pointer;
}
.ncb-bubble-x:hover { background: var(--ncb-blue-pale); color: var(--ncb-blue); }
.ncb-bubble-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; display: block; }
.ncb-teaser.is-mini .ncb-bubble { display: none; }
.ncb-fab {
  width: 72px; height: 72px; border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--ncb-grad); color: #fff; font: inherit;
  box-shadow: 0 6px 18px rgba(31,111,181,.35), 0 0 0 4px #fff;
  transition: transform .15s;
}
.ncb-fab:hover { transform: translateY(-2px); }
.ncb-fab svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ncb-fab-label { font-size: 11px; font-weight: bold; letter-spacing: .06em; line-height: 1; }
/* PCだけ（2026-11-10）：丸いボタンを横長のボタン「ご質問はこちら」にし、吹き出しを一回り大きく。三角はボタンの真ん中あたりを指す。スマホは丸いボタン「ご質問」のまま */
@media (min-width: 601px) {
  .ncb-bubble { width: 270px; padding: 14px 36px 14px 18px; font-size: 14.5px; }
  .ncb-bubble::after { right: 96px; } /* ボタンの幅206pxの真ん中 */
  .ncb-fab { width: auto; height: 62px; border-radius: 31px; flex-direction: row; gap: 10px; padding: 0 26px 0 20px; }
  .ncb-fab svg { width: 28px; height: 28px; }
  .ncb-fab-label { font-size: 0; }
  .ncb-fab-label::after { content: "ご質問はこちら"; font-size: 16.5px; letter-spacing: .06em; }
}

/* ===== 開いている時（ウィンドウ） ===== */
.ncb-window {
  width: 380px; height: min(640px, calc(100vh - 32px));
  display: flex; flex-direction: column;
  background: var(--ncb-bg); border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 32px rgba(31,111,181,.25);
}
.ncb-window .ncb-head { cursor: default; }
.ncb-log { flex: 1; overflow-y: auto; padding: 16px 16px 24px; scroll-behavior: smooth; overscroll-behavior: contain; }

/* ボットの発言 */
.ncb-bot { margin: 0 0 14px; }
.ncb-card { background: #fff; border: 1px solid var(--ncb-line); border-radius: 4px 16px 16px 16px; padding: 16px; }
.ncb-msg + .ncb-msg { margin-top: 12px; }
.ncb-msg strong { font-weight: bold; color: var(--ncb-blue); }
.ncb-typing { display: inline-flex; gap: 5px; padding: 14px 16px; background: #fff; border: 1px solid var(--ncb-line); border-radius: 4px 16px 16px 16px; }
.ncb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ncb-blue-2); animation: ncb-dot 1s infinite ease-in-out; }
.ncb-typing span:nth-child(2) { animation-delay: .15s; }
.ncb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ncb-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* 選択肢ボタン：青のグラデーションの塗り・白の太字・丸い端。右端は「›」だけ（丸で囲まない） */
.ncb-choices { margin-top: 8px; }
.ncb-choice {
  position: relative; display: block; width: 100%; min-height: 44px; margin-top: 10px; /* ボタンの間 10px（8pxは詰まって、12pxは開きすぎに見えた） */
  padding: 11px 40px 10px 18px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--ncb-grad-btn); color: #fff; text-align: left; text-decoration: none;
  font: inherit; font-size: 14px; font-weight: bold; line-height: 1.4;
  box-shadow: 0 2px 0 rgba(46,127,196,.2);
  transition: filter .15s, transform .1s;
}
.ncb-choice:hover { filter: brightness(1.08); }
.ncb-choice:active { transform: translateY(1px); box-shadow: none; }
.ncb-choice::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg);
}
/* シナリオで色指定のあるボタン（定期便の「詳しくはこちら」。元の指定は金色）は金茶のグラデーションで目立たせる */
.ncb-choice.is-accent { background: linear-gradient(120deg, #7a5f17 0%, #a08326 100%); }
/* 戻る：薄い灰色の塗り・濃い灰色の文字 */
.ncb-choice.is-back { background: #e6eaee; color: #3f4a55; box-shadow: none; }
.ncb-choice.is-back:hover { filter: brightness(.97); }
/* リンク：右端は外へ出る印（四角から矢印） */
.ncb-choice.is-link::after {
  width: 12px; height: 12px; margin-top: -6px; border: 0; transform: none; right: 14px;
  background: currentColor;
  -webkit-mask: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M5 2H2v8h8V7M7 1.5h3.5V5M10.5 1.5L6 6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
          mask: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M5 2H2v8h8V7M7 1.5h3.5V5M10.5 1.5L6 6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
}
.ncb-choices.is-used .ncb-choice { display: none; }

/* 利用者が選んだ項目：青の塗り・白文字 */
.ncb-user { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.ncb-user span { max-width: 80%; background: var(--ncb-grad); color: #fff; border-radius: 16px 4px 16px 16px; padding: 11px 16px; font-weight: bold; }

/* 商品カード（横スライド） */
.ncb-carousel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 12px -16px 0; padding: 0 16px 8px; -webkit-overflow-scrolling: touch;
}
.ncb-item { flex: 0 0 236px; scroll-snap-align: start; background: #fff; border: 1px solid var(--ncb-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ncb-item-img { width: 100%; aspect-ratio: 16 / 9; background: #fff; display: block; object-fit: contain; border-bottom: 1px solid var(--ncb-line); }
.ncb-item-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.ncb-item-title { font-weight: bold; font-size: 14px; color: var(--ncb-blue); }
.ncb-item-text { font-size: 12.5px; margin-top: 4px; color: #44515d; flex: 1; }
.ncb-item .ncb-choice { min-height: 36px; padding-top: 7px; padding-bottom: 6px; }

/* ===== スマホ：閉じている時は丸いボタンだけ（少し小さく）。開いた時は全画面（右端の縦の帯なし） ===== */
@media (max-width: 600px) {
  #ncb-root { right: 12px; bottom: 14px; }
  #ncb-root.is-open { top: 0; right: 0; bottom: 0; left: 0; }
  .ncb-bubble { display: none; } /* スマホは吹き出しを出さず、丸いボタンだけ（画面を隠さないため） */
  .ncb-fab { width: 62px; height: 62px; }
  .ncb-fab svg { width: 24px; height: 24px; }
  .ncb-fab-label { font-size: 10.5px; }

  .ncb-window { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
  .ncb-window .ncb-head .ncb-logo { width: 40px; height: 40px; padding: 6px; }
  .ncb-title { font-size: 16px; }
  .ncb-log { padding: 14px 12px 24px; }
  .ncb-card { padding: 12px; }
  .ncb-choice { font-size: 14px; min-height: 48px; padding: 14px 32px 13px 15px; }
  .ncb-carousel { margin: 12px -12px 0; padding: 0 12px 8px; }
}
