:root { --bg-color: #1a100d; --paper-color: #f4ebd0; --text-color: #3e2723; --accent-color: #8b0000; --gold: #d4af37; }
body { margin:0; font-family:'Yu Mincho', serif; color:var(--text-color); overflow-x:hidden; transition: background 1.5s; }

.room-stage-0 { background-color: #000000; }
.room-stage-1 { background-color: #1a1515; }
.room-stage-2 { background-image: radial-gradient(circle, #3a2522 0%, #1a100d 100%); }
.room-stage-3 { background-image: radial-gradient(circle, #5c453e 0%, #1a100d 100%); }
.room-stage-4 { background-image: radial-gradient(circle, #8c736a 0%, #2e201c 100%); }

.screen { display: none; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.screen.active { display: flex; }
.antique-box { background: var(--paper-color); border: 4px double var(--gold); padding: 30px; border-radius: 5px; max-width: 600px; width: 100%; text-align: center; position: relative; }
.hidden { display: none !important; }

.input-group { margin: 20px 0; text-align: left; }
.input-group label { font-size: 0.9rem; color: #555; }
.input-group input, textarea { width: 100%; padding: 10px; margin-top: 5px; font-family: inherit; border: 1px solid var(--text-color); background: rgba(255,255,255,0.5); box-sizing: border-box;}

.slider-container { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 30px 0; font-size: 24px; }
input[type=range] { -webkit-appearance: none; width: 200px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: var(--text-color); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%; background: var(--gold); cursor: pointer; margin-top: -8px; }

.btn { background: var(--text-color); color: var(--paper-color); border: 2px solid var(--gold); padding: 10px 20px; cursor: pointer; font-family: inherit; transition: 0.3s; margin-top: 10px; }
.btn:hover { background: var(--accent-color); }
.back-btn { background: transparent; border: 1px solid var(--text-color); color: var(--text-color); font-size: 0.8rem; margin-top: 20px; }

.navigator-area { display: flex; align-items: flex-end; margin-bottom: 20px; max-width: 600px; width: 100%; }
.character-icon { font-size: 3rem; margin-right: 15px; }
.speech-bubble { background: rgba(255,255,255,0.9); padding: 15px; border-radius: 15px 15px 15px 0; border: 2px solid var(--accent-color); flex-grow: 1; text-align: left; font-size: 0.95rem; line-height: 1.4;}

/* 5段階ボタン（上から下へ配置） */
.options-5step { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.step-btn { padding: 12px; background: transparent; border: 1px solid var(--text-color); cursor: pointer; transition: 0.2s; font-family: inherit; }
.step-btn:hover { background: var(--text-color); color: var(--paper-color); }

.checkbox-list { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: 20px 0; max-height: 300px; overflow-y: auto; padding: 10px; border: 1px solid #ccc; }
.checkbox-list label { font-size: 0.9rem; cursor: pointer; }

/* 進捗バー */
.progress-bar { width: 100%; height: 5px; background: #ccc; margin-bottom: 5px; }
.progress { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.3s; }
.meta-text { font-size: 0.8rem; color: #666; margin-bottom: 15px; }

/* 芋虫の修正（吹き出しを上に） */
.caterpillar { position: fixed; bottom: 20px; right: -50px; font-size: 2rem; cursor: pointer; user-select: none; z-index: 1000; animation: crawlLeft 20s linear infinite; display: flex; flex-direction: column; align-items: center; }
.bug-speech { position: absolute; top: -35px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.8rem; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
@keyframes crawlLeft {
    0% { right: -50px; transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { right: 100vw; transform: translateY(0); }
}

.chart-container { max-width: 500px; margin: 20px auto; }
.secret-log { background: #eee; border-left: 5px solid var(--accent-color); padding: 15px; text-align: left; font-size: 0.9rem; margin-top: 20px;}
.result-text { text-align: left; line-height: 1.6; }

:root { --bg-color: #1a100d; --paper-color: #f4ebd0; --text-color: #3e2723; --accent-color: #8b0000; --gold: #d4af37; }
body { margin:0; font-family:'Yu Mincho', serif; color:var(--text-color); overflow-x:hidden; transition: background 1.5s; }

.room-stage-0 { background-color: #000000; }
.room-stage-1 { background-color: #1a1515; }
.room-stage-2 { background-image: radial-gradient(circle, #3a2522 0%, #1a100d 100%); }
.room-stage-3 { background-image: radial-gradient(circle, #5c453e 0%, #1a100d 100%); }
.room-stage-4 { background-image: radial-gradient(circle, #8c736a 0%, #2e201c 100%); }

.screen { display: none; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.screen.active { display: flex; }
.antique-box { background: var(--paper-color); border: 4px double var(--gold); padding: 30px; border-radius: 5px; max-width: 600px; width: 100%; text-align: center; position: relative; }
.hidden { display: none !important; }

/* ローディングの文字色を濃く */
.loader { color: #b8860b; text-align: center; }
.loading-text { font-size: 1.2rem; font-weight: bold; margin-top: 15px; color: #a67c00; text-shadow: 1px 1px 2px #000; }

.input-group { margin: 20px 0; text-align: left; }
.input-group label { font-size: 0.9rem; color: #555; }
.input-group input, textarea { width: 100%; padding: 10px; margin-top: 5px; font-family: inherit; border: 1px solid var(--text-color); background: rgba(255,255,255,0.7); box-sizing: border-box;}

.slider-container { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 30px 0; font-size: 24px; }
input[type=range] { -webkit-appearance: none; width: 200px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: var(--text-color); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%; background: var(--gold); cursor: pointer; margin-top: -8px; }

.btn { background: var(--text-color); color: var(--paper-color); border: 2px solid var(--gold); padding: 10px 20px; cursor: pointer; font-family: inherit; transition: 0.3s; margin-top: 10px; }
.btn:hover { background: var(--accent-color); }
.danger-btn { background: var(--accent-color); color: #fff; border: 2px solid #500; padding: 10px 20px; font-weight: bold; cursor: pointer; }
.back-btn { background: transparent; border: 1px solid var(--text-color); color: var(--text-color); font-size: 0.8rem; margin-top: 20px; }

.navigator-area { display: flex; align-items: flex-end; margin-bottom: 20px; max-width: 600px; width: 100%; }
.character-icon { font-size: 3rem; margin-right: 15px; }
.speech-bubble { background: rgba(255,255,255,0.9); padding: 15px; border-radius: 15px 15px 15px 0; border: 2px solid var(--accent-color); flex-grow: 1; text-align: left; font-size: 0.95rem; line-height: 1.4;}

.options-5step { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.step-btn { padding: 12px; background: transparent; border: 1px solid var(--text-color); cursor: pointer; transition: 0.2s; font-family: inherit; }
.step-btn:hover { background: var(--text-color); color: var(--paper-color); }

.progress-bar { width: 100%; height: 5px; background: #ccc; margin-bottom: 5px; }
.progress { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.3s; }
.meta-text { font-size: 0.8rem; color: #666; margin-bottom: 15px; font-weight: bold; }

.caterpillar { position: fixed; bottom: 20px; right: -50px; font-size: 2rem; cursor: pointer; user-select: none; z-index: 1000; animation: crawlLeft 20s linear infinite; display: flex; flex-direction: column; align-items: center; }
.bug-speech { position: absolute; top: -35px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.8rem; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
@keyframes crawlLeft { 0% { right: -50px; transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { right: 100vw; transform: translateY(0); } }

.chart-container { max-width: 500px; margin: 20px auto; }
.secret-log { background: #eee; border-left: 5px solid var(--accent-color); padding: 15px; text-align: left; font-size: 0.9rem; margin-top: 20px;}
.result-text { text-align: left; line-height: 1.6; }
.escape-area { margin-top: 20px; border: 1px dashed var(--accent-color); padding: 15px; }
:root { --bg-color: #1a100d; --paper-color: #f4ebd0; --text-color: #3e2723; --accent-color: #8b0000; --gold: #d4af37; }
body { margin:0; font-family:'Yu Mincho', serif; color:var(--text-color); overflow-x:hidden; transition: background 1.5s; }

.room-stage-0 { background-color: #000000; }
.room-stage-1 { background-color: #1a1515; }
.room-stage-2 { background-image: radial-gradient(circle, #3a2522 0%, #1a100d 100%); }
.room-stage-3 { background-image: radial-gradient(circle, #5c453e 0%, #1a100d 100%); }
.room-stage-4 { background-image: radial-gradient(circle, #8c736a 0%, #2e201c 100%); }

.screen { display: none; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.screen.active { display: flex; }
.antique-box { background: var(--paper-color); border: 4px double var(--gold); padding: 30px; border-radius: 5px; max-width: 600px; width: 100%; text-align: center; position: relative; }
.hidden { display: none !important; }

/* カスタムモーダル */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal-box { padding: 20px; max-width: 400px; font-size: 1rem; line-height: 1.5; }
.modal-icon { font-size: 2rem; color: var(--accent-color); margin-bottom: 10px; }

/* ローディング */
.loader { color: #b8860b; text-align: center; }
.loading-text { font-size: 1.2rem; font-weight: bold; margin-top: 15px; color: #a67c00; text-shadow: 1px 1px 2px #000; }

.input-group { margin: 20px 0; text-align: left; }
.input-group input, textarea { width: 100%; padding: 10px; margin-top: 5px; font-family: inherit; border: 1px solid var(--text-color); background: rgba(255,255,255,0.7); box-sizing: border-box;}

.slider-container { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 30px 0; font-size: 24px; }
input[type=range] { -webkit-appearance: none; width: 200px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: var(--text-color); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%; background: var(--gold); cursor: pointer; margin-top: -8px; }

.btn { background: var(--text-color); color: var(--paper-color); border: 2px solid var(--gold); padding: 10px 20px; cursor: pointer; font-family: inherit; transition: 0.3s; margin-top: 10px; }
.btn:hover { background: var(--accent-color); }
.danger-btn { background: var(--accent-color); color: #fff; border: 2px solid #500; padding: 10px 20px; font-weight: bold; cursor: pointer; }
.back-btn { background: transparent; border: 1px solid var(--text-color); color: var(--text-color); font-size: 0.8rem; margin-top: 20px; }

.navigator-area { display: flex; align-items: flex-end; margin-bottom: 20px; max-width: 600px; width: 100%; }
.character-icon { font-size: 3rem; margin-right: 15px; }
.speech-bubble { background: rgba(255,255,255,0.9); padding: 15px; border-radius: 15px 15px 15px 0; border: 2px solid var(--accent-color); flex-grow: 1; text-align: left; font-size: 0.95rem; line-height: 1.4;}

/* チェックボックスエリア（スクロール可能） */
.checkbox-list { display: flex; flex-direction: column; gap: 12px; text-align: left; margin: 20px 0; max-height: 400px; overflow-y: auto; padding: 15px; border: 2px solid #ccc; background: rgba(255,255,255,0.4); border-radius: 5px; }
.checkbox-list label { font-size: 0.95rem; cursor: pointer; border-bottom: 1px dashed #ccc; padding-bottom: 5px; }
.checkbox-list input[type=checkbox] { transform: scale(1.2); margin-right: 10px; }

.options-5step { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.step-btn { padding: 12px; background: transparent; border: 1px solid var(--text-color); cursor: pointer; transition: 0.2s; font-family: inherit; }
.step-btn:hover { background: var(--text-color); color: var(--paper-color); }

.progress-bar { width: 100%; height: 5px; background: #ccc; margin-bottom: 5px; }
.progress { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.3s; }
.meta-text { font-size: 0.8rem; color: #666; margin-bottom: 15px; font-weight: bold; }

.caterpillar { position: fixed; bottom: 20px; right: -50px; font-size: 2rem; cursor: pointer; user-select: none; z-index: 1000; animation: crawlLeft 20s linear infinite; display: flex; flex-direction: column; align-items: center; }
.bug-speech { position: absolute; top: -35px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.8rem; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
@keyframes crawlLeft { 0% { right: -50px; transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { right: 100vw; transform: translateY(0); } }

.chart-container { max-width: 500px; margin: 20px auto; }
.secret-log { background: #eee; border-left: 5px solid var(--accent-color); padding: 15px; text-align: left; font-size: 0.9rem; margin-top: 20px;}
.result-text { text-align: left; line-height: 1.6; }
.escape-area { margin-top: 20px; border: 1px dashed var(--accent-color); padding: 15px; }
.meta-data-box { background: rgba(255,255,255,0.5); padding: 10px; margin-bottom: 15px; border-radius: 5px; text-align: left; font-size: 0.9rem; }

:root { --bg-color: #1a100d; --paper-color: #f4ebd0; --text-color: #3e2723; --accent-color: #8b0000; --gold: #d4af37; }
body { margin:0; font-family:'Yu Mincho', serif; color:var(--text-color); overflow-x:hidden; transition: background 1.5s; }

.room-stage-0 { background-color: #000000; }
.room-stage-1 { background-color: #1a1515; }
.room-stage-2 { background-image: radial-gradient(circle, #3a2522 0%, #1a100d 100%); }
.room-stage-3 { background-image: radial-gradient(circle, #5c453e 0%, #1a100d 100%); }
.room-stage-4 { background-image: radial-gradient(circle, #8c736a 0%, #2e201c 100%); }

.screen { display: none; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.screen.active { display: flex; }
.antique-box { background: var(--paper-color); border: 4px double var(--gold); padding: 30px; border-radius: 5px; max-width: 600px; width: 100%; text-align: center; position: relative; }
.hidden { display: none !important; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal-box { padding: 20px; max-width: 400px; font-size: 1rem; line-height: 1.5; background: var(--paper-color); border: 3px double var(--accent-color); }
.modal-icon { font-size: 2rem; color: var(--accent-color); margin-bottom: 10px; }

.loader { color: #b8860b; text-align: center; }
.loading-text { font-size: 1.2rem; font-weight: bold; margin-top: 15px; color: #a67c00; text-shadow: 1px 1px 2px #000; }

.input-group { margin: 20px 0; text-align: left; }
.input-group input, textarea { width: 100%; padding: 10px; margin-top: 5px; font-family: inherit; border: 1px solid var(--text-color); background: rgba(255,255,255,0.7); box-sizing: border-box;}

.slider-container { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 30px 0; font-size: 24px; }
input[type=range] { -webkit-appearance: none; width: 200px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: var(--text-color); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%; background: var(--gold); cursor: pointer; margin-top: -8px; }

.btn { background: var(--text-color); color: var(--paper-color); border: 2px solid var(--gold); padding: 10px 20px; cursor: pointer; font-family: inherit; transition: 0.3s; margin-top: 10px; font-weight:bold; }
.btn:hover { background: var(--accent-color); }
.danger-btn { background: var(--accent-color); color: #fff; border: 2px solid #500; padding: 10px 20px; font-weight: bold; cursor: pointer; }
.back-btn { background: transparent; border: 1px solid var(--text-color); color: var(--text-color); font-size: 0.8rem; margin-top: 20px; }

.navigator-area { display: flex; align-items: flex-end; margin-bottom: 20px; max-width: 600px; width: 100%; }
.character-icon { font-size: 3rem; margin-right: 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.speech-bubble { background: rgba(255,255,255,0.9); padding: 15px; border-radius: 15px 15px 15px 0; border: 2px solid var(--accent-color); flex-grow: 1; text-align: left; font-size: 0.95rem; line-height: 1.4;}

.checkbox-list { display: flex; flex-direction: column; gap: 12px; text-align: left; margin: 20px 0; max-height: 400px; overflow-y: auto; padding: 15px; border: 2px solid #ccc; background: rgba(255,255,255,0.4); border-radius: 5px; }
.checkbox-list label { font-size: 0.95rem; cursor: pointer; border-bottom: 1px dashed #ccc; padding-bottom: 5px; }
.checkbox-list input[type=checkbox] { transform: scale(1.2); margin-right: 10px; }

.options-5step { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.step-btn { padding: 12px; background: transparent; border: 1px solid var(--text-color); cursor: pointer; transition: 0.2s; font-family: inherit; }
.step-btn:hover { background: var(--text-color); color: var(--paper-color); }

.progress-bar { width: 100%; height: 5px; background: #ccc; margin-bottom: 5px; }
.progress { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.3s; }
.meta-text { font-size: 0.8rem; color: #666; margin-bottom: 15px; font-weight: bold; }

.caterpillar { position: fixed; bottom: 20px; right: -50px; font-size: 2rem; cursor: pointer; user-select: none; z-index: 1000; animation: crawlLeft 20s linear infinite; display: flex; flex-direction: column; align-items: center; }
.bug-speech { position: absolute; top: -35px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.8rem; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
@keyframes crawlLeft { 0% { right: -50px; transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { right: 100vw; transform: translateY(0); } }

.chart-container { max-width: 500px; margin: 20px auto; background: rgba(255,255,255,0.8); border-radius: 10px; padding: 10px;}
.secret-log { background: #eee; border-left: 5px solid var(--accent-color); padding: 15px; text-align: left; font-size: 0.9rem; margin-top: 20px;}
.result-text { text-align: left; line-height: 1.6; }
.meta-data-box { background: rgba(255,255,255,0.6); padding: 10px; margin-bottom: 15px; border-radius: 5px; text-align: left; font-size: 0.95rem; border: 1px solid var(--gold); }

/* 特別な装飾 */
.fancy-title { color: var(--accent-color); text-shadow: 1px 1px 0px var(--gold); font-size: 1.8rem; border-bottom: 3px double var(--gold); padding-bottom: 10px; margin-bottom: 20px; }
.tri-title { font-size: 1.4rem; color: var(--text-color); background: rgba(212, 175, 55, 0.2); padding: 10px; border-radius: 5px; margin-bottom: 10px;}
.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
/* --- 前回のスタイルに以下を追加 --- */
.home-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: 0.3s;
    border: 1px solid var(--gold);
    padding: 8px 12px;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    z-index: 1000;
}
.home-link:hover {
    color: var(--paper-color);
    background: var(--accent-color);
    border-color: var(--accent-color);
}
.back-btn {
    background: var(--accent-color) !important;
    border: 2px solid var(--gold) !important;
    color: var(--paper-color) !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-top: 25px;
}
.back-btn:hover {
    background: #500 !important;
    transform: scale(1.05);
}

:root { --bg-color: #1a100d; --paper-color: #f4ebd0; --text-color: #3e2723; --accent-color: #8b0000; --gold: #d4af37; }
body { margin:0; font-family:'Yu Mincho', serif; color:var(--text-color); overflow-x:hidden; transition: background 1.5s; -webkit-tap-highlight-color: transparent; }

.room-stage-0 { background-color: #000000; }
.room-stage-1 { background-color: #1a1515; }
.room-stage-2 { background-image: radial-gradient(circle, #3a2522 0%, #1a100d 100%); }
.room-stage-3 { background-image: radial-gradient(circle, #5c453e 0%, #1a100d 100%); }
.room-stage-4 { background-image: radial-gradient(circle, #8c736a 0%, #2e201c 100%); }

.screen { display: none; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.screen.active { display: flex; }

/* スマホ対応：はみ出し防止のための 95% 幅制限 */
.antique-box { 
    background: var(--paper-color); 
    border: 4px double var(--gold); 
    padding: 25px; 
    border-radius: 5px; 
    max-width: 600px; 
    width: 95%; 
    box-sizing: border-box;
    text-align: center; 
    position: relative; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 10px; }
.modal-box { padding: 20px; max-width: 400px; font-size: 1rem; line-height: 1.5; background: var(--paper-color); border: 3px double var(--accent-color); }
.modal-icon { font-size: 2rem; color: var(--accent-color); margin-bottom: 10px; }

/* 防衛プロトコル警告文の装飾 */
.defense-protocol {
    background: rgba(139, 0, 0, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.5;
}
.defense-protocol h4 { margin: 0 0 5px 0; color: var(--accent-color); font-size: 0.95rem; }

.loader { color: #b8860b; text-align: center; }
.loading-text { font-size: 1.2rem; font-weight: bold; margin-top: 15px; color: #a67c00; text-shadow: 1px 1px 2px #000; }

/* ホームに戻る（スマホでも崩れないよう上部固定に） */
.home-link {
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.3s;
    border: 1px solid var(--gold);
    padding: 6px 10px;
    background: rgba(0,0,0,0.7);
    border-radius: 5px;
    z-index: 1000;
}
.home-link:hover { color: var(--paper-color); background: var(--accent-color); border-color: var(--accent-color); }

.input-group { margin: 20px 0; text-align: left; }
.input-group label { font-size: 0.85rem; }
.input-group input, textarea { width: 100%; padding: 10px; margin-top: 5px; font-family: inherit; border: 1px solid var(--text-color); background: rgba(255,255,255,0.7); box-sizing: border-box; border-radius: 3px;}

.slider-container { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 25px 0; font-size: 24px; }
input[type=range] { -webkit-appearance: none; width: 65%; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: var(--text-color); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%; background: var(--gold); cursor: pointer; margin-top: -8px; }

.btn { background: var(--text-color); color: var(--paper-color); border: 2px solid var(--gold); padding: 10px 20px; cursor: pointer; font-family: inherit; transition: 0.3s; margin-top: 10px; font-weight:bold; }
.btn:hover { background: var(--accent-color); }

/* タイトルに戻るボタンのスタイリング強化 */
.back-btn {
    background: var(--accent-color) !important;
    border: 2px solid var(--gold) !important;
    color: var(--paper-color) !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-top: 25px;
}
.back-btn:hover { background: #500 !important; transform: scale(1.05); }

.danger-btn { background: var(--accent-color); color: #fff; border: 2px solid #500; padding: 10px 20px; font-weight: bold; cursor: pointer; }

/* スマホ対応：ダーリン吹き出し */
.navigator-area { display: flex; align-items: flex-end; margin-bottom: 20px; max-width: 600px; width: 95%; }
.character-icon { font-size: 2.5rem; margin-right: 10px; }
.speech-bubble { background: rgba(255,255,255,0.9); padding: 12px; border-radius: 12px 12px 12px 0; border: 2px solid var(--accent-color); flex-grow: 1; text-align: left; font-size: 0.9rem; line-height: 1.4; box-sizing: border-box;}

.checkbox-list { display: flex; flex-direction: column; gap: 12px; text-align: left; margin: 20px 0; max-height: 350px; overflow-y: auto; padding: 15px; border: 2px solid #ccc; background: rgba(255,255,255,0.4); border-radius: 5px; }
.checkbox-list label { font-size: 0.9rem; cursor: pointer; border-bottom: 1px dashed #ccc; padding-bottom: 5px; }
.checkbox-list input[type=checkbox] { transform: scale(1.1); margin-right: 10px; }

.options-5step { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.step-btn { padding: 12px; background: transparent; border: 1px solid var(--text-color); cursor: pointer; transition: 0.2s; font-family: inherit; font-size: 0.9rem; }
.step-btn:hover { background: var(--text-color); color: var(--paper-color); }

.progress-bar { width: 100%; height: 5px; background: #ccc; margin-bottom: 5px; }
.progress { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.3s; }
.meta-text { font-size: 0.8rem; color: #666; margin-bottom: 15px; font-weight: bold; }

.caterpillar { position: fixed; bottom: 15px; right: -50px; font-size: 1.8rem; cursor: pointer; user-select: none; z-index: 1000; animation: crawlLeft 20s linear infinite; display: flex; flex-direction: column; align-items: center; }
.bug-speech { position: absolute; top: -35px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.75rem; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
@keyframes crawlLeft { 0% { right: -50px; transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { right: 100vw; transform: translateY(0); } }

.chart-container { max-width: 480px; margin: 20px auto; background: rgba(255,255,255,0.8); border-radius: 10px; padding: 10px; width: 100%; box-sizing: border-box;}
.secret-log { background: #eee; border-left: 5px solid var(--accent-color); padding: 12px; text-align: left; font-size: 0.85rem; margin-top: 20px;}
.result-text { text-align: left; font-size: 0.95rem; line-height: 1.5; }
.meta-data-box { background: rgba(255,255,255,0.6); padding: 10px; margin-bottom: 15px; border-radius: 5px; text-align: left; font-size: 0.9rem; border: 1px solid var(--gold); }

.fancy-title { color: var(--accent-color); text-shadow: 1px 1px 0px var(--gold); font-size: 1.6rem; border-bottom: 3px double var(--gold); padding-bottom: 10px; margin-bottom: 20px; }
.tri-title { font-size: 1.25rem; color: var(--text-color); background: rgba(212, 175, 55, 0.2); padding: 10px; border-radius: 5px; margin-bottom: 10px;}
.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; width: 95%; }

/* escapeギミックのデザイン */
.escape-area { margin-top: 25px; border: 1px dashed var(--accent-color); padding: 15px; border-radius: 5px; background: rgba(139,0,0,0.05); }
.escape-warning-title { font-weight: bold; color: var(--accent-color); margin: 0 0 5px 0; font-size: 0.9rem; }
.escape-warning-desc { font-size: 0.75rem; color: #555; line-height: 1.4; margin: 0 0 10px 0; }

/* メディアクエリ（画面幅の狭いスマホ対応） */
@media screen and (max-width: 480px) {
    .antique-box { padding: 15px; }
    .fancy-title { font-size: 1.4rem; }
    .tri-title { font-size: 1.1rem; }
    .speech-bubble { font-size: 0.85rem; }
    .home-link { top: 10px; left: 10px; font-size: 0.75rem; padding: 4px 8px; }
    .btn { padding: 8px 15px; font-size: 0.9rem; }
    .back-btn { margin-top: 15px; }
}