/* ============================================
   学習タイプ診断 - エチEトリアルチEイン
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700&family=Playfair+Display:wght@700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* Material Iconsのフォールバック - CDNブロチE時E保護 */
.material-icons::before {
    content: attr(data-icon) ' ';
    opacity: 0.5;
    font-family: sans-serif;
}

.material-icons {
    font-family: 'Material Icons', 'Segoe UI Symbol', 'Lucida Sans Unicode', sans-serif;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* フォント読み込み失敗時の代替 */
@font-face {
    font-family: 'Noto Sans JP';
    src: local('Yu Gothic'), local('Meiryo'), local('MS PGothic'), sans-serif;
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Noto Sans JP';
    src: local('Yu Gothic'), local('Meiryo'), local('MS PGothic'), sans-serif;
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: local('Georgia'), local('Times New Roman'), serif;
    font-weight: 700;
    font-style: normal;
}

:root {
    --anim-duration: 300ms;
    --primary: #0F2747;
    --primary-dark: #1B4B82;
    --accent: #C9A227;
    --accent-text: #7A6100;
    --bg: #F7FAFC;
    --text: #2D3748;
    --light-gray: #E2E8F0;
    --white: #FFFFFF;
    --focus-color: #B8860B;
}

/* Skip navigation link (accessibility) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #fff;
    z-index: 10000;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}
.skip-link:focus {
    left: 1rem;
    top: 0.5rem;
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    :root { --anim-duration: 0ms; }
    .fade-in-up, .main-content, .result-container { animation: none !important; opacity: 1; }
    .bounce-in { animation: none !important; }
}

@media (max-width: 599px) {
    :root { --anim-duration: 240ms; }
}

/* ============================================
   Bootstrap互換最小スタイル (CDN代替)
   ============================================ */
.container, .container-fluid {
    width: 100%;
    padding-right: var(--gutter-x, 0.75rem);
    padding-left: var(--gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.row { display: flex; flex-wrap: wrap; margin-top: calc(var(--gutter-y, 0) * -1); margin-right: calc(var(--gutter-x, 0.75rem) * -1); margin-left: calc(var(--gutter-x, 0.75rem) * -1); }
.col { flex: 1 0 0; padding-right: var(--gutter-x, 0.75rem); padding-left: var(--gutter-x, 0.75rem); margin-top: var(--gutter-y, 0); }

/* Navbar styles */
.navbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; position: relative; z-index: 1001; }
.navbar-expand-lg { }
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-grow: 1;
    }
    .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }
}
.navbar-light { }
@media (min-width: 992px) { .navbar-light .navbar-nav .nav-link { color: var(--text); } }
.bg-white { background-color: #fff !important; }

.ms-auto { margin-left: auto !important; }

.nav-item { margin-bottom: 0; }

.nav-link { display: block; padding: 0.625rem 1rem; text-decoration: none; color: var(--text); transition: color 0.3s; min-height: 44px; line-height: 1.5; }
.nav-link:hover { color: var(--accent-text); }

/* Mobile navbar styling */
@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: calc(100% + 8px);
        left: 1rem;
        right: 1rem;
        background: var(--white);
        padding: 0.5rem;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }
    .navbar-collapse.show {
        display: block !important;
    }
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    .navbar-nav .nav-item {
        margin: 0;
        border-bottom: 1px solid var(--light-gray);
    }
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    .navbar-nav .nav-link {
        padding: 0.625rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .lang-switch {
        margin-left: 0;
        padding-left: 0;
        padding-right: 0.5rem;
    }
}

@media (min-width: 992px) {
    .navbar-nav {
        display: flex;
        flex-direction: row;
        padding-left: 0;
        margin-bottom: 0;
        list-style: none;
    }
}

/* Collapse (hamburger menu) */
@media (max-width: 991px) {
    .collapse {
        display: none !important;
    }
    .collapse:not(.show) {
        display: none !important;
    }
    .collapse.show {
        display: block !important;
    }
}
.collapsing { position: relative; height: 0; overflow: hidden; transition: height 0.35s ease; }

.navbar-collapse {
    flex-basis: 100%;
    margin-left: 0;
}
@media (min-width: 992px) { .navbar-collapse { display: flex !important; flex-basis: auto; } }

