:root {
    --color-purple: #333b8e;     /* メイン：濃い紫 */
    --color-pink: #d36981;       /* メイン：ピンク・◯・メニューアイコン */
    --color-muted: #6e708e;      /* サブ：くすみ紫・× */
    --color-blue: #5ea3bc;       /* サブ：爽やかブルー */
    --color-yellow: #fcc319;     /* サブ：イエロー・△ */
    --text-color: #2c303e;
    --bg-color: #f6f7fa;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 15px;
    display: flex;
    justify-content: center;
}

.container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(51, 59, 142, 0.08);
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

/* ロゴエリア */
.logo-area {
    text-align: center;
    margin-bottom: 15px;
}
.logo-area img {
    max-width: 120px;
    height: auto;
}

h1 {
    font-size: 1.3rem;
    text-align: center;
    color: var(--color-purple);
    margin-top: 0;
    border-bottom: 3px solid var(--color-purple);
    padding-bottom: 8px;
}

/* 紹介文エリア */
p.intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4e5a;
    margin: 20px 0 25px 0;
    padding: 0 5px;
}

.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.progress {
    font-size: 0.95rem;
    color: var(--color-muted);
    font-weight: bold;
}
.abort-btn {
    background: none;
    border: 1px solid var(--color-muted);
    color: var(--color-muted);
    padding: 5px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.abort-btn:hover {
    background-color: #f0f0f5;
}

/* メニューボタン */
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    background-color: #ffffff;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    text-align: left;
    transition: all 0.2s ease;
}
.menu-btn i {
    color: var(--color-pink);
    margin-right: 12px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}
.menu-btn:hover {
    border-color: var(--color-purple);
    background-color: #fcfcfe;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(51, 59, 142, 0.05);
}
.menu-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.question-card {
    background-color: #f4f5f9;
    padding: 30px 20px;
    border-radius: 8px;
    font-size: 1.45rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #e4e6ee;
}
.question-card span.target {
    color: var(--color-purple);
    font-size: 1.65rem;
    border-bottom: 3px solid var(--color-pink);
    padding-bottom: 2px;
}
.btn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.check-btn {
    border: none;
    border-radius: 8px;
    padding: 18px 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.check-btn:active {
    transform: translateY(4px);
    box-shadow: none !important;
}

.btn-circle { background-color: var(--color-pink); box-shadow: 0 4px 0 #b24b62; }
.btn-triangle { background-color: var(--color-yellow); color: #ffffff; box-shadow: 0 4px 0 #cda013; }
.btn-cross { background-color: var(--color-muted); box-shadow: 0 4px 0 #545770; }

.answer-box {
    background-color: #fbf0f2;
    border: 2px solid #f3d1d8;
    border-radius: 8px;
    padding: 18px;
    margin-top: 15px;
    text-align: center;
    display: none;
}
.answer-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-pink);
    margin: 8px 0;
    display: inline-block;
    background-color: #ffffff;
    padding: 4px 20px;
    border-radius: 6px;
    border: 1px solid #f3d1d8;
}
.next-btn {
    display: block;
    width: 100%;
    background-color: var(--color-pink);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 4px 0 #b24b62;
}
.next-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}
.share-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    padding: 14px 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
}
.share-btn i {
    margin-right: 8px;
    font-size: 1.2rem;
}
.btn-line { background-color: #06c755; }
.btn-email { background-color: var(--color-purple); }

.result-section, .quiz-section {
    display: none;
}
.result-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 20px;
    padding: 4px 8px;
    border-left: 4px solid var(--color-purple);
}

/* 結果画面の各タイトル装飾 */
.title-circle { border-left-color: var(--color-pink); }
.title-triangle { border-left-color: var(--color-yellow); }
.title-cross { border-left-color: var(--color-muted); }

.btn-result-back {
    background-color: var(--color-purple);
    margin-top: 25px;
    box-shadow: 0 4px 0 #1e2460;
}

.result-list {
    list-style: none;
    padding: 0;
    margin: 5px 0;
}
.result-list li {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
}
.badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    color: white;
    margin-right: 5px;
}

/* 一覧表示エリア */
.list-section {
    margin-top: 35px;
    border-top: 2px dashed #cbd5e1;
    padding-top: 25px;
}
.list-section-title {
    text-align: center;
    color: var(--color-purple);
    margin-bottom: 15px;
}
.list-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #ffffff;
    color: var(--color-muted);
    border: 1px solid #cbd5e1;
    padding: 12px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.list-toggle-btn i {
    margin-right: 6px;
}
.list-toggle-btn:hover {
    background-color: #fbfbfd;
    color: var(--color-purple);
    border-color: var(--color-blue);
}
.kanji-table-wrapper {
    display: none;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 20px;
    background: #fafafa;
}
.kanji-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}
.kanji-table th, .kanji-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.kanji-table th {
    background-color: #f1f3f9;
    position: sticky;
    top: 0;
    color: var(--color-purple);
}
.kanji-table td strong {
    color: var(--color-pink);
    font-size: 1rem;
}

/* フッターエリア */
.footer-area {
    margin-top: 40px;
    text-align: center;
    border-top: 1px dashed #cbd5e1;
    padding-top: 20px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-btn {
    display: inline-block;
    background-color: #ffffff;
    color: #7e8494;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}
.footer-btn:hover {
    color: var(--color-purple);
    border-color: var(--color-purple);
    background-color: #fcfcfe;
}
.footer-btn i {
    margin-right: 5px;
}
.copyright {
    font-size: 0.75rem;
    color: #949ab0;
    margin-top: 18px;
}