@charset "UTF-8";

:root {
    --bg-beige: #F7F3E8;
    --text-dark: #2C2C2C;
    --text-gray: #666666;
    --bg-accent: #EAE4D3;
    --primary: #32BA88;
    --blue: #5C9ADA;
    --teal: #66B0BC;
    --purple: #A379C9;
    --pink: #D66B8E;
    --border-radius-L: 24px;
    --border-radius-M: 16px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-dark);
    background-color: var(--bg-beige);
    overflow-x: hidden;
}

/* 共通コンテナ */
.main-container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; box-sizing: border-box; }

/* ガラス風コンテナ */
.container-glass {
    background: #fff; border: none; border-radius: var(--border-radius-L);
    padding: 30px 20px;
    margin-top: 20px; margin-bottom: 40px; box-shadow: var(--shadow-soft);
    box-sizing: border-box; 
    width: 100%; 
    overflow: hidden; 
}

/* ヒーローセクション */
.hero-section { position: relative; height: 80vh; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; color: white; overflow: hidden; border-bottom-left-radius: 40px; border-bottom-right-radius: 40px; background-color: #ccc; }
.hero-bg-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.hero-bg-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.65); }
.hero-content { z-index: 1; padding: 20px; animation: fadeIn 1s ease; }
.hero-title { font-size: 5vw; font-weight: 900; margin: 0; line-height: 1.1; letter-spacing: 0.02em; }
.hero-subtitle { font-size: 2em; font-weight: 700; margin-top: 20px; margin-bottom: 40px; }
.app-identity { display: inline-block; background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); padding: 20px 40px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.3); }
.app-name { font-size: 1.8em; font-weight: 900; margin: 0; }
.app-concept { font-size: 1.0em; margin: 5px 0 0; opacity: 0.95; font-weight: 500;}

/* コンセプト・評価シートセクション */
.concept-section { display: flex; align-items: center; gap: 60px; margin-bottom: 80px; padding: 40px 0; flex-wrap: wrap; }
.concept-text { flex: 1; min-width: 300px; }
.concept-text h3 { font-size: 2.2em; font-weight: 900; line-height: 1.5; margin-bottom: 30px; color: var(--text-dark); }
.concept-text p { font-size: 1.1em; line-height: 2; color: var(--text-gray); }
.concept-image { flex: 1; min-width: 300px; border-radius: var(--border-radius-L); overflow: hidden; box-shadow: var(--shadow-soft); background-color: #eee; border: 2px solid var(--text-dark); }
.concept-image img { width: 100%; height: auto; display: block; }

@media (max-width: 768px) {
    .hero-title { font-size: 3.5em; }
    .hero-subtitle { font-size: 1.3em; }
    .concept-section { flex-direction: column; gap: 30px; }
    .concept-text h3 { font-size: 1.8em; }
    .concept-text, .concept-image { width: 100%; }
}

.sheet-section { margin-bottom: 60px; }
.sheet-container-colored { background-color: var(--bg-accent); border-radius: var(--border-radius-L); padding: 60px 40px; text-align: center; box-sizing: border-box; }
.section-header { margin-bottom: 50px; max-width: 800px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 2.5em; font-weight: 900; margin-bottom: 30px; color: var(--text-dark); }
.section-desc p { font-size: 1.1em; line-height: 1.8; color: var(--text-dark); font-weight: 500; }
.note-text { display: block; margin-top: 10px; font-size: 0.9em; color: #555; }

.menu-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    text-align: left; 
    width: 100%;
}

.menu-card { 
    background: #fff; 
    border-radius: 24px; 
    border: none; 
    overflow: hidden; 
    cursor: pointer; 
    box-shadow: none; 
    transition: all 0.3s ease; 
    display: flex; 
    flex-direction: column;
    width: 100%; 
    box-sizing: border-box; 
}
.menu-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }

.cat-blue:hover .card-arrow { background: var(--blue); }
.cat-teal:hover .card-arrow { background: var(--teal); }
.cat-purple:hover .card-arrow { background: var(--purple); }
.cat-pink:hover .card-arrow { background: var(--pink); }

/* ★修正: 画像の中央配置を強化 */
.card-img { 
    width: 100%; 
    height: 220px; 
    overflow: hidden; 
    background-color: #eee; 
    position: relative; 
    display: flex; /* Flexboxで中央揃え */
    justify-content: center;
    align-items: center;
}
.card-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center center; /* 中央を基準にトリミング */
    display: block; 
    transition: transform 0.5s ease; 
    margin: 0 auto; /* 念のためマージン自動 */
}
.menu-card:hover .card-img img { transform: scale(1.05); }

.card-content { padding: 30px 30px 90px 30px; flex-grow: 1; display: flex; flex-direction: column; position: relative; }
.card-title { font-size: 1.4em; font-weight: 900; margin: 0 0 15px; color: var(--text-dark); text-align: center; }
.card-desc { font-size: 1em; color: var(--text-gray); line-height: 1.6; margin: 0; flex-grow: 1; }
.card-arrow { position: absolute; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--text-dark); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5em; transition: all 0.3s; }
.menu-card:hover .card-arrow { transform: translateX(5px); }