/* Form check */
.form-check { display: block; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.form-check-input { width: 1.125rem; height: 1.125rem; margin-top: 0.25rem; margin-left: -1.5rem; }

/* Spacing utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* Padding utilities */
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }

/* Text utilities */
.text-muted { color: #6c757d !important; opacity: 0.7; }
.text-center { text-align: center !important; }

/* Navbar brand */
.navbar-brand { display: inline-block; padding-top: 0.3125rem; padding-bottom: 0.3125rem; margin-right: 1rem; font-size: 1.25rem; text-decoration: none; white-space: nowrap; }

/* Navbar toggler */
.navbar-toggler { display: flex; align-items: center; justify-content: center; padding: 0.25rem 0.5rem; font-size: 1.25rem; line-height: 1; background-color: transparent; border: 1px solid transparent; border-radius: 0.25rem; transition: box-shadow 0.15s ease-in-out; }
.navbar-toggler-icon { display: inline-block; width: 1.5rem; height: 1.5rem; vertical-align: middle; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280,0,0,0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3c/svg%3e"); background-repeat: no-repeat; background-position: center; background-size: 1.5rem 1.5rem; }

/* Position utilities */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }

/* Button base */
.btn { display: inline-block; padding: 0.5rem 1rem; font-size: 1rem; font-weight: 400; line-height: 1.5; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; border: 1px solid transparent; border-radius: 0.375rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; }

.d-block { display: block !important; }
@media (min-width: 992px) { .d-lg-none { display: none !important; } }
@media (min-width: 992px) { .d-lg-block { display: block !important; } }

/* Flex utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }

/* Width utilities */
.w-100 { width: 100% !important; }

/* Shadow */
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; }

/* Border radius */
.rounded { border-radius: 0.375rem !important; }
.rounded-pill { border-radius: 50rem !important; }

/* Badge */
.badge { display: inline-block; padding: 0.35em 0.65em; font-size: 0.75em; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 0.375rem; }

/* Progress bar */
.progress { display: flex; height: 0.5rem; overflow: hidden; background-color: var(--light-gray); border-radius: 0.25rem; }
.progress-bar { width: 0; height: 100%; background-color: var(--accent); border-radius: 0.25rem; transition: width 0.4s ease; }

/* ============================================
   タイポグラフィ
   ============================================ */
h1, h2, h3 {
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-top: 0;
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 1.5rem; padding-left: 15px; }
h3 { font-size: 1.3rem; margin-bottom: 1rem; }

/* ============================================
   アニメーション定義
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ============================================
   ヘッダー
   ============================================ */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary) !important;
    font-weight: bold;
}

.nav-link {
    color: var(--text) !important;
    margin-left: 30px;
    font-weight: 500;
    position: relative;
    transition: color 0.15s ease;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-text);
    transition: width 0.2s ease;
    box-shadow: 0 0 8px rgba(122, 97, 0, 0.5);
}

.nav-link:hover {
    color: var(--accent-text) !important;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    width: 100%;
}

.nav-link:focus-visible {
    color: var(--accent-text) !important;
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .nav-link::after {
        transition-duration: 0ms;
    }
}

/* ============================================
   ヒEローセクション
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 120px 20px;
    text-align: center;
    border-radius: 0;
    margin-bottom: 60px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.hero .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    font-weight: 300;
}

/* ============================================
   カードグリチE
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.card {
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-left-color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    border-left: 3px solid transparent;
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 36px rgba(0,0,0,0.1), 0 0 20px rgba(122, 97, 0, 0.1);
        border-left-color: var(--accent-text);
        background-color: rgba(122, 97, 0, 0.04);
    }
}

.card:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-left-color: var(--accent-text);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.card:focus-within {
    border-left-color: var(--accent-text);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.card-img {
    height: 180px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.card-body {
    padding: 25px;
    flex-grow: 1;
}

.card-tag {
    font-size: 0.8rem;
    color: var(--accent-text);
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary);
}

/* ============================================
   診断・結果画面
   ============================================ */
