/* ===================================================
   エニくまたんクエスト - スタイルシート v2
   背景白・ダーク文字・アニメーションなし
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=DotGothic16&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.shindan-page {
  background: #ffffff;
  font-family: 'DotGothic16', monospace;
  color: #1a1a1a;
  padding: 16px 8px 40px;
  -webkit-text-size-adjust: 100%;
}

@media print, screen and (min-width: 960px) {
    #wrapper:not(.colum1) #content-w, header + #content-w {
        padding-top: 10px;
        padding-bottom: 5em;
    }
}

#footer-wrapper {
    display: none;
}

/* ===== ルートコンテナ ===== */
#shindan-root {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== HUD ===== */
#shindan-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  background: #f2f2f2;
  border: 1px solid #cccccc;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 11px;
}
#hud-title { color: #333333; font-weight: normal; }
#hud-step  { color: #666666; }

/* ===== ゲーム画面外枠 ===== */
#shindan-screen {
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

/* ===== シーンイラスト枠 ===== */
#scene-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5f5f5;
  overflow: hidden;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}
/* 画像未設定時のプレースホルダー表示 */
#scene-image-wrap::after {
  content: '[ シーン画像 ]';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbbbbb;
  font-size: 12px;
  font-family: 'DotGothic16', monospace;
  pointer-events: none;
}
#scene-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1; /* プレースホルダーより手前 */
}
/* src が空の場合は非表示にしてプレースホルダーを見せる */
#scene-img[src=""] { display: none; }

/* ===== ダイアログボックス ===== */
#dialog-box {
  background: #ffffff;
  border-top: 2px solid #888888;
  padding: 10px 12px 8px;
  min-height: 80px;
  position: relative;
  display: flex;
  flex-direction: column;
}
#speaker-plate {
  display: inline-block;
  background: #555555;
  color: #ffffff;
  font-size: 10px;
  padding: 2px 10px;
  margin-bottom: 6px;
  border-radius: 2px;
  font-family: 'DotGothic16', monospace;
}
#dialog-text {
  font-size: 18px;
  color: #1a1a1a;
  line-height: 1.8;
  min-height: 44px;
  white-space: pre-wrap;
  word-break: break-all;
}
.tap-hint {
  display: block;
  text-align: right;
  margin-top: 6px;
  font-size: 9px;
  color: #aaaaaa;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  line-height: 1;
}
.tap-hint.visible {
  opacity: 1;
}
.dialog-cursor {
  display: block;
  text-align: right;
  margin-top: 2px;
  font-size: 20px;
  color: #e92f3d;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1;
}
.dialog-cursor.visible {
  opacity: 1;
  animation: cursorBounce 1.2s ease-in-out infinite;
}
@keyframes cursorBounce {
  0%, 100% { transform: translateY(0);   opacity: 1; }
  50%       { transform: translateY(4px); opacity: 0.5; }
}

/* ===== 選択肢エリア ===== */
#choices-area {
  background: #fafafa;
  border-top: 1px solid #dddddd;
  padding: 8px 10px 10px;
}
#choice-hint {
  font-size: 17px;
  color: #777777;
  margin-bottom: 8px;
  line-height: 1.5;
}
#choices-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.choice-btn {
  display: block;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #bbbbbb;
  color: #fff;
  font-family: 'DotGothic16', monospace;
  font-size: 18px;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1.6;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.choice-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.choice-label {
  flex-shrink: 0;
  font-size: 17px;
  font-weight: bold;
  color: #fff;
  font-family: 'DotGothic16', monospace;
  min-width: 14px;
}
.choice-main {
  color: #fff;
  font-size: 17px;
  flex: 1;
  line-height: 1.6;
}
.choice-sub {
  margin: 4px 0 0 22px;
  font-size: 10px;
  color: #888888;
  line-height: 1.6;
}
.choice-btn:nth-child(even) {
  background: #2e2e2e;
}
.choice-btn:hover,
.choice-btn:focus {
  background: #666666;
  border-color: #666666;
  outline: none;
}
.choice-btn.selected {
  background: #f0f0f0;
  border-color: #333333;
}
.choice-btn.selected .choice-label {
  color: #333333;
}
.choice-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== 結果画面 ===== */
#result-screen {
  background: #ffffff;
  padding: 16px 14px 24px;
}
#result-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.result-block {
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 18px;
}
.result-block:last-child { border-bottom: none; }

