/* デモ版の配色と配置(ブルー系「澄んだ空」+映像を青い舞台に乗せる)。本番(live)には無いファイル
   base.css は stage3_build_css.py で作り直すものなので触らず、ここで上書きする
   色: 青 #1D5FA8・濃紺 #13315C・うすい青 #EEF4FB・枠線 #C9DBEF・映像の地 #0F2742・文字 #1A2B45 */

body.demo { background: #fff; color: #1A2B45; }

/* ヘッダー: 詰めて映像を上へ */
.demo-header { background: #fff; }
.demo-brand { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 12px 5px; max-width: 1228px; margin: 0 auto; }
.demo-logo { height: 26px; width: auto; display: block; }
.demo-welcome { font-size: .95rem; text-align: right; }

/* メニュー: 青い帯。文字はヘッダーの下端から映像の上端までの上下中央(スマホ 9px ずつ=上 9・下 3+舞台の 6) */
.demo-nav { display: flex; background: #1D5FA8; padding: 9px 4px 3px; }
.demo-nav a { flex: 1; text-align: center; color: #fff; font-size: 1rem; line-height: 1.5; text-decoration: none; padding: 0 2px; }
.demo-nav a:first-child { font-weight: bold; }
.demo-nav a:hover { text-decoration: underline; color: #fff; }
.demo-nav a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 2px; }

/* 青い舞台: 帯が映像の後ろへ続き、映像が影つきで乗る */
.demo-stage { background: linear-gradient(180deg, #1D5FA8 0, #1D5FA8 55%, #fff 55%); padding: 6px 6px 0; }
.demo-video { position: relative; aspect-ratio: 16 / 9; max-width: 1180px; margin: 0 auto; background: #0F2742; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 18px rgba(15, 39, 66, .35); }
.demo-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 本文 */
.demo-body { padding: 12px 12px 24px !important; max-width: 1228px; margin: 0 auto; }  /* 映像(最大 1180px)と左右の端を揃える: 1180+24×2 */
.demo-h { font-size: 1.15rem; font-weight: bold; color: #13315C; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 3px solid #1D5FA8; }
.demo-note { font-size: .9rem; line-height: 1.5; margin: 0 0 6px; }

/* アンケート: 映像の直下の青い枠の箱 */
.demo-enquete { margin: 4px 0 8px; border: 2px solid #1D5FA8; border-radius: 10px; overflow: hidden; background: #fff; }
.demo-enquete-head { background: #1D5FA8; color: #fff; font-weight: bold; font-size: 1.05rem; padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; flex: none; }
.demo-enquete-body { padding: 10px 12px 12px; }
.demo-enquete-q { font-size: 1.15rem; font-weight: bold; line-height: 1.5; margin-bottom: 8px; }
.demo-enquete select#choice { width: 100%; max-width: 100%; font-size: 1.1rem; padding: 8px 12px; border: 2px solid #9DB8D8; border-radius: 6px; background: #fff; color: #1A2B45; }

/* ボタン */
.demo-btn { display: block; width: 60%; min-width: 180px; margin: 10px 0 2px; padding: 9px 0; border: 0; border-radius: 6px; background: #1D5FA8; color: #fff; font-size: 1.1rem; font-weight: bold; cursor: pointer; }
.demo-btn:hover:not(:disabled) { background: #13315C; }
.demo-btn:focus-visible { outline: 3px solid #13315C; outline-offset: 2px; }
.demo-btn:disabled { background: #8FA9C8; cursor: not-allowed; }

/* みなさまから会場へ: 中身に合わせて高さが伸びる入力欄 */
.demo-input { display: block; width: 100%; min-height: 3.4em; resize: none; overflow: hidden; font-size: 14px; line-height: 1.65; padding: 8px 10px; border: 2px solid #1D5FA8; border-radius: 6px; color: #1A2B45; background: #fff; }
.demo-input:focus { outline: 3px solid #C9DBEF; outline-offset: 1px; }
.demo-count { font-size: .9rem; text-align: right; margin-top: 3px; color: #4A5D78; }
.demo-count.is-full { color: #B3261E; font-weight: bold; }
.demo-done { padding: 8px 0; font-weight: bold; color: #13315C; }
.demo-error { margin: 6px 0; color: #B3261E; font-weight: bold; }

/* 会場からみなさまへ: 文に合わせて高さが伸びる(左の太線なし) */
.demo-host { min-height: 2.6em; padding: 10px 12px; font-size: 14px; line-height: 1.7; background: #EEF4FB; border: 1px solid #C9DBEF; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* 送れなかったときの知らせ(本番と同じ形・色だけ合わせる) */
.enquete-error { margin-top: .75rem; padding: .75rem 1rem; border: 2px solid #B3261E; border-radius: 4px; background: #fff; color: #B3261E; font-weight: bold; font-size: 1.05rem; }

/* フッター */
body.demo footer { background: #13315C !important; color: #D5E3F3 !important; }

/* パソコン: 映像を大きく、メッセージ欄は 2 列。メニューは上下 10px ずつ(上 10・下 4+舞台の 6) */
@media (min-width: 768px) {
  .demo-brand { padding: 5px 24px 4px; }
  .demo-nav { padding: 10px 24px 4px; }
  .demo-stage { background: linear-gradient(180deg, #1D5FA8 0, #1D5FA8 58%, #fff 58%); padding: 6px 24px 0; }
  .demo-body { padding: 8px 24px 32px !important; }
  .demo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
  .demo-enquete-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  .demo-enquete-q { flex: 1 1 260px; margin: 0; }
  .demo-enquete select#choice { flex: 0 0 240px; width: 240px; }
  .demo-enquete .demo-btn { width: auto; min-width: 130px; padding: 9px 20px; margin: 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ログイン画面: 「デモを体験する」が主役。テスト用の ID の欄は小さく下に */
body.demo .demo-nav-bar { padding: 0; height: 8px; }
body.demo .login-title { color: #13315C; }
body.demo .login-button { background: #1D5FA8; }
body.demo .login-button:hover, body.demo .login-button:focus { background: #13315C; outline-color: #C9DBEF; }
body.demo .demo-guest-button { font-size: 1.4rem; padding: .9rem 2rem; min-width: 70%; box-shadow: 0 6px 14px rgba(15, 39, 66, .25); }
.demo-sub-title { font-size: 1rem; font-weight: bold; color: #4A5D78; margin: 2.5rem 0 .5rem; padding-top: 1rem; border-top: 1px solid #C9DBEF; }
body.demo .demo-login-box .login-label { font-size: 1rem; }
body.demo .demo-login-box .login-input { font-size: 1.05rem; }
body.demo .demo-login-box .login-button { font-size: 1.05rem; min-width: 40%; background: #fff; color: #1D5FA8; border: 2px solid #1D5FA8; }
body.demo .demo-login-box .login-button:hover, body.demo .demo-login-box .login-button:focus { background: #EEF4FB; color: #13315C; }

/* Livesysとは・ログアウトの確認 */
.demo-page { max-width: 720px; }
.demo-page-lead { font-size: 1.05rem; line-height: 1.7; margin: 8px 0 20px; }
.demo-page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.demo-about-h { font-size: 1.05rem; font-weight: bold; color: #13315C; margin: 28px 0 10px; padding-left: 10px; border-left: 4px solid #1D5FA8; }
.demo-about-steps, .demo-about-list { margin: 0 0 8px; padding-left: 1.5em; line-height: 1.7; }
.demo-about-steps li { margin-bottom: 10px; }
.demo-about-steps b { color: #13315C; }
.demo-about-list li { margin-bottom: 4px; }
.demo-about-note { margin: 8px 0 0; padding: 10px 12px; font-size: .95rem; line-height: 1.7; background: #EEF4FB; border: 1px solid #C9DBEF; border-radius: 6px; }
.demo-about-contact { line-height: 1.8; margin: 0; }
a.demo-link-btn { display: inline-block; width: auto; min-width: 200px; padding: 10px 24px; margin: 0; text-align: center; text-decoration: none; color: #fff; }
a.demo-link-btn:hover { color: #fff; text-decoration: none; }
a.demo-btn-sub { background: #fff; color: #1D5FA8; border: 2px solid #1D5FA8; }
a.demo-btn-sub:hover { background: #EEF4FB; color: #13315C; }

/* 映像が未設定(空)のあいだの表示。映像が読み込まれると上に重なって見えなくなる */
.demo-video::before { content: "映像は準備中です"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #BFD6F0; font-size: 1.1rem; }

/* アンケートの「受付中」: 新しい設問が出たときだけ、ゆっくり 3 回点滅(約 5 秒)→ そのあとは点灯したまま(ユーザー 11/15)
   1 回 1.6 秒(光の刺激の基準 1 秒に 3 回より十分遅い)。5 秒を超えて続けない(止める手段の要らない範囲)。ずっと続けるなら 3 を infinite に */
.demo-live { display: inline-block; padding: 0 6px; border-radius: 4px; background: #fff; color: #1D5FA8; font-weight: bold; }
.demo-live.is-blinking { animation: demo-blink 1.6s ease-in-out 3; }
@keyframes demo-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .demo-live.is-blinking { animation: none; } }