.main-content,
.fade-in-up {
    opacity: 0;
    animation: fadeInUp var(--anim-duration) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.diagnose-box {
    background: var(--white);
    padding: 50px;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 700px;
    margin: 50px auto;
}

.progress {
    background: var(--accent);
    height: 100%;
    transition: width 0.4s ease;
    box-shadow: 0 2px 4px rgba(237, 137, 54, 0.3);
}

.progress-bar {
    background: var(--light-gray);
    border-radius: 0;
    height: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.toggle-group-container {
    clear: both;
}

.option-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg);
    border: 2px solid transparent;
    padding: 20px;
    border-radius: 0;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

/* ============================================
   tB[hZbg
   ============================================ */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    float: left;
    width: 100%;
}

legend.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-check-label {
    margin-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
    .option-btn:hover {
        border-color: var(--accent-text);
        background: var(--white);
        transform: translateX(6px);
        box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.2), inset 0 0 12px rgba(122, 97, 0, 0.04);
    }
    .form-check-label:hover {
        border-color: var(--accent-text);
        background: var(--white);
        transform: translateX(6px);
        box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.15), inset 0 0 8px rgba(122, 97, 0, 0.03);
    }
}

.option-btn:focus-visible {
    border-color: var(--accent-text);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.25);
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.choice-input:focus-visible + .option-btn {
    border-color: var(--accent-text);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.25);
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .option-btn,
    .form-check-label {
        transition-duration: 0ms;
    }
}

/* 選択済みのオプションを色反転E見やすさ向上！E*/
.choice-input:checked + .option-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateX(0);
}

/* ラジオボタンを完Eに非表示EチェチEの、E廁EEE*/
.choice-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ============================================
   ボタン
   ============================================ */
.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    border-radius: 0;
    font-weight: 500;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(26, 54, 93, 0.3);
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 54, 93, 0.4);
}

.hero-cta {
    font-size: 1.1rem;
    padding: 15px 30px;
    border-radius: 0;
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .hero-cta:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(26, 54, 93, 0.5), 0 0 20px rgba(122, 97, 0, 0.4), 0 0 50px rgba(122, 97, 0, 0.1);
        border-color: var(--accent-text);
    }
}

.hero-cta:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-color: var(--accent-text);
    box-shadow: 0 0 15px rgba(122, 97, 0, 0.3);
}

.btn-primary-custom:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.btn-outline-primary {
    color: var(--primary);
    border: 2px solid var(--primary);
    background-color: transparent;
    border-radius: 0;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-share {
    color: var(--accent-text);
    border: 2px solid var(--accent-text);
    background-color: transparent;
    border-radius: 0;
}

.btn-share:hover {
    background-color: var(--accent-text);
    color: #fff;
}

.btn-share:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* ============================================
   フォー?
   ============================================ */
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(122, 97, 0, 0.25);
}

/* ============================================
   ビジュアル要?
   ============================================ */
.desc-block {
    background: rgba(26, 54, 93, 0.04);
    padding: 1.25rem;
    border-left: 4px solid var(--primary);
    border-radius: 0 0.25rem 0.25rem 0;
}

.ad-block {
    padding: 2rem;
    background: rgba(0,0,0,0.02);
    border-radius: 0.5rem;
    border: 1px dashed var(--light-gray);
}

.badge.bg-primary {
    background-color: var(--accent-text) !important;
}

.border-left-accent {
    border-left: 4px solid var(--accent);
    padding-left: 15px;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent);
}

.result-icon {
    font-size: 5rem;
    text-align: center;
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@media (max-width: 599px) {
    .result-icon { font-size: 4rem; }
}

.result-label {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--accent-text);
    font-weight: 600;
}

.result-type {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

.result-sub {
    color: var(--text);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    font-weight: normal;
}

.article-icon {
    font-size: 5rem;
    text-align: center;
}

.article-header {
    margin-bottom: 30px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ============================================
   用語集
   ============================================ */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.glossary-item {
    background: var(--white);
    padding: 20px;
    border-radius: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-top-color 0.15s ease;
    border-top: 3px solid transparent;
}

@media (hover: hover) and (pointer: fine) {
    .glossary-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.08), 0 0 12px rgba(122, 97, 0, 0.12);
        border-top-color: var(--accent-text);
    }
}

