/* ========================================
   属性タイプ：全体デザイン
======================================== */

* {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    font-family: Arial, sans-serif;
  
    background: linear-gradient(
      135deg,
      #f3e8ff,
      #e0e7ff
    );
  
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  
  /* ========================================
     白いカード
  ======================================== */
  
  .container {
    background: white;
    padding: 40px 25px;
    border-radius: 20px;
  
    max-width: 450px;
    width: 100%;
  
    text-align: center;
  
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  
  
  /* ========================================
     タイトル・説明
  ======================================== */
  
  h1 {
    font-size: 30px;
    color: #6d28d9;
    margin-bottom: 20px;
  }
  
  p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
  }
  
  
  /* ========================================
     通常のボタン
  ======================================== */
  
  button {
    margin-top: 20px;
    padding: 15px 35px;
  
    border: none;
    border-radius: 30px;
  
    background: #7c3aed;
    color: white;
  
    font-size: 17px;
    font-weight: bold;
  
    cursor: pointer;
  
    transition: background 0.2s ease;
  }
  
  button:hover {
    background: #5b21b6;
  }
  
  
  /* ========================================
     質問画面
  ======================================== */
  
  #question-number {
    font-size: 14px;
    font-weight: bold;
    color: #7c3aed;
    margin-bottom: 15px;
  }
  
  #question-text {
    font-size: 23px;
    color: #333;
    margin: 25px 0;
    line-height: 1.5;
  }
  
  #options {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  #options button {
    display: flex;
    align-items: center;
    gap: 15px;
  
    width: 100%;
    margin-top: 0;
    padding: 15px;
  
    border-radius: 12px;
  
    background: #f3e8ff;
    color: #5b21b6;
  
    font-size: 16px;
    font-weight: normal;
    text-align: left;
  
    transition: background 0.2s ease;
  }
  
  #options button:hover {
    background: #ddd6fe;
  }
  
  .option-label {
    display: flex;
    align-items: center;
    justify-content: center;
  
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  
    border-radius: 50%;
  
    background: #7c3aed;
    color: white;
  
    font-size: 16px;
    font-weight: bold;
  }
  
  .option-text {
    flex: 1;
    text-align: left;
    line-height: 1.5;
  }
  
  #options button.selected {
    background: #ddd6fe;
    border: 2px solid #7c3aed;
  }
  
  
  /* ========================================
     前の質問に戻る
  ======================================== */
  
  #back-button {
    width: 100%;
    margin-top: 25px;
    padding: 12px;
  
    background: transparent;
    color: #7c3aed;
  
    border: 2px solid #7c3aed;
    border-radius: 12px;
  
    font-size: 15px;
  }
  
  #back-button:hover {
    background: #f3e8ff;
  }
  
  
  /* ========================================
     診断結果画面
  ======================================== */
  
  .result-heading {
    font-size: 18px;
    color: #7c3aed;
    font-weight: bold;
  }
  
  #result-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 20px auto;
    border-radius: 18px;
    object-fit: contain;
  }
  
  #result-emoji {
    font-size: 75px;
    margin: 20px 0;
  }
  
  #result-name {
    font-size: 36px;
    color: #7c3aed;
    margin: 10px 0;
  }
  
  #result-title {
    font-size: 20px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 25px;
  }
  
  #result-description {
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 30px;
  }
  
  
  /* ========================================
     詳しい説明
  ======================================== */
  
  .result-section {
    background: #f8f5ff;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: left;
  }
  
  .result-section h3 {
    font-size: 17px;
    color: #6d28d9;
    margin-top: 0;
  }
  
  .result-section p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 0;
  }
  
  
  /* ========================================
     属性別カラー
  ======================================== */
  
  #result-screen {
    --attribute-color: #7c3aed;
    --attribute-background: #f8f5ff;
  }
  
  #result-screen[data-attribute="fire"] {
    --attribute-color: #e53935;
    --attribute-background: #fff0ed;
  }
  
  #result-screen[data-attribute="water"] {
    --attribute-color: #1976d2;
    --attribute-background: #eaf5ff;
  }
  
  #result-screen[data-attribute="wind"] {
    --attribute-color: #009688;
    --attribute-background: #e8f8f5;
  }
  
  #result-screen[data-attribute="grass"] {
    --attribute-color: #388e3c;
    --attribute-background: #edf8ed;
  }
  
  #result-screen[data-attribute="dark"] {
    --attribute-color: #673ab7;
    --attribute-background: #f0ebfa;
  }
  
  #result-screen[data-attribute="light"] {
    --attribute-color: #b8860b;
    --attribute-background: #fff8df;
  }
  
  #result-screen[data-attribute="rainbow"] {
    --attribute-color: #7c3aed;
    --attribute-background: #f8f3ff;
  }
  
  #result-name,
  .result-heading {
    color: var(--attribute-color);
  }
  
  #result-screen .result-section {
    background: var(--attribute-background);
  }
  
  #result-screen .result-section h3 {
    color: var(--attribute-color);
  }
  
  
  /* ========================================
     虹属性の特別デザイン
  ======================================== */
  
  #result-screen[data-attribute="rainbow"] #result-name {
    background: linear-gradient(
      90deg,
      #ff4d6d,
      #ff9f1c,
      #ffd60a,
      #2ec4b6,
      #4361ee,
      #9d4edd
    );
  
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
  
  #result-screen[data-attribute="rainbow"] .result-section {
    background: linear-gradient(
      135deg,
      #fff0f5,
      #f3efff,
      #edf7ff
    );
  }
  
  
  /* ========================================
     SNSシェア
  ======================================== */
  
  .share-section {
    margin-top: 35px;
    padding: 25px 15px;
    border-top: 1px solid #e5e7eb;
  }
  
  .share-section h3 {
    font-size: 19px;
    color: #333;
    margin-bottom: 10px;
  }
  
  .share-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
  }
  
  
  /* ========================================
     結果画像の保存ボタン
  ======================================== */
  
  #save-image-button {
    width: 100%;
    margin-top: 15px;
    padding: 16px 20px;
  
    border-radius: 12px;
  
    background: #7c3aed;
    color: white;
  
    font-size: 17px;
    font-weight: bold;
  }
  
  #save-image-button:hover {
    background: #5b21b6;
  }
  
  #save-image-button:disabled {
    opacity: 0.6;
    cursor: wait;
  }
  
  .save-image-note {
    margin-top: 10px;
    font-size: 13px;
    color: #777;
  }
  
  
  /* ========================================
     Xでシェア
  ======================================== */
  
  #share-x-button {
    width: 100%;
    margin-top: 15px;
  
    background: #111;
    color: white;
  
    border-radius: 12px;
  }
  
  #share-x-button:hover {
    background: #333;
  }
  
  
  /* ========================================
     その他のアプリでシェア
  ======================================== */
  
  #share-button {
    width: 100%;
    margin-top: 12px;
  
    background: #7c3aed;
    color: white;
  
    border-radius: 12px;
  }
  
  #share-button:hover {
    background: #5b21b6;
  }
  
  
  /* ========================================
     もう一度診断する
  ======================================== */
  
  #restart-button {
    width: 100%;
    margin-top: 20px;
    background: var(--attribute-color);
  }
  
  #result-screen[data-attribute="rainbow"] #restart-button {
    background: linear-gradient(
      90deg,
      #ff4d6d,
      #ff9f1c,
      #4361ee,
      #9d4edd
    );
  }
  
  
  /* ========================================
     スマホ対応
  ======================================== */
  
  @media screen and (max-width: 480px) {
  
    body {
      padding: 15px;
    }
  
    .container {
      padding: 30px 20px;
      border-radius: 16px;
    }
  
    h1 {
      font-size: 26px;
    }
  
    #question-text {
      font-size: 20px;
    }
  
    #options button {
      padding: 12px;
      font-size: 15px;
      gap: 12px;
    }
  
    .option-label {
      width: 32px;
      height: 32px;
      font-size: 14px;
    }
  
    #result-image {
      max-width: 100%;
    }
  
    #result-name {
      font-size: 32px;
    }
  
    #result-title {
      font-size: 18px;
    }
  
    #result-emoji {
      font-size: 65px;
    }
  
  }/* 診断結果の説明文で改行を表示する */
