/*
 * お問い合わせ帯（Figma コンポーネント「デモ枠/お問い合わせ帯」。2026-11-25 改訂）。
 * PC 用 高さ 50px（左「←デモトップに戻る」／中央 注記／右 ボタン）・スマホ用 高さ 44px（注記とボタン）。
 * 背景は黒地に白の斜めストライプ（不透明度 10%。11-26 木田さん）、ボタンはオレンジ #FF8400 に白の文字・左に封筒アイコン。
 */
#fixu-demo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000;
  box-sizing: border-box;
  height: 50px;
  padding: 0 24px;
  background-color: #000;
  background-image: repeating-linear-gradient(150deg, rgba(255,255,255,.1) 0 8px, transparent 8px 22px);
  color: #fff;
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", -apple-system, BlinkMacSystemFont, sans-serif;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  text-align: left;
}
#fixu-demo-bar[hidden] { display: none; }
#fixu-demo-bar a { text-decoration: none; }
#fixu-demo-bar .fixu-demo-bar-back {
  justify-self: start;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
#fixu-demo-bar .fixu-demo-bar-back:hover { opacity: .8; }
#fixu-demo-bar .fixu-demo-bar-text {
  justify-self: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}
#fixu-demo-bar .fixu-demo-bar-sp { display: none; }
#fixu-demo-bar .fixu-demo-bar-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 6px;
  background: #FF8400;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
#fixu-demo-bar .fixu-demo-bar-cta:hover { background: #e67700; }
#fixu-demo-bar .fixu-demo-bar-mail { flex: none; width: 20px; height: 16px; }

/* スマホ用: 注記（2 行）とボタンの 2 つだけ。「←デモトップに戻る」は置かない */
@media (max-width: 767px) {
  #fixu-demo-bar { height: 44px; padding: 0 12px 0 14px; display: flex; justify-content: space-between; gap: 8px; }
  #fixu-demo-bar .fixu-demo-bar-back { display: none; }
  #fixu-demo-bar .fixu-demo-bar-text { font-size: 10px; line-height: 1.4; text-align: left; white-space: nowrap; }
  #fixu-demo-bar .fixu-demo-bar-sp { display: inline; }
  #fixu-demo-bar .fixu-demo-bar-cta { gap: 5px; padding: 6px 9px; font-size: 11px; }
  #fixu-demo-bar .fixu-demo-bar-mail { width: 16px; height: 13px; }
}

/* 幅の狭い端末（〜379px）では、ウェブ版の長いボタン文言が収まるようアイコンを外して詰める */
@media (max-width: 379px) {
  #fixu-demo-bar { padding: 0 8px 0 10px; }
  #fixu-demo-bar .fixu-demo-bar-cta { padding: 6px 8px; font-size: 10px; }
  #fixu-demo-bar .fixu-demo-bar-mail { display: none; }
}

@media (max-width: 339px) {
  #fixu-demo-bar .fixu-demo-bar-cta { white-space: normal; text-align: center; line-height: 1.2; padding: 4px 8px; }
}

/* LINE 版を PC で見たとき（帯なし）の「←デモトップに戻る」。画面の左上に置く */
.fixu-demo-back-float { display: none; }
@media (min-width: 481px) {
  html.fixu-demo-line .fixu-demo-back-float {
    display: block;
    position: absolute;
    top: 20px;
    left: 24px;
    z-index: 2147483000;
    color: #162542;
    font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  html.fixu-demo-line .fixu-demo-back-float:hover { opacity: .7; }
}

/* LINE 版: スマホ表示（端末枠なし）のときだけ帯を出す。PC 表示（端末枠＋右の案内パネル）では出さない */
@media (min-width: 481px) {
  html.fixu-demo-line #fixu-demo-bar { display: none; }
}

/* web 版のログイン後の画面は main が「画面の高さ」（PC は 100vh）で中だけスクロールする作り。帯の分だけ縮めないと
   ページ全体にも帯の高さ分のスクロールが出て、スクロールバーが 2 本になる（2026-11-26 木田さん） */
@media (min-width: 768px) {
  html.fixu-demo-bar-active body.d-md-flex > main { height: calc(100vh - var(--fixu-demo-bar-h, 50px)) !important; }
}

/* 帯の高さ分だけ画面全体を下げる。高さは demo-bar.js が実測値を --fixu-demo-bar-h に入れる */
html.fixu-demo-bar-active body { padding-top: var(--fixu-demo-bar-h, 50px) !important; }

.fixu-demo-note {
  margin: 4px 0 8px;
  padding: 6px 8px;
  border-left: 3px solid #004976;
  background: #eef3f7;
  color: #00354f;
  font-size: 12px;
  line-height: 1.5;
}