.glossary-item:focus-within {
    border-top-color: var(--accent-text);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08), 0 0 10px rgba(122, 97, 0, 0.1);
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .glossary-item {
        transition-duration: 0ms;
    }
}

.glossary-item h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}

.glossary-item p {
    color: var(--text);
    line-height: 1.6;
}

/* ============================================
   フッター
   ============================================ */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

footer p {
    opacity: 0.7;
    font-size: 0.9rem;
    margin: 0;
}

footer a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: 0.3s;
}

footer a:hover {
    color: var(--accent-text);
    opacity: 1;
}

/* ============================================
   ダークモーチE   ============================================ */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    .hero {
        background: linear-gradient(135deg, #0d2347 0%, #1A365D 100%);
    }
    .navbar, header {
        background-color: #2d2d2d !important;
    }
    .card, .diagnose-box {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    .ad-block {
        background: rgba(255,255,255,0.02);
        border-color: #444;
    }
    .option-btn {
        background: #333;
        color: #e0e0e0;
    }
}

/* ============================================
   レスポンシチE   ============================================ */
@media (max-width: 768px) {
    .hero { padding: 80px 20px; }
    .hero h1 { font-size: 2rem; }
    .diagnose-box { padding: 30px 20px; }
    .card-grid { gap: 20px; }
}

/* ============================================
   診断結果ペEジ (result.php) - 改良牁E   ============================================ */
.result-container {
    opacity: 0;
    animation: fadeInUp var(--anim-duration) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.result-card {
    background: var(--white);
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 700px;
    margin: 40px auto;
    overflow: hidden;
}

@media (max-width: 599px) {
    .result-card { border-radius: 0; }
}

/* 結果ヘッダー - アイコン・タイプ表示 */
.result-card-header {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.03) 0%, rgba(237, 137, 54, 0.02) 100%);
    position: relative;
}

@media (max-width: 599px) {
    .result-card-header { padding: 2rem 1rem 1.5rem; }
}

.result-icon-large {
    font-size: 6rem;
    line-height: 1;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

@media (max-width: 599px) {
    .result-icon-large { font-size: 5rem; }
}

.result-label-main {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--accent-text);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.result-title-main {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@media (max-width: 599px) {
    .result-title-main { font-size: 1.8rem; }
}

/* 結果カード本斁E*/
.result-card-body {
    padding: 1.5rem;
}

@media (max-width: 599px) {
    .result-card-body { padding: 1.25rem 1rem; }
}

/* 説明ブロチE */
.result-description-block {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.03) 0%, rgba(237, 137, 54, 0.02) 100%);
    padding: 1.5rem;
    border-radius: 0;
    border-left: 4px solid var(--primary);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 1.5rem;
}

/* セクションコンチE */
.result-section-container {
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.result-section-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.result-section-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 0;
}

.result-section-body {
    padding: 0 1.5rem;
}

/* スコアセクション - モバイルファースチE*/
.scores-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
    .scores-grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.score-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    padding: 0.75rem 1rem;
    border-radius: 0;
    border: 1px solid var(--light-gray);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

@media (min-width: 600px) {
    .score-chip {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 200px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .score-chip:hover {
        background: var(--white);
        border-color: var(--accent-text);
        transform: translateX(4px);
        box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.2), inset 0 0 8px rgba(122, 97, 0, 0.05);
    }
}

.score-chip:focus-within {
    background: var(--white);
    border-color: var(--accent-text);
    box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.2);
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .score-chip {
        transition-duration: 0ms;
    }
}

.score-label {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.score-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    min-width: 50px;
    text-align: center;
}

.result-description {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.03) 0%, rgba(237, 137, 54, 0.02) 100%);
    padding: 1.5rem;
    border-radius: 0;
    border-left: 4px solid var(--primary);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.result-tips {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.result-tips li {
    background: var(--bg);
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border-radius: 0;
    border-left: 4px solid var(--accent);
    font-size: 1rem;
    line-height: 1.5;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-left-color 0.15s ease, background 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .result-tips li:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 10px rgba(122, 97, 0, 0.15);
        border-left-color: var(--accent-text);
        background: var(--white);
    }
}

