        body {
            font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', Meiryo, sans-serif;
            max-width: 500px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
            color: #333;
        }

        .container {
            background-color: white;
            border-radius: 10px;
            padding: 20px; /* 30→20 */
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            text-align: center;
        }

        .start-screen {
            text-align: center;
        }

        .start-title {
            font-size: 32px;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 20px;
        }

        .start-description {
            font-size: 16px;
            color: #666;
            line-height: 1.6;
            margin-bottom: 30px;
        }

        .btn-start {
            background-color: #2196F3;
            color: white;
            padding: 20px 40px;
            font-size: 20px;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            min-width: 200px;
        }

        .btn-start:hover:not(:disabled) {
            background-color: #0b7dda;
            transform: translateY(-2px);
        }

        .progress-container {
            margin-bottom: 30px;
        }

        .progress-text {
            font-size: 16px;
            color: #666;
            margin-bottom: 15px;
        }

        .candidate-count {
            font-size: 18px;
            font-weight: bold;
            color: #2c3e50;
            padding: 10px;
            background-color: #ecf0f1;
            border-radius: 5px;
            position: relative;
            overflow: hidden;
        }

        .candidate-count-bar {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
            transition: width 0.5s ease;
            border-radius: 5px;
            z-index: 0;
        }

        .candidate-count-text {
            position: relative;
            z-index: 1;
        }

        .question {
            font-size: 24px;
            margin: 30px 0;
            font-weight: 900;
            color: #2c3e50;
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            user-select: none;
        }

        .question span {
            opacity: 0;
            display: inline-block;
            position: relative;
            animation: fadeBrightnessShift 0.45s ease-out forwards;
            animation-delay: calc(0.05s * var(--i));
            color: #2c3e50;
        }

        @keyframes fadeBrightnessShift {
            0% {
                opacity: 0;
                filter: brightness(0.7);
            }
            50% {
                opacity: 0.6;
                filter: brightness(1.1);
            }
            100% {
                opacity: 1;
                filter: brightness(1);
            }
        }

        .buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-bottom: 20px;
        }

        .btn {
            padding: 15px 30px;
            font-size: 18px;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            min-width: 100px;
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-yes {
            background-color: #4CAF50;
            color: white;
        }

        .btn-yes:hover:not(:disabled) {
            background-color: #45a049;
            transform: translateY(-2px);
        }

        .btn-no {
            background-color: #f44336;
            color: white;
        }

        .btn-no:hover:not(:disabled) {
            background-color: #da190b;
            transform: translateY(-2px);
        }

        .btn-reset {
            background-color: #2196F3;
            color: white;
            margin-top: 20px;
        }

        .btn-reset:hover:not(:disabled) {
            background-color: #0b7dda;
            transform: translateY(-2px);
        }

        .btn-twitter {
            background-color: #1DA1F2;
            color: white;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .btn-twitter:hover:not(:disabled) {
            background-color: #0d8bd9;
            transform: translateY(-2px);
        }

        .result {
            display: none;
            text-align: left;
        }

        .result.show {
            display: block;
        }

        .result-title {
            font-size: 14px;
           margin-left: 12px; /* 左右で項目を生やした */
           margin-right: 12px;
            margin-bottom: 20px;
            font-weight: bold;
            color: #2c3e50;
            text-align: center;
        }

        .result-item {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 5px;
            padding: 5px 0.3px;  /* 上下5px 左右0.1px */
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.35s ease;
            display: flex ;
             align-items: center;
             gap: 5.5px;
        }

        .result-item:hover {
            background-color: #e9ecef;
            transform: translateY(-2px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .result-item.shake {
            animation: shake 0.45s ease-in-out;
        }

        @keyframes shake {
            0% { transform: translateX(0); }
            25% { transform: translateX(-6px); }
            50% { transform: translateX(6px); }
            75% { transform: translateX(-4px); }
            100% { transform: translateX(0); }
        }

        .result-item-title {
            font-size: 16px; /* 18→16 */
            font-weight: bold;
            color: #2c3e50;
            flex:1 ; /* ここ以降行数制限付き改行 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden; /* ここまで行数制限付き改行 */
        }

        .loading {
            display: none;
            font-size: 16px;
            color: #666;
        }

        .loading.show {
            display: block;
        }

        .error {
            display: none;
            color: #f44336;
            background-color: #ffebee;
            padding: 10px;
            border-radius: 5px;
            margin: 10px 0;
        }

        .error.show {
            display: block;
        }

        .hidden {
            display: none;
        }
/* ここから初回遷移時の強制表示モーダル　背景オーバーレイ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* モーダル本体 */
.modal-box {
  background: #fff;
  max-width: 90%;
  width: 270px;
  padding: 24px;
  border-radius: 10px;
  text-align: center;
}

/* モーダル内テキスト */
.modal-text {
  color: #a32444;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ボタンエリア */
.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* はい：黒背景ボタン */
.btn-agree {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
}

.btn-agree:hover {
  opacity: 0.85;
}

/* いいえ：リンクテキスト */
.modal-link {
  font-size: 14px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
}

.modal-link:hover {
  color: #000;
}

.modal-buttons button {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
}

/* ポートフォリオリンク専用のスタイル */
.portfolio-link {
  display: inline-block;
  color: #1DA1F2;
  text-decoration: underline;
  font-size: 1em;
  transition: color 0.3s;
  
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.portfolio-link:hover {
  color: #1a8cd8;
}
/* 結果画面の仮画像表示のスタイル */

.thumbnail {
  width: 100px;
  height: 75px;
  object-fit: contain;  /* cover → contain に変更 */
  border-radius: 5px;
  flex-shrink: 0;
 margin-left: -9px; /* 画像の左右を詰める */
 margin-right: -9px;
}

.result-item:hover .thumbnail {
  opacity: 0.85;
}