:root {
  --brand: #0ea5e9; /* アクセント */
  --bg: #0b1020;
  --panel: #11162a;
  --text: #e6e9f2;
  --muted: #a9b1c6;
  --cta: #22c55e;
  --warn: #f59e0b;
}

/* Reset（簡易） */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; background: #000;}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ★ flexレイアウトに変更 */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ヘッダー */
.header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #222a45; background: #000; backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 50;
}
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.header-title { font-size: 18px; font-weight: 500; color: #fff; }
.header-actions { margin-left: auto; display: flex; gap: 8px; }
.btn { padding: 10px 14px; border: 1px solid #2a3258; border-radius: 10px; background: #0f1530; color: var(--text); font-weight: 600; }
.btn:hover { border-color: #3b4474; }
.btn-ghost { background: transparent; }
.btn-cta { background: linear-gradient(180deg, #2ddc75, #1fb15a); border-color: #22c55e; }

.header .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  appearance:none;
  -webkit-appearance:none;
}

.header-btn-demo{
  padding: 13px 24px 15px;
  border: 2px solid #fff;
  border-radius: 30px;
  font-weight: 400;
  background: #000;
}
.header-btn-demo:hover{
  background: #fff;
  color: #000;
  border: #fff;
}
.header-btn-contact{
  padding: 13px 24px 15px;
  border: 2px solid #fff;
  border-radius: 30px;
  font-weight: 400;
  background: #EA0029;
}
.header-btn-contact:hover{
  background: #fff;
  color: #000;
  border: #fff;
  border: 2px solid #fff;
  text-decoration: none;
}
/* コンテナ：1080×810の比率を維持 */
.demo-frame {
  width: min(756px, 94vw);
  aspect-ratio: 1080 / 810; /* 画像と同じ比率 */
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid #ededed;
  user-select: none;
}

/* ★ mainを中央寄せコンテナに */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 背景（各ステップのメニュー画像） */
.stage-bg {
  position: absolute; inset: 0; background: center/cover no-repeat; transition: opacity .35s ease, transform .35s ease;
}
.stage-bg.enter { opacity: 0; transform: scale(1.015); }
.stage-bg.active { opacity: 1; transform: scale(1); }
.stage-bg.exit { opacity: 0; transform: scale(0.985); }

/* ホットスポット（クリックエリア） */
.hotspot { position: absolute; outline: none; border: none; background: transparent;  opacity: 1; transition: opacity .25s ease; }
@keyframes dash { to { offset-distance: 100%; } }

/* パルス（点滅）演出：光すぎない優しめ */
.pulse {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 2px solid #ffdd00;
  animation: double-ring 1.8s infinite;
}
@keyframes double-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 221, 0, 0.9),
                0 0 0 0 rgba(255, 221, 0, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 221, 0, 0),
                0 0 0 24px rgba(255, 221, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 221, 0, 0),
                0 0 0 0 rgba(255, 221, 0, 0);
  }
}

/* 吹き出し */
.balloon .mini {
  display: block;
  font-size: 13px;
  color: #fff;
}
.balloon {
  position: absolute;
  transform: translate(-50%, -8px);
  left: 50%;
  bottom: calc(100% + 10px);
  background: #000;
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 2px 3px 7px rgba(0,0,0,0.4);
  font-size: 13px;
  min-width: 200px;
  max-width: 240px;
  text-align: left;
  border: 2px solid #fff;   /* ← 白いふち */
}


/* 上側表示 */
.balloon-top {
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
}
.balloon-top::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 12px solid #fff;
}

.balloon-top::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid #000;
}



/* 左側表示 */
.balloon-left {
  top: 50%;
  left: auto;
  right: calc(100% + 10px);
  bottom: auto;
  transform: translateY(-50%);
  min-width: 200px;
  max-width: 240px;
  text-align: left;
}
.balloon-left::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 12px solid #fff;
}
.balloon-left::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 9px solid #000;
}


/* 右側表示 */
.balloon-right {
  top: 50%;
  left: calc(100% + 10px);
  bottom: auto;
  transform: translateY(-50%);
  min-width: 200px;
  max-width: 240px;
  text-align: left;
}
.balloon-right::before {
  content: "";
  position: absolute;
  left: -12px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 12px solid #fff;
}
.balloon-right::after {
  content: "";
  position: absolute;
  left: -9px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 9px solid #000;
}


/* 下側表示 */
.balloon-bottom {
  top: calc(100% + 10px);
  left: 50%;
  bottom: auto;
  transform: translate(-50%, 8px);
  min-width: 200px;
  max-width: 240px;
  text-align: left;
}

.balloon-bottom::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  top: auto;
  width: 0;
  height: 0;
  border-top: none;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 12px solid #fff;
}
.balloon-bottom::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%; 
  top: auto;
  width: 0;
  height: 0;
  border-top: none;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 9px solid #000;
}


