:root {
    /* ベースカラー */
    --bg-default: #fcfbf9;
    --text-color: #333;
    --card-bg: #ffffff;
    --primary-color: #ff9f43; /* 共通アクセント（オレンジ） */
    
    /* セクション別背景色（パステルカラー） */
    --bg-char: #fff5f7;  /* 性格: ほんのりピンク */
    --bg-env:  #fffdeb;  /* 環境: クリームイエロー */
    --bg-int:  #e3f2fd;  /* 興味: アイスブルー */
    --bg-info: #e8f5e9;  /* 親情報: ミントグリーン */

    /* フォント */
    --font-main: 'M PLUS Rounded 1c', sans-serif;
    
    /* 結果画面のタイプ別カラー（JSで動的に変更される初期値） */
    --type-color: #ff9f43; 
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    
    /* ▼▼▼ スクロールを消すための重要設定 ▼▼▼ */
    margin: 0;               /* ブラウザの標準余白を消す */
    padding: 20px;           /* スマホで端っこすぎないように */
    width: 100%;             /* 横幅を指定 */
    min-height: 100vh;       /* 最低でも画面いっぱいの高さを確保 */
    box-sizing: border-box;  /* paddingを含めて100vhにする（超重要） */
    
    /* 中身をど真ん中に持ってくる設定 */
    display: flex;
    align-items: center;
    justify-content: center;

    /* 背景の設定 */
    background-color: #fffaf0; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cdefs%3E%3Cpattern id='p' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M10 10a5 5 0 1 1 0 10 5 5 0 1 1 0-10zm30 5a5 5 0 1 1 0 10 5 5 0 1 1 0-10zm-20 20a5 5 0 1 1 0 10 5 5 0 1 1 0-10z' fill='%23ffd700' opacity='0.3'/%3E%3Cpath d='M60 60a5 5 0 1 1 0 10 5 5 0 1 1 0-10zm30 5a5 5 0 1 1 0 10 5 5 0 1 1 0-10zm-20 20a5 5 0 1 1 0 10 5 5 0 1 1 0-10z' fill='%2387ceeb' opacity='0.3'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
    background-size: 150px 150px;
    transition: background-color 0.6s ease;
}


/* JSでこのラッパークラスに .bg-char 等が付与されます 
   背景色の切り替えアニメーションを設定
*/

.kurabino-wrapper {
    /* ▼▼▼ 幅と高さの修正 ▼▼▼ */
    width: 100%;             /* 親(body)に合わせて広がる */
    max-width: 600px;        /* PCではこれ以上広がらない */
    min-height: auto;        /* ★ここをautoにすることで無駄な伸びを防止 */
    
    margin: 0 auto;
    padding: 20px;
    
    /* デザイン調整 */
    background-color: var(--bg-default); 
    transition: background-color 0.6s ease; 
    border-radius: 20px;     /* 角丸 */
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); /* 影 */
    position: relative;
    overflow: hidden;        /* はみ出し防止 */
}

/* --- セクションごとの背景色クラス --- */
.kurabino-wrapper.bg-char, body.bg-char {
    background-color: var(--bg-char);
}
.kurabino-wrapper.bg-env, body.bg-env {
    background-color: var(--bg-env);
}
.kurabino-wrapper.bg-int, body.bg-int {
    background-color: var(--bg-int);
}
.kurabino-wrapper.bg-info, body.bg-info {
    background-color: var(--bg-info);
}

/* --- ヘッダー・進捗バー --- */
.quiz-header {
    margin-bottom: 30px;
    text-align: center;
}
.progress-container {
    position: relative;
    background: rgba(0, 0, 0, 0.05); /* 背景色が変わっても馴染むように半透明黒 */
    border-radius: 20px;
    height: 10px;
    margin: 10px 0;
}
.progress-bar {
    background: var(--primary-color);
    height: 100%;
    border-radius: 20px;
    width: 0%;
    transition: width 0.4s ease;
}
.progress-mascot {
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 24px;
    transition: left 0.4s ease;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    /* ▼ これを追加すると右向きになります！ */
    transform: scaleX(-1);
}
.progress-text {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

/* --- 質問カード --- */
.question-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    border: 2px solid #fff; /* 白い縁取りでポップさを強調 */
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-text {
    font-size: 20px;
    margin-bottom: 35px;
    color: #444;
    font-weight: bold;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 18px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: bold;
    color: #555;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 0 #e9ecef; /* 立体的なボタン */
}
.option-btn:active, .option-btn:hover {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--primary-color);
}