.result-tips li:focus-within {
    background: var(--white);
    border-left-color: var(--accent-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.result-tips li:last-child {
    margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .result-tips li {
        transition-duration: 0ms;
    }
}

.result-caution {
    background: rgba(237, 137, 54, 0.08);
    border: 1px solid rgba(237, 137, 54, 0.15);
    border-radius: 0;
    padding: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.recommend-section {
    margin-bottom: 2rem;
}

.recommend-label {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.glossary-btn {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 0;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .glossary-btn:hover {
        background: var(--primary);
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(26, 54, 93, 0.25), 0 0 14px rgba(122, 97, 0, 0.4);
    }
}

.glossary-btn:focus-visible {
    border-color: var(--accent-text);
    box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.3), 0 6px 15px rgba(26, 54, 93, 0.25);
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .glossary-btn {
        transition-duration: 0ms;
    }
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

@media (hover: hover) and (pointer: fine) {
    .article-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(26, 54, 93, 0.4);
    }
}

.article-icon {
    font-size: 1.5rem;
}

.ad-block {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(237, 137, 54, 0.02) 100%);
    border-radius: 0;
    border: 1px dashed var(--light-gray);
    margin-bottom: 2rem;
}

.ad-block p {
    color: var(--text);
    opacity: 0.7;
    margin: 0;
}

.disclaimer {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 2rem;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@media (min-width: 600px) {
    .actions {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
}

/* アクションポイントスタイル - カード型 */
.study-tips-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.study-tips-list li {
    background: var(--white);
    border: 1px solid var(--light-gray);
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    border-radius: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .study-tips-list li:hover {
        background: var(--white);
        border-color: var(--accent-text);
        transform: translateX(3px);
        box-shadow: 0 4px 14px rgba(0,0,0,0.06), inset 0 0 10px rgba(122, 97, 0, 0.04), 0 0 8px rgba(122, 97, 0, 0.1);
    }
}

.study-tips-icon {
    color: var(--accent-text);
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* CTAボタン強匁E- 主要アクションの視覚的強調 */
.btn-result-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
    border-radius: 0;
    padding: 1rem 2.2rem;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.35);
}

@media (hover: hover) and (pointer: fine) {
    .btn-result-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(26, 54, 93, 0.45), 0 0 15px rgba(122, 97, 0, 0.3);
    }
}

.btn-result-secondary,
.btn-result-share {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 0;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-result-secondary:hover,
.btn-result-share:hover {
    background: var(--accent-text);
    border-color: var(--accent-text);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.3), 0 0 12px rgba(122, 97, 0, 0.2);
}

.btn-result-primary:focus-visible,
.btn-result-secondary:focus-visible,
.btn-result-share:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* 用語集タグスタイル */
.glossary-tags {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
    .glossary-tags {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

.glossary-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--white);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0;
    border: 1px solid var(--light-gray);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .glossary-tag:hover {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(26, 54, 93, 0.2), 0 0 10px rgba(122, 97, 0, 0.3);
    }
}

/* 記事リンクカードスタイル */
.article-link-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.article-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.4), 0 0 12px rgba(122, 97, 0, 0.15);
}

.article-link-card:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.btn-result-success {
    background: var(--white);
    color: var(--accent-text);
    border: 2px solid var(--accent-text);
    border-radius: 0;
    padding: 0.8rem 1.8rem;
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

@media (hover: hover) and (pointer: fine) {
    .btn-result-success:hover {
        background: var(--accent-text);
        border-color: var(--accent-text);
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(26, 54, 93, 0.25), 0 0 12px rgba(122, 97, 0, 0.25);
    }
}

.btn-result-success:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* ============================================
   庁EスロチE
   ============================================ */
.ad-slot {
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 100px;
    width: 100%;
}

.ad-slot--placeholder {
    border: 1px dashed var(--light-gray);
    border-radius: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(237, 137, 54, 0.04) 100%);
    padding: 1.5rem 1rem;
}

.ad-slot__label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0.55;
    font-weight: 600;
}

.ad-slot__note {
    font-size: 0.7rem;
    color: var(--text);
    opacity: 0.4;
    font-family: 'Playfair Display', serif;
}