/* モード切替 */
.mode-switch-container { text-align: center; margin-top: 30px; margin-bottom: 0; }
.mode-switch { display: inline-flex; background: #fff; padding: 6px; border-radius: 50px; box-shadow: var(--shadow-soft); }
.toggle-btn { padding: 12px 30px; border-radius: 40px; cursor: pointer; font-weight: 700; color: var(--text-gray); transition: all 0.3s; }
.toggle-btn.active { background: var(--text-dark); color: white; }

/* 評価画面共通 */
.header-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.test-info { font-weight: 900; font-size: 1.1em; color: var(--primary); }
.progress-bar { height: 6px; background: #eee; border-radius: 4px; width: 100%; max-width: 600px; margin: 0 auto 15px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; }
.question-text { 
    font-size: 1.1em;
    margin-bottom: 15px; 
    font-weight: 900; 
    line-height: 1.4; 
    white-space: normal;
}

/* MAL専用レイアウト */
#mal-options-container { display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 100%; margin: 0 auto; box-sizing: border-box; }

.btn-mal-main { width: 100%; background: white; border: 2px solid #ccc; color: var(--text-dark); padding: 12px 15px; border-radius: 12px; font-size: 0.95em; font-weight: 700; text-align: left; cursor: pointer; transition: 0.2s; white-space: pre-wrap; line-height: 1.3; z-index: 1; margin-bottom: 0; box-sizing: border-box; }
.btn-mal-main:hover { background-color: #f0fffa; border-color: var(--primary); color: var(--primary); }

.mal-point-row { display: flex; justify-content: center; align-items: center; height: 30px; position: relative; z-index: 2; width: 100%; margin: 0 auto; }
.mal-point { width: 16px; height: 16px; background-color: var(--text-dark); border-radius: 50%; cursor: pointer; transition: all 0.2s ease; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.mal-point:hover { transform: scale(1.5); background-color: var(--primary); border-color: var(--primary); }

.btn-mal-exclude { width: 100%; background: #f0f0f0; border: 1px solid #999; color: #555; padding: 12px; border-radius: 12px; font-weight: bold; font-size: 0.9em; cursor: pointer; margin-top: 20px; box-sizing: border-box; }

.btn-mal-back { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; background-color: transparent; border: 1px solid var(--text-dark); border-radius: 50px; padding: 8px 20px; font-family: 'Noto Sans JP', sans-serif; font-size: 0.9em; font-weight: 700; color: var(--text-dark); cursor: pointer; transition: all 0.3s ease; margin-left: auto; margin-right: auto; }
.btn-mal-back:hover { background-color: var(--text-dark); color: white; }

.prev-answer-box { border: 1px solid var(--text-dark); padding: 8px 15px; margin-bottom: 15px; background-color: #f9f9f9; font-weight: bold; font-size: 0.95em; display: inline-block; border-radius: 6px; color: var(--text-dark); }

/* 通常の質問ボタン */
.options-grid { display: grid; gap: 20px; max-width: 500px; margin: 0 auto; }
.option-btn { background: white; border: 2px solid var(--text-dark); color: var(--text-dark); padding: 25px; border-radius: var(--border-radius-M); font-size: 1.2em; cursor: pointer; transition: 0.2s; font-family: 'Noto Sans JP', sans-serif; font-weight: 700; }
.option-btn:hover { border-color: var(--primary); background-color: #f0fffa; color: var(--primary); transform: scale(1.02); }
.option-btn:active { transform: scale(0.98); }

/* イントロ画面 */
.intro-box { background: white; padding: 40px; border-radius: 20px; border: 2px solid var(--text-dark); text-align: center; }
.intro-title { font-size: 1.8em; margin-bottom: 20px; font-weight: 900; }
.intro-desc { font-size: 1.0em; line-height: 1.8; text-align: left; white-space: pre-wrap; }

/* テキストリンクボタン */
.btn-text-link { background: none; border: none; color: #666; text-decoration: underline; cursor: pointer; font-weight: bold; font-size: 0.95em; transition: 0.2s; }
.btn-text-link:hover { color: var(--primary); }

/* 選択画面 */
.selection-header { text-align: center; margin-bottom: 20px; }
.selection-list { max-height: 400px; overflow-y: auto; text-align: left; border: 1px solid #ccc; padding: 15px; border-radius: 10px; margin-bottom: 20px; background: #f9f9f9; }
.selection-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee; }
.selection-item input { transform: scale(1.2); }
.selection-actions { display: flex; justify-content: center; gap: 20px; }

/* 結果画面 */
.result-title { text-align: center; font-size: 2em; font-weight: 900; color: var(--text-dark); }
.result-box { background: #fff; border: 2px solid var(--text-dark); border-radius: var(--border-radius-M); padding: 30px; margin: 30px 0; text-align: left; white-space: pre-wrap; font-family: monospace; font-size: 1.1em; max-height: 500px; overflow-y: auto; }
.result-actions { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 25px; }
.action-btn { background: var(--text-dark); color: white; border: none; padding: 20px 60px; font-size: 1.3em; border-radius: 50px; cursor: pointer; font-weight: 900; transition: transform 0.2s; }
.action-btn:hover { background: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(50, 186, 136, 0.3); }

/* カプセル型戻るボタン */
.btn-back-pill { display: inline-flex; align-items: center; gap: 12px; background-color: transparent; border: 2px solid var(--text-dark); border-radius: 50px; padding: 10px 24px; font-family: 'Noto Sans JP', sans-serif; font-size: 1em; font-weight: 700; color: var(--text-dark); cursor: pointer; transition: all 0.3s ease; text-decoration: none; }
.btn-back-pill:hover { background-color: var(--text-dark); color: white; transform: translateY(-2px); }
.arrow-icon { font-size: 1.2em; line-height: 1; transition: transform 0.3s ease; }
.btn-back-pill:hover .arrow-icon { transform: translateX(-4px); }
.back-link { display: none; }

.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }