/*
  オデュッセウス俺の10年を聞いてくれ ジェネレーター（先行モック）
  - PSD未支給のため、WFの情報配置・画面構成を基準にした仮スタイル。
  - 色・フォント・余白は仮。PSD支給後に差し替える前提。
  - レイアウトは通常フロー + flex/grid を基本とし、position: absolute は使用しない。
  - class名は kebab-case、BEM（__ / --）は使用しない。
*/

:root {
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-dark: #3c3c3c;
  --color-dark-strong: #262626;
  --color-text: #1f1f1f;
  --color-text-muted: #6b6b6b;
  --color-border: #d9d9d9;
  --color-accent: #b3261e;
  --color-error: #c62828;
  --content-max-width: 480px;
  --radius-pill: 999px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

#app {
  max-width: var(--content-max-width);
  margin: 0 auto;
  background: var(--color-surface);
  min-height: 100vh;
}

.step {
  padding-bottom: 48px;
}

.step[hidden] {
  display: none;
}

/* ===== TOP / KV ===== */

.kv {
  background: var(--color-dark);
  color: #ffffff;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kv-label {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.1em;
}

/* ===== タブ ===== */

.campaign-tabs {
  display: flex;
}

.campaign-tab {
  flex: 1 1 50%;
  padding: 14px 8px;
  border: none;
  background: var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: bold;
  line-height: 1.4;
  cursor: pointer;
}

.campaign-tab.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: inset 0 -3px 0 var(--color-dark);
}

.tab-panel {
  padding: 24px 20px 0;
}

.tab-panel[hidden] {
  display: none;
}

/* ===== 見出し・本文 ===== */

.campaign-title {
  font-size: 18px;
  margin: 0 0 16px;
}

.campaign-description {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: pre-line;
  margin: 0 0 20px;
}

.section-heading {
  font-size: 15px;
  margin: 0 0 8px;
}

.info-block {
  margin-bottom: 24px;
}

.info-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 13px;
  color: var(--color-text-muted);
}

.info-list li + li {
  margin-top: 6px;
}

.info-text {
  margin: 0 0 4px;
  font-size: 13px;
}

.note-text {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ===== 動画プレースホルダー ===== */

.video-placeholder {
  background: var(--color-dark);
  height: 180px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.play-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ===== 規約同意 ===== */

.consent-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
}

/* ===== ボタン共通 ===== */

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-block {
  margin: 0 20px 12px;
  width: calc(100% - 40px);
}

.btn-primary {
  background: var(--color-dark);
  color: #ffffff;
}

.btn-primary:disabled {
  background: var(--color-border);
  color: #9a9a9a;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-dark);
  border: 1px solid var(--color-dark);
}

.btn-link {
  background: transparent;
  color: var(--color-text-muted);
  font-weight: normal;
}

.official-site-link {
  display: block;
  text-align: center;
  padding: 16px 20px 40px;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ===== ジェネレーター共通ヘッダー ===== */

.generator-header {
  padding: 24px 20px 16px;
  text-align: center;
}

.generator-title {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 8px;
}

.generator-subtitle {
  font-size: 18px;
  margin: 0 0 8px;
}

.generator-description {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ===== STEP1: キャラクター選択 ===== */

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 20px 24px;
}

.character-card {
  border: 3px solid transparent;
  border-radius: var(--radius-md);
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
}

.character-card.is-selected {
  border-color: var(--color-accent);
}

.character-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  background: var(--color-border);
}

.character-name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

/* ===== STEP2: 入力フォーム ===== */

.input-form {
  padding: 0 20px;
}

.input-field {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.input-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  background: #f0f0f0;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.input-counter.is-over-limit {
  color: var(--color-error);
}

.input-error {
  color: var(--color-error);
  font-size: 12px;
  margin: 4px 0 0;
}

.input-error[hidden] {
  display: none;
}

/* ===== STEP3: 生成結果 ===== */

.canvas-wrap {
  padding: 20px;
}

.output-canvas,
#output-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  background: var(--color-dark);
}

.save-actions {
  text-align: center;
}

.save-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}

.share-heading {
  text-align: center;
  font-size: 13px;
  margin: 0 20px 16px;
}

.hashtag-box {
  text-align: center;
  margin-bottom: 8px;
}

.hashtag-text {
  font-size: 13px;
  font-weight: bold;
  margin: 0 0 12px;
}

.sns-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
  margin: 0 0 8px;
}

.sns-link {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.sns-link-instagram {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
}

.sns-link-threads {
  background: #000000;
}

.sns-link-tiktok {
  background: #111111;
}

.sns-link-x {
  background: #000000;
}

.sns-note {
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0 0 32px;
}

.result-actions {
  margin-top: 8px;
}

/* ===== Phase 2: 生還チャレンジ クイズ ===== */

.step-quiz {
  padding: 24px 20px 48px;
}

.quiz-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 220px;
  padding: 24px;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.quiz-question-text {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
  white-space: pre-line;
}

.quiz-number {
  text-align: center;
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-option {
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  padding: 24px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.quiz-option-a {
  background: #c8574f;
}

.quiz-option-b {
  background: #3f7f96;
}

.quiz-option-label {
  font-size: 32px;
  font-weight: bold;
}

.quiz-option-text {
  font-size: 13px;
}

/* ===== Phase 2: 生還チャレンジ 結果 ===== */

.challenge-result-header {
  text-align: center;
  padding: 24px 20px 0;
}

.challenge-result-title {
  font-size: 22px;
  margin: 0 0 8px;
}

.challenge-result-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ===== トースト通知 ===== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--color-dark-strong);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  z-index: 100;
}

.toast[hidden] {
  display: none;
}

/* ===== レスポンシブ ===== */

@media (min-width: 768px) {
  body {
    background: #e5e5e5;
  }

  #app {
    margin: 24px auto;
    min-height: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
  }
}