@media (prefers-color-scheme: dark) {
    .ad-slot--placeholder {
        border-color: #444;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(237, 137, 54, 0.06) 100%);
    }
    .ad-slot__label,
    .ad-slot__note {
        color: #aaa;
    }
}

/* 言語Eり替ぁEI */
.language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 16px;
}

/* ナビバE冁EE言語スイチEャー */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding-left: 16px;
}

.lang-link {
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 0;
    transition: background-color 0.2s, color 0.2s;
    letter-spacing: 0.02em;
}

.lang-link:hover {
    background-color: var(--bg);
    color: var(--accent-text);
}

.lang-link.active {
    background-color: var(--accent);
    color: #fff;
}

.lang-link:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.lang-sep {
    color: #ccc;
    font-size: 13px;
    user-select: none;
}

@media (prefers-color-scheme: dark) {
    .language-switcher {
        border-top-color: #444;
    }
    .lang-link {
        color: #aaa;
    }
    .lang-link:hover {
        background-color: #333;
        color: #e0e0e0;
    }
}

@media (prefers-color-scheme: dark) {
    .result-card {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    .result-card-header {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(237, 137, 54, 0.05) 100%);
    }
    .result-description-block {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(237, 137, 54, 0.05) 100%);
    }
    .score-chip {
        background: #333;
        border-color: #444;
    }
    .score-label {
        color: #ccc;
    }
    .study-tips-list li {
        background: #333;
        border-color: #444;
    }
    .glossary-tag {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }
    .article-link-card {
        background: linear-gradient(135deg, #1a365d 0%, #2d4a75 100%);
    }
    .ad-block {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(237, 137, 54, 0.05) 100%);
    }
    .btn-result-primary, .btn-result-secondary, .btn-result-share, .btn-result-success {
        color: #fff;
    }
    .result-title-main {
        color: #e0e0e0;
    }
    .result-label-main {
        color: #c9a227;
    }
    .result-section-header h3 {
        color: #e0e0e0;
    }
    .result-section-header h3::after {
        background: linear-gradient(90deg, #c9a227, #e0e0e0);
    }
    .recommend-label {
        color: #ccc;
    }
    .result-header {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(237, 137, 54, 0.04) 100%);
    }
    .study-tips-icon {
        color: #c9a227;
    }
    .result-caution {
        background: rgba(237, 137, 54, 0.1);
        border-color: rgba(237, 137, 54, 0.25);
        color: #e0e0e0;
    }
}

/* Touch-device active-state equivalents for Accent Burst */
@media (hover: none) {
    .hero-cta:active,
    .hero-cta:focus-visible {
        border-color: var(--accent-text);
        box-shadow: 0 0 10px rgba(122, 97, 0, 0.3);
    }
    .nav-link:active,
    .nav-link:focus-visible {
        color: var(--accent-text) !important;
    }
    .nav-link:active::after,
    .nav-link:focus-visible::after {
        width: 100%;
    }
    .card:active,
    .card:focus-within {
        border-left-color: var(--accent-text);
        box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    }
    .option-btn:active,
    .option-btn:focus-visible,
    .choice-input:focus-visible + .option-btn {
        border-color: var(--accent-text);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.25);
    }
    .glossary-btn:active,
    .glossary-btn:focus-visible {
        border-color: var(--accent-text);
        box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.3);
    }
    .score-chip:active,
    .score-chip:focus-within {
        border-color: var(--accent-text);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(122, 97, 0, 0.2);
    }
    .result-tips li:active,
    .result-tips li:focus-within {
        border-left-color: var(--accent-text);
        background: var(--white);
    }
    .glossary-item:active,
    .glossary-item:focus-within {
        border-top-color: var(--accent-text);
    }
    .glossary-tag:active,
    .glossary-tag:focus-visible {
        border-color: var(--accent-text);
        background: var(--accent-text);
        color: #fff;
    }
    .lang-link:active,
    .lang-link:focus-visible {
        color: var(--accent-text);
    }
    .study-tips-list li:active,
    .study-tips-list li:focus-within {
        border-color: var(--accent-text);
        background: var(--white);
    }
}