/* --- ローディング画面 --- */
.loading-screen {
    text-align: center;
    padding: 100px 0;
}
.spinner {
    font-size: 60px;
    animation: spin 1.5s infinite linear;
    display: inline-block;
    margin-bottom: 20px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text {
    font-size: 18px;
    color: #666;
    font-weight: bold;
}

/* --- 結果画面 --- */
.result-header {
    background: var(--type-color);
    color: #fff;
    padding: 40px 20px;
    border-radius: 24px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.result-subtitle { font-size: 14px; opacity: 0.9; margin-bottom: 5px;}
.result-title { font-size: 26px; margin: 0; font-weight: 800; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.result-cross { font-size: 24px; opacity: 0.8; margin: 5px 0; }
.result-sub-title { font-size: 22px; margin: 0 0 15px; font-weight: 700; }
.result-catch { 
    background: rgba(255,255,255,0.25); 
    display: inline-block; 
    padding: 8px 20px; 
    border-radius: 30px; 
    font-size: 15px; 
    font-weight: bold;
    backdrop-filter: blur(5px);
}
.result-icon { font-size: 80px; display: block; margin-top: 20px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }

/* カード共通 */
.result-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}
.result-card h3 {
    border-bottom: 3px solid var(--type-color); /* タイプカラーで下線 */
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #444;
}

/* 特性リスト */
.check-list {
    list-style: none;
    padding: 0;
}
.check-list li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}
.check-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--type-color);
}