#result-description,
#result-personality,
#result-work,
#result-relationship {
  white-space: pre-line;
}/* サイト共通のフッター */
.site-footer {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-size: 12px;
  }
  
  .site-footer a {
    color: #777;
    text-decoration: none;
  }
  
  .site-footer a:hover {
    color: #7652d6;
    text-decoration: underline;
  }
  /* ========================================
   診断結果の説明文
======================================== */

#result-description,
#result-personality,
#result-work,
#result-relationship {
  white-space: pre-line;
}


/* ========================================
   サイト共通フッター
======================================== */

.site-footer {
  margin-top: 35px;
  padding-top: 20px;

  border-top: 1px solid #eeeeee;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 12px 18px;

  font-size: 12px;
  line-height: 1.6;
}

.site-footer a {
  color: #777777;
  text-decoration: none;

  transition: color 0.2s;
}

.site-footer a:hover {
  color: #7652d6;
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid #7652d6;
  outline-offset: 4px;
  border-radius: 2px;
}
/* ========================================
   トップページの魔導書イラスト
======================================== */

.top-image {
    display: block;
  
    width: 100%;
    max-width: 340px;
    height: auto;
  
    margin: 24px auto;
  
    border-radius: 16px;
  }
  /* ========================================
   コピーライト
======================================== */

.copyright {
    margin: 18px 0 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.6;
    color: #999999;
  }