:root {
    --primary-color: #4a90a4;      /* メインカラー（タイトル、ボタン基本色） */
    --primary-hover: #356f80;      /* 濃い見出し・強調（ボタンホバー時など） */
    --secondary-color: #f1f7f8;    /* 薄い背景（提案ボックスなど） */
    --secondary-hover: #d7e6ea;
    --text-main: #333333;          /* 本文（回答事実など：黒〜濃いグレー） */
    --text-light: #666666;         /* 補助文字（同点時の案内など） */
    --bg-color: #fafafa;           /* ページ全体背景 */
    --card-bg: #ffffff;
    --accent-color: #356f80;       /* 以前の赤/オレンジの代わりに「濃い見出し色」を使用 */
    --border-color: #d7e6ea;       /* 枠線 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.screen {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

.hidden {
    display: none !important;
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
}

h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-color);
}

h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    border-left: 4px solid var(--primary-color);
    padding-left: 8px;
}

p {
    margin-bottom: 16px;
}

/* Top Screen */
#screen-top {
    text-align: center;
    padding-top: 60px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.description {
    text-align: left;
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    font-size: 15px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin-bottom: 12px;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-hover);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: var(--text-main);
}

.btn.secondary:hover {
    background-color: var(--secondary-hover);
}

.btn.text-btn {
    background: none;
    color: var(--text-light);
    text-decoration: underline;
    margin-top: 24px;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 32px;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Question Screen */
.question-text {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 32px;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-main);
}

.option-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
}

.navigation-buttons {
    margin-top: 32px;
}

/* Result Screen */
.result-header {
    text-align: center;
    margin-bottom: 32px;
}

.result-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-type-title {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
    color: var(--accent-color);
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 16px;
}

.score-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    background-color: var(--secondary-color);
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
}

.score-item {
    flex: 1 1 45%;
}

.score-label {
    color: var(--text-light);
}

.score-value {
    font-weight: bold;
    color: var(--primary-color);
}

.result-section {
    margin-bottom: 24px;
}

.result-description {
    font-size: 15px;
}

.action-section {
    background-color: var(--secondary-color);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.action-section h4 {
    color: var(--primary-color);
}

.action-text {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0;
}

/* Email Capture */
.email-capture-section {
    background-color: var(--secondary-color);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.email-desc {
    font-size: 14px;
    margin-bottom: 16px;
}

.email-form input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    font-family: inherit;
}

.success-msg {
    color: #38a169;
    font-weight: 600;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .result-type-title {
        font-size: 16px;
        line-height: 1.6;
        padding-left: 12px;
        padding-right: 12px;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    .action-section h4 {
        font-size: 15px;
        letter-spacing: -0.5px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