/* ステップUI */
.step-ui { position: absolute; inset: 0; pointer-events: none; }
.step-number { position: absolute; top: 10px; left: 10px; background: rgba(9,13,28,0.65); backdrop-filter: blur(3px); border: 1px solid #263057; padding: 6px 10px; border-radius: 8px; font-weight: 700; font-size: 12px; color: var(--muted); }

.help-chip { position: absolute; top: 10px; right: 10px; pointer-events: auto; }
.help-chip .btn { padding: 8px 10px; font-size: 13px; }

/* 進捗バー */
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,0.06); }
.progress > div { height: 100%; width: 0%; background: linear-gradient(90deg, #67e8f9, #22d3ee, #0ea5e9); transition: width .3s ease; }

/* フッター（CTA） */
.footer { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid #222a45; background: #000; backdrop-filter: blur(6px); }
.footer .grow { flex: 1; color: #fff; font-size: 18px;}

/* 完了パネル */
.done-panel {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,10,24,0.58);
  /* backdrop-filter: blur(4px); */
  z-index: 51;
}
.done-card {
  width: 600px;
  background: #fff;
  border-radius: 14px;
  padding: 32px 16px 16px 16px;
  box-sizing: border-box;
  text-align: center;
}
.done-card h3 {
  font-size: 20px;
  font-weight: 500;
  color: #000;
  margin: 0 0 22px 0;
  line-height: 1 ;
}
.done-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
.done-actions .btn{
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  padding: 20px 0;
  border-radius: 4px;
  box-sizing: border-box;
  border: 0;
}
.done-actions .btn#btn-restart,
.done-actions .btn#btn-open-demos-2{
  background: #000;
  box-sizing: border-box;
  border: 2px solid #000;
}
.done-actions .btn#btn-restart:hover,
.done-actions .btn#btn-open-demos-2:hover{
  background: #fff;
  color: #000;
  border: 2px solid #000;
  box-sizing: border-box;
}
.done-actions .btn.btn-ghost{
  border: 2px solid #000;
  color: #000;
}
.done-actions .btn#btn-contact-2{
  background: #EA0029;
  border: 2px solid #EA0029;
}
.done-actions .btn#btn-contact-2:hover{
  background: #fff;
  color: #EA0029;
  border: 2px solid #EA0029;
  text-decoration: none;
}
.done-actions .btn#btn-close-done:hover{
  background: #000;
  color: #fff;
  border: 2px solid #000;
  text-decoration: none;
}
@media (min-width: 520px) {
  .done-actions { grid-template-columns: 1fr 1fr; }
}

/* ヒントトースト */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; background: #fff; border: 1px solid #2a335b; padding: 10px 14px; border-radius: 10px; font-size: 14px; display: none; z-index: 90; }

/* アクセシビリティ補助 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* デモ選択モーダル */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.45);
  z-index: 80;
}
.modal-card {
  width: 600px;
  background: #fff;
  border-radius: 14px;
  padding: 32px 16px 16px 16px;
  box-sizing: border-box;
  text-align: center;
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 560px) {
  .demo-grid { grid-template-columns: 1fr 1fr; }
}
.demo-card {
  padding: 0 0 22px 0;
  border-radius: 5px;
  background: #F5F5F2;
  display: grid;
  gap: 8px;
  border: none;
  position: relative;
}

.modal .modal-card{
  position: relative;
}
.modal .modal-card h3{
  font-size: 20px;
  font-weight: 500;
  color: #000;
  margin: 0 0 22px 0;
  line-height: 1 ;
}

.demo-card_ttl{
  font-size: 16px;
  font-weight: 700;
  background: #000;
  line-height: 1;
  text-align: center;
  color: #fff;
  padding: 10px 0 12px;
  border-radius: 5px 5px 0 0;
}
.demo-card_lead{
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  padding: 0 8px;
  margin-bottom: 8px;
  color: #000;
}
.btn-brand {
  background: #EA0029;
  border-radius: 20px;
  font-size: 15px;
  padding: 9px 38px 10px 25px;
  line-height: 1;
  font-weight: 400;
  position: relative;
  border: none;
  box-sizing: border-box;
}
.demo-card:hover .btn-brand{
  background: #fff;
  border: 2px solid #EA0029;
  color: #EA0029;
  box-sizing: border-box;
}
.demo-card:hover .btn-brand::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 6px;
  background: url("img/common/arrow-red.svg");
  background-size: cover;
  width: 24px;
  height: 24px;
}
.demo-card_btnWrap .btn-brand::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 6px;
  background: url("img/common/arrow.svg");
  background-size: cover;
  width: 24px;
  height: 24px;
}
.modal .modal-card .btn-wrap{
  position: absolute;
  top: -50px;
  right: 0;
}
.modal .modal-card .btn-wrap .btn{
  background: #fff;
  color: #000;
  border: none;
}
.modal .modal-card .btn-wrap .btn.btn-ghost:hover{
  text-decoration: underline;
}
#btn-prev,
#btn-next{
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  border: none;
  border-radius: 50px;
  position: relative;
}
#btn-prev:hover,
#btn-next:hover{
  opacity: 0.8;
}
#btn-prev{
  padding: 14px 32px 14px 52px;
}
#btn-next{
  padding: 14px 52px 14px 32px;
}
#btn-prev::before{
  content: "";
  position: absolute;
  top: 15px;
  left: 13px;
  background: url("img/common/arrow-black-prev.svg");
  background-size: cover;
  width: 24px;
  height: 24px;
}
#btn-next::before{
  content: "";
  position: absolute;
  top: 15px;
  right: 13px;
  background: url("img/common/arrow-black-next.svg");
  background-size: cover;
  width: 24px;
  height: 24px;
}

#btn-next.is-disabled,
button.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none; /* 念のためクリック不可に */
}
#btn-next.is-disabled::before{
  position: inherit;
  background: none;
}
#btn-next.is-disabled{
  padding: 14px 30px 14px 32px;
}

/* デモ完了モーダル（全画面オーバーレイ） */
#donePanel {
  position: fixed;          /* ← 画面全体を固定表示 */
  inset: 0;                 /* ← top/right/bottom/left: 0 と同じ */
  display: none;            /* JSで openDone 時に display:flex に */
  align-items: center;      /* 中身を中央寄せ（縦） */
  justify-content: center;  /* 中身を中央寄せ（横） */
  background: rgba(0, 0, 0, 0.6); /* 画面全体を薄暗く */
  z-index: 1000;            /* 他のボタンより手前に出す */
}

/* 中のパネル（例：クラス名は実際のHTMLに合わせて） */
#donePanel .done-inner {
  background: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
