/* ==========================================
   解説エリア（袋とじ）
   ========================================== */

.explanation-area {
    margin-bottom: 1rem;

    margin-top: 1rem;
}

.explanation-details {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.explanation-details[open] {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.explanation-summary {
    list-style: none;
    /* デフォルトの矢印を消す */
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s;
}

.explanation-summary::-webkit-details-marker {
    display: none;
}

.explanation-summary:hover {
    background: #f1f5f9;
}

.explanation-summary .label {
    font-weight: 700;
    color: #475569;
    flex-grow: 1;
    font-size: 0.9rem;
}

.explanation-summary .toggle-icon {
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.3s;
}

.explanation-details[open] .explanation-summary .toggle-icon {
    transform: rotate(180deg);
}

.explanation-content {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explanation-content h4 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .logic-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.logic-item h5 {
    font-size: 0.85rem;
    color: #6366f1;
    margin-bottom: 0.4rem;
}

.logic-item p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.disclaimer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    color: #94a3b8;
    line-height: 1.4;
}