.traits-box {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.trait-col { 
    flex: 1; 
    min-width: 140px;
    background: #f9f9f9; 
    padding: 15px; 
    border-radius: 12px; 
    font-size: 14px; 
}
.trait-col h4 { margin-top: 0; margin-bottom: 10px; font-size: 15px; color: var(--type-color); }
.trait-col ul { padding-left: 20px; margin: 0; }
.trait-col li { margin-bottom: 5px; color: #666; }

/* ランキング */
.ranking-item {
    background: #fff;
    border: 2px solid #f0f0f0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    transition: transform 0.2s;
}
.ranking-item:hover {
    border-color: var(--type-color);
    transform: translateY(-2px);
}
.ranking-head { font-size: 18px; font-weight: bold; color: #d35400; margin-bottom: 5px; }
.ranking-desc { font-size: 14px; color: #666; line-height: 1.5; }

/* アラート */
.alert-box {
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    color: #c0392b;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-box h4 { margin: 0 0 5px 0; font-size: 15px; }
.alert-box p { margin: 0; }

/* アドバイス＆アコーディオン */
.advice-block {
    background: #fafafa;
    border-radius: 10px;
    padding: 15px;
}
.ng-word { color: #7f8c8d; margin-bottom: 15px; }
.ok-word { color: #27ae60; }
.ng-word strong, .ok-word strong { display: block; margin-bottom: 5px; font-size: 12px; opacity: 0.8; }
.ng-word span, .ok-word span { font-weight: bold; font-size: 16px; }

.accordion-btn {
    background-color: #f1f2f6;
    color: #444;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: bold;
    font-family: var(--font-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}
.accordion-btn::after {
    content: '+';
    font-size: 20px;
    color: #999;
}
.accordion-btn.active-acc { background-color: #e2e4ea; }
.accordion-btn.active-acc::after { content: '-'; }

.accordion-panel {
    padding: 0 10px;
    display: none;
    overflow: hidden;
    background-color: white;
    font-size: 14px;
    margin-bottom: 15px;
}
.show-panel { display: block; padding: 10px 0; animation: slideDown 0.3s ease; }
@keyframes slideDown { from {opacity:0; transform:translateY(-10px);} to {opacity:1; transform:translateY(0);} }

.friend-column {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 14px;
    color: #2e7d32;
    border-left: 5px solid #66bb6a;
}

/* カスタマイズ条件 */
.condition-card { background: #fdfdfd; }
.condition-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.condition-list li { font-size: 13px; background: #eee; padding: 8px; border-radius: 6px; }

/* フッターCTA */
.result-footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 40px;
}
.result-footer p { font-weight: bold; font-size: 18px; margin-bottom: 20px; }

.cta-btn {
    background: var(--primary-color);
    color: white;
    width: 100%;
    max-width: 400px;
    padding: 18px;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 159, 67, 0.3);
    animation: pulse 2s infinite;
    transition: transform 0.2s;
}
.cta-btn:active { transform: scale(0.95); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 159, 67, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0); }
}

/* モーダル */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 999;
    bottom: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: flex-end; /* ハーフモーダル */
    backdrop-filter: blur(3px);
}
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 600px;
    padding: 40px 25px;
    border-radius: 24px 24px 0 0;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}
@keyframes slideUp { from {transform: translateY(100%);} to {transform: translateY(0);} }

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.modal-content h3 { font-size: 22px; margin-top: 0; color: #333; }
.input-group { margin: 25px 0; }
.modal-input {
    width: 80%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 12px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}
.modal-input:focus { border-color: var(--primary-color); }
.modal-sub-text { font-size: 14px; color: #888; background: #f0f0f0; display: inline-block; padding: 5px 15px; border-radius: 20px; }

.search-btn {
    background: #3498db;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    transition: transform 0.2s;
    width: 100%;
}
.search-btn:active { transform: scale(0.98); }

/* モーダル調整 */
.search-modal-content {
    max-height: 90vh; /* 縦長になりすぎないように */
    overflow-y: auto; /* スクロール可能に */
}

/* 検索結果エリア */
.result-section {
    margin-bottom: 25px;
    text-align: left;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
}
.result-section h4 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
    margin-bottom: 10px;
    color: #555;
}

/* 教室リスト（内部ヒット） */
.classroom-item {
    background: #fff;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid #eee;
}
.classroom-item:hover {
    background: #e3f2fd;
    border-color: #3498db;
}
.cls-name { font-weight: bold; font-size: 14px; color: #333; }
.cls-tag { 
    font-size: 12px; 
    background: #eee; 
    color: #666; 
    padding: 3px 8px; 
    border-radius: 4px; 
}

/* マップエリア */
.map-wrapper {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #ccc;
}
.map-link-btn {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

/* リトライボタン */
.retry-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

/* PC向けの調整 */
@media (min-width: 600px) {
    .kurabino-wrapper {
        border-radius: 20px;
        margin-top: 30px;
        margin-bottom: 30px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    }
    .modal-overlay { align-items: center; }
    .modal-content { border-radius: 24px; }
}

/* --- ランキング強調スタイル --- */

/* 共通レイアウト */
.ranking-item {
    display: flex;
    align-items: flex-start; /* 上揃え */
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

/* 左側の順位バッジエリア */
.rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    background: #f9f9f9;
    padding: 8px 4px;
    border-radius: 8px;
    flex-shrink: 0;
}

.rank-icon {
    font-size: 28px; /* アイコンを大きく */
    line-height: 1;
    margin-bottom: 2px;
}

.rank-num {
    font-size: 11px;
    font-weight: bold;
    color: #666;
}

/* 右側のテキストエリア */
.rank-content {
    flex-grow: 1;
}

.ranking-head {
    font-size: 18px; /* 文字サイズUP */
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
}

.ranking-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* --- 1位（ゴールド）の特別装飾 --- */
.ranking-item.rank-1 {
    background: #fffbea; /* 薄い黄色背景 */
    border: 2px solid #f1c40f; /* 金色の枠 */
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.2);
    transform: scale(1.02); /* ほんの少し大きく */
}
.ranking-item.rank-1 .rank-badge {
    background: #f1c40f;
}
.ranking-item.rank-1 .rank-num {
    color: #fff; /* 文字を白に */
}

/* --- 2位（シルバー）の特別装飾 --- */
.ranking-item.rank-2 {
    border: 1px solid #bdc3c7; /* 銀色の枠 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.ranking-item.rank-2 .rank-badge {
    background: #ecf0f1;
}

/* --- 3位（ブロンズ）の特別装飾 --- */
.ranking-item.rank-3 {
    border: 1px solid #e67e22; /* 銅色の枠 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.ranking-item.rank-3 .rank-badge {
    background: #fae5d3;
}


/* --- 親へのアドバイス（NG/OKワード）のデザイン改修 --- */

.advice-block {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 上下の間隔 */
    margin-top: 10px;
}

/* 🙅 封印したい言葉（NG） */
.ng-word {
    background-color: #fff0f0;   /* 薄い赤色の背景 */
    border: 1px solid #ffcaca;   /* 薄い赤色の枠線 */
    border-left: 5px solid #ff4d4d; /* 左側に太い赤線でアクセント */
    padding: 12px 15px;
    border-radius: 6px;
    color: #d63031;              /* 文字色：濃い赤 */
    margin: 0;                   /* 余白リセット */
    font-size: 14px;
    line-height: 1.6;
}

/* NGのタイトル部分を少し強調 */
.ng-word strong {
    display: block;              /* 改行させる */
    color: #ff4d4d;
    font-size: 12px;
    margin-bottom: 5px;
    border-bottom: 1px dashed #ffcaca; /* 下線 */
    padding-bottom: 4px;
}

/* 🙆 やる気を引き出す言葉（OK） */
.ok-word {
    background-color: #f0f9ff;   /* 薄い青色の背景 */
    border: 1px solid #cceeff;   /* 薄い青色の枠線 */
    border-left: 5px solid #3498db; /* 左側に太い青線でアクセント */
    padding: 12px 15px;
    border-radius: 6px;
    color: #2c3e50;              /* 文字色：濃いグレー（読みやすく） */
    margin: 0;
    font-size: 15px;             /* OKの方は少し文字を大きく */
    font-weight: bold;           /* 太字にしてポジティブ感を出す */
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.1); /* ふんわり影 */
}

/* OKのタイトル部分 */
.ok-word strong {
    display: block;              /* 改行させる */
    color: #3498db;              /* 青色 */
    font-size: 12px;
    margin-bottom: 5px;
    border-bottom: 1px dashed #cceeff;
    padding-bottom: 4px;
}

/* --- 戻るボタンのデザイン（ボタン版） --- */
.back-btn {
    display: inline-block;     /* ボタンとして表示 */
    background-color: #fff;    /* 背景は白 */
    border: 1px solid #ddd;    /* 薄いグレーの枠線 */
    color: #666;               /* 文字色はグレー */
    padding: 6px 16px;         /* 内側の余白（上下、左右） */
    border-radius: 20px;       /* 角を丸くしてカプセル型に */
    font-size: 13px;           /* 文字サイズ */
    font-weight: bold;         /* 少し太字に */
    cursor: pointer;           /* カーソルを指の形に */
    margin-bottom: 10px;       /* 下のバーとの隙間 */
    transition: all 0.2s ease; /* ふんわり変化させる */
    
    /* ボタン内のレイアウト */
    display: none; /* JSで制御するため初期は非表示（ここは変更なし） */
}

/* ホバー時（マウスを乗せた時）の動き */
.back-btn:hover {
    background-color: #f5f5f5; /* 背景を少し濃く */
    border-color: #ccc;        /* 枠線を少し濃く */
    color: #333;               /* 文字を濃く */
    transform: translateY(-1px); /* ほんの少し浮き上がる */
}

/* タップ時（押した瞬間）の動き */
.back-btn:active {
    transform: translateY(1px); /* 押し込む動き */
    background-color: #eee;
}


/* --- 最初から診断するボタンのデザイン --- */
.restart-btn {
    background: #fff;
    border: 1px solid #ccc;
    color: #666;
    padding: 10px 20px;
    border-radius: 50px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    max-width: 250px;
}
.restart-btn:hover {
    background: #f9f9f9;
}

/* --- スタート画面のデザイン --- */
.start-screen {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 20px auto;
}

.start-sub-title {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: bold;
}

.start-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
    color: #2c3e50;
}

.start-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.start-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.start-btn:active {
    transform: translateY(1px);
}

/* --- スタート画面表示中だけの特別ルール --- */
.kurabino-wrapper.start-mode {
    min-height: auto !important; /* 100vhを無効化して中身の高さに合わせる */
    height: auto;
    padding-bottom: 40px; /* 下に少し余裕を持たせる */
    
    /* もし「画面中央」に寄せたい場合は以下を有効にしてください */
    /*
    min-height: 100vh !important;
    display: flex;
    align-items: center;
    justify-content: center;
    */
}


/* --- インパクトのあるスタート画面デザイン --- */



/* 2. 表紙のボックスを少し浮かせる */
.start-screen {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* 影を強く */
    border: 3px solid #fff; /* 白い枠線 */
    background: linear-gradient(to bottom, #fff, #f9feff); /* ほんのりグラデーション */
}

/* 3. タイトルをロゴ風に装飾 */
.start-title {
    color: #2c3e50;
    font-size: 32px; /* 文字サイズUP */
    text-shadow: 2px 2px 0px #a3d5ff, 4px 4px 0px #e6f4ff; /* ポップな影 */
    letter-spacing: 1px;
}

/* 4. イラストを大きくし、枠線と影で目立たせる */
.start-img-box img {
    width: 100%;        /* 横幅いっぱいまで広がる（スマホ対策） */
    max-width: 350px;   /* ★ここが重要★ 最大幅を350pxに設定 */
    height: auto;       /* 高さは自動で調整 */
    
    border: 5px solid #fff; /* 白い枠を少し太く */
    border-radius: 16px;    /* 角を丸く（HTMLから移動） */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* 影を少し強く */
    transform: rotate(-2deg); /* 少し傾ける */
    margin: 25px 0;     /* 上下の余白も少し広げる */
}

/* 5. スタートボタンをぷっくり立体的に */
.start-btn {
    /* ▼ デザイン設定（変更なし） */
    background: linear-gradient(to bottom, #4facfe 0%, #00f2fe 100%);
    border: 3px solid #fff;
    color: white;
    font-size: 20px; /* 文字サイズが大きいので幅が必要 */
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    padding: 18px 40px;
    
    /* 立体的な影（変更なし） */
    box-shadow: 0 6px 15px rgba(0, 200, 255, 0.4), inset 0 3px 5px rgba(255,255,255,0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;

    /* ▼▼▼ ここを修正・追加してください ▼▼▼ */
    width: auto;          /* 横幅を中身に合わせる（100%から変更） */
    min-width: 300px;     /* 最低限の幅は確保 */
    max-width: 100%;      /* 画面幅以上にはならないように */
    white-space: nowrap;  /* ★重要：絶対に改行させない設定 */
    display: inline-block; /* インラインブロックにして幅を自然に */
}

/* ホバー時の設定（念のため残しておきます） */
.start-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 200, 255, 0.5), inset 0 3px 5px rgba(255,255,255,0.5);
}
.start-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 200, 255, 0.4), inset 0 2px 3px rgba(0,0,0,0.1);
}

/* ▼▼▼ 追加：質問画像のスマホへのはみ出し防止 ▼▼▼ */
.q-img {
    max-width: 100%;      /* 親要素の幅を超えないようにする */
    height: auto;         /* 高さは比率を維持して自動調整 */
    object-fit: contain;  /* 念のため、枠内に収まるように調整 */
}