.result-label {
  font-size: 10px;
  color: #888888;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

/* ブロック①：エニくまたんセリフ */
#result-kuma-message {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.8;
  min-height: 40px;
}
#result-kuma-text { white-space: pre-wrap; }

/* ブロック③：タイプ発表 */
#result-type-announce { text-align: center; }
.type-main-label {
  font-size: 11px;
  color: #888888;
  margin-bottom: 4px;
}
.type-main-name {
  font-size: 18px;
  color: #1a1a1a;
  font-weight: normal;
  margin-bottom: 8px;
  line-height: 1.4;
}
.type-sub-text {
  font-size: 11px;
  color: #555555;
  line-height: 1.6;
  margin-top: 4px;
}

/* ブロック④：センター得点バー */
#result-center-bars .result-label { margin-bottom: 10px; }
.center-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.center-bar-label {
  font-size: 11px;
  color: #333333;
  width: 80px;
  flex-shrink: 0;
}
.center-bar-track {
  flex: 1;
  height: 10px;
  background: #eeeeee;
  border-radius: 5px;
  overflow: hidden;
}
.center-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}
.bar-heart { background: #d06070; }
.bar-head  { background: #5080c0; }
.bar-body  { background: #50a050; }
.center-bar-num {
  font-size: 11px;
  color: #555555;
  width: 16px;
  text-align: right;
}

/* ブロック⑤：サブタイプ */
#result-subtype { font-size: 12px; color: #333333; line-height: 1.7; }
#result-subtype a { color: #333333; }

/* ブロック⑥：確認ステップ */
#result-check { font-size: 12px; color: #333333; }
#result-check p { margin-bottom: 10px; }
.check-btn-group { display: flex; gap: 6px; flex-wrap: wrap; }
.check-btn {
  background: #ffffff;
  border: 1px solid #bbbbbb;
  color: #333333;
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.12s;
}
.check-btn:hover { background: #f0f0f0; border-color: #666; }
.check-btn.selected { border-color: #333333; background: #f0f0f0; font-weight: bold; }

/* ブロック⑦：シェア */
#result-share .result-label { margin-bottom: 8px; }
.share-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 4px;
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1;
}
.share-btn-x    { background: #1a1a2e; color: #ffffff; border-color: #444; }
.share-btn-line { background: #06c755; color: #ffffff; }
.share-btn-copy { background: #ffffff; color: #333333; border-color: #aaaaaa; }
.share-btn:hover { opacity: 0.82; }

/* ブロック⑧：CTA */
#result-cta { text-align: center; }
#result-cta p {
  font-size: 12px;
  color: #333333;
  line-height: 1.7;
  margin-bottom: 12px;
}
.cta-btn {
  display: inline-block;
  background: #333333;
  color: #ffffff;
  font-family: 'DotGothic16', monospace;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.cta-btn:hover { opacity: 0.8; }

/* ブロック⑨：メール登録 */
#result-email { font-size: 12px; color: #555555; line-height: 1.7; }
#result-email p { margin-bottom: 10px; }
.email-form { display: flex; gap: 6px; flex-wrap: wrap; }
.email-input {
  flex: 1;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #bbbbbb;
  color: #1a1a1a;
  font-family: 'DotGothic16', monospace;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 3px;
}
.email-input:focus { outline: none; border-color: #555555; }
.email-submit {
  background: #555555;
  color: #ffffff;
  border: none;
  font-family: 'DotGothic16', monospace;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 3px;
  cursor: pointer;
}
.email-submit:hover { opacity: 0.82; }

/* もう一度診断するボタン */
#result-retry { padding-top: 4px; }
.retry-btn {
  background: #ffffff;
  color: #555555;
  border: 1px solid #aaaaaa;
  font-family: 'DotGothic16', monospace;
  font-size: 12px;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.retry-btn:hover { background: #f0f0f0; border-color: #666666; }
.retry-btn:disabled { opacity: 0.5; cursor: default; }


/* ===== フェードイン ===== */
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* ===== ローディング ===== */
.loading-dots::after {
  content: '…';
  animation: dots 1s step-end infinite;
}
@keyframes dots {
  0%   { content: ''; }
  33%  { content: '・'; }
  66%  { content: '・・'; }
  100% { content: '・・・'; }
}

/* ===== レスポンシブ ===== */
@media (max-width: 360px) {
  #dialog-text { font-size: 12px; }
  .choice-btn  { font-size: 11px; }
  .type-main-name { font-size: 15px; }
